import type { LatLng } from './map.types'; /** Mean Earth radius in metres, the value the Maps spherical library uses. */ export declare const EARTH_RADIUS_M = 6378137; /** * Point reached by travelling `distanceMeters` from `origin` on a `heading`. * * @description * Mirrors `google.maps.geometry.spherical.computeOffset`, and is used in its * place so sector geometry can be computed — and unit-tested — before the Maps * script exists. Headings are degrees clockwise from north, the convention * radio and survey data already use. */ export declare function computeOffset(origin: LatLng, distanceMeters: number, heading: number): LatLng; export interface SectorGeometry { center: LatLng; /** Degrees clockwise from north. */ azimuth: number; /** Angular width of the beam, in degrees. */ beamWidth: number; radiusMeters: number; /** Arc resolution. @default 24 */ steps?: number; } /** * Builds the polygon ring of an antenna coverage sector. * * @description * A wedge with its vertex on the site, opening `beamWidth` degrees around * `azimuth` and reaching `radiusMeters`. This is domain symbology — no generic * circle or polygon substitutes for it, which is why it gets its own prop. * * A `beamWidth` of 360 or more degenerates into a full circle, and the vertex * is dropped in that case so the ring does not fold back on itself. */ export declare function sectorPath(sector: SectorGeometry): LatLng[]; /** * Ray-casting point-in-polygon test. * * Used for the "who was inside this fence" question, and kept independent of * `google.maps.geometry.poly.containsLocation` so it works on plain data — in a * worker, on the server, or in a test. */ export declare function pointInRing(point: LatLng, ring: LatLng[]): boolean; /** Great-circle distance in metres. */ export declare function distanceBetween(a: LatLng, b: LatLng): number; /** A shape the user drew on the map. */ export type MapDrawnShape = { type: 'polygon'; path: LatLng[]; } | { type: 'circle'; center: LatLng; radiusMeters: number; } | { type: 'rectangle'; bounds: { north: number; south: number; east: number; west: number; }; }; /** True when the point falls inside the drawn shape. */ export declare function pointInShape(point: LatLng, shape: MapDrawnShape): boolean; /** * Filters a set of points down to those inside a drawn shape. * * This is the payoff of the geofence tool: "who was inside" answered against * plain coordinates, with no Maps call. */ export declare function pointsInShape(points: T[], shape: MapDrawnShape): T[];