vgridjs
Version:
Vgrid DGGS JS
24 lines (22 loc) • 681 B
JavaScript
;
// 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];
}
exports.OlcException = OlcException;
exports.decode = decode;
exports.olcToLatLon = olcToLatLon;
//# sourceMappingURL=olc.cjs.map
//# sourceMappingURL=olc.cjs.map