import type { Position } from "geojson"; import type { MapPolygon } from "./dynamicMapTypes"; /** * Represents a geographic point with latitude and longitude */ export interface Point { /** Latitude in degrees (-90 to 90) */ lat: number; /** Longitude in degrees (-180 to 180) */ lon: number; } /** A shape is drawn as a circle when typed so, or when it has a centre and radius. */ export declare function isCircle(polygon: MapPolygon): polygon is MapPolygon & { center: Point; radius: number; }; /** * Represents geographic bounds */ export interface Bounds { /** Northern latitude bound */ north: number; /** Southern latitude bound */ south: number; /** Eastern longitude bound */ east: number; /** Western longitude bound */ west: number; } /** * Result of bounds calculation including center and zoom */ export interface BoundsResult { /** Calculated bounds with padding */ bounds: Bounds; /** Center point [longitude, latitude] */ center: [number, number]; /** Calculated optimal zoom level */ zoom: number; } /** * Generate points to approximate a circle using great circle calculations */ export declare function generateCirclePoints(centerLat: number, centerLon: number, radiusMeters: number, numPoints?: number): Point[]; /** * Compute the centroid of a polygon from its exterior coordinate ring. * Uses the shoelace/Green's theorem formula for geometric accuracy — * a simple coordinate average can place the centroid outside irregular shapes. */ export declare function computePolygonCentroid(coordinates: Position[]): Point; /** * Calculate optimal zoom level for the given bounds and map dimensions */ export declare function calculateOptimalZoom(bounds: Bounds, mapWidth: number, mapHeight: number, paddingPixels?: number): number; /** * Calculate enhanced bounds with buffer for a set of points */ export declare function calculateEnhancedBounds(markers: Point[], routes: Point[][], mapWidth: number, mapHeight: number, polygons?: MapPolygon[]): BoundsResult; /** Whether the point's latitude and longitude are in range; logs the point when not. */ export declare function isValidPoint(point: Point, index: number | string, type: string): boolean; //# sourceMappingURL=geometryUtils.d.ts.map