DGGS Function Libraries
Import optional Discrete Global Grid System function tables from @math.gl/expressions/dggs.
import {ExpressionFunctionRegistry, compile} from '@math.gl/expressions';
import {DGGS_FUNCTION_LIBRARY} from '@math.gl/expressions/dggs';
const registry = new ExpressionFunctionRegistry([DGGS_FUNCTION_LIBRARY]);
const evaluate = compile('getGeohashBoundary(hash)', {registry});
evaluate({hash: '9q8yy'});
GEOHASH_FUNCTION_LIBRARY
getGeohashLngLatgetGeohashBoundsgetGeohashBoundarygetGeohashBoundaryFlat
QUADKEY_FUNCTION_LIBRARY
getQuadkeyLngLatquadkeyToWorldBoundsgetQuadkeyBoundarygetQuadkeyBoundaryFlat
S2_FUNCTION_LIBRARY
getS2IndexFromTokengetS2TokenFromIndexgetS2ChildIndexgetS2BoundaryFlat
S2 index functions use JavaScript bigint values.
DGGS_FUNCTION_LIBRARY
Combines the GeoHash, Quadkey, and S2 tables into one registration-ready table.
The individual constants allow applications to include only the DGGS systems they expose to expressions.