vgridjs
Version:
Vgrid DGGS JS
25 lines (23 loc) • 678 B
TypeScript
/**
* OLC (Open Location Code / Plus Codes) implementation in TypeScript
* Based on the original Python implementation
*/
declare class OlcException extends Error {
constructor(message: string);
}
declare function decode(olc: string): {
latitudeLo: number;
latitudeHi: number;
longitudeLo: number;
longitudeHi: number;
latitudeCenter: number;
longitudeCenter: number;
codeLength: number;
};
/**
* Vgrid specific function to get the center lat/lon from an OLC code
* @param olc_id OLC code
* @returns [center_lat, center_lng]
*/
declare function olcToLatLon(olc_id: string): [number, number];
export { OlcException, decode, olcToLatLon };