UNPKG

vgridjs

Version:

Vgrid DGGS JS

20 lines (19 loc) 613 B
// dggs/olc.ts var OlcException = class extends Error { constructor(message) { super(message); this.name = "OlcException"; } }; function decode(olc) { throw new OlcException("OLC decode not implemented. Use a library or implement this function."); } function olcToLatLon(olc_id) { const codeArea = decode(); const center_lat = (codeArea.latitudeLo + codeArea.latitudeHi) / 2; const center_lng = (codeArea.longitudeLo + codeArea.longitudeHi) / 2; return [center_lat, center_lng]; } export { OlcException, decode, olcToLatLon }; //# sourceMappingURL=olc.js.map //# sourceMappingURL=olc.js.map