//#region src/coordinates/latlon/internal/normalize.d.ts type Format = 'LATLON' | 'LONLAT'; type CoordinateInternalValue = { LAT: number; LON: number; }; /** Tuple in `[latitude, longitude]` order. */ type LatLonTuple = readonly [latitude: number, longitude: number]; /** Tuple in `[longitude, latitude]` order (GeoJSON convention). */ type LonLatTuple = readonly [longitude: number, latitude: number]; /** A coordinate tuple in either lat/lon or lon/lat order. */ type CoordinateTuple = LatLonTuple | LonLatTuple; /** * Object representation of a coordinate with explicit lat/lon keys. * Accepts objects with case-insensitive variations: lat/LAT/latitude/LATITUDE and lon/LON/longitude/LONGITUDE. * Runtime validation via `isCoordinateObject` ensures proper keys are present. * * @example * ```typescript * { lat: 40.7128, lon: -74.0060 } * { latitude: 40.7128, longitude: -74.0060 } * { LAT: 40.7128, LON: -74.0060 } * ``` */ type CoordinateObject = Record; type CoordinateInput = string | CoordinateTuple | CoordinateObject; declare function isCoordinateTuple(input: CoordinateInput): input is CoordinateTuple; declare function isCoordinateObject(input: CoordinateInput): input is CoordinateObject; /** * Normalizes a coordinate object to a consistent lat/lon format. * * Accepts coordinate objects with case-insensitive key variations (lat/LAT/latitude/LATITUDE * and lon/LON/longitude/LONGITUDE) and returns a normalized object with lowercase 'lat' and 'lon' keys. * Returns null if required keys are not found. * * @param obj - Coordinate object with lat/lon keys (case-insensitive) * @returns Normalized object with lat and lon keys, or null if invalid * * @example * ```typescript * normalizeObjectToLatLon({ lat: 40.7128, lon: -74.0060 }); * // => { lat: 40.7128, lon: -74.0060 } * ``` * * @example * ```typescript * normalizeObjectToLatLon({ LATITUDE: 40.7128, LONGITUDE: -74.0060 }); * // => { lat: 40.7128, lon: -74.0060 } * ``` * * @example * ```typescript * normalizeObjectToLatLon({ x: 10, y: 20 }); * // => null (missing required keys) * ``` */ declare function normalizeObjectToLatLon(obj: CoordinateObject): { lat: number; lon: number; } | null; declare function tupleToLatLon(format: Format, tuple: CoordinateTuple): { lat: number; lon: number; }; //#endregion export { CoordinateInput, CoordinateInternalValue, CoordinateObject, CoordinateTuple, LatLonTuple, LonLatTuple, isCoordinateObject, isCoordinateTuple, normalizeObjectToLatLon, tupleToLatLon }; //# sourceMappingURL=normalize.d.ts.map