Skip to main content
Store WGS84 GeoJSON in t.geometry({ kind }) fields and measured locations with an accuracy radius in t.fix() fields. Both use longitude first. An index entry ending in either field serves .near and .region, partitioned by the preceding fields. For position history, geofences and their transitions, place an instance of geo({...}) from @bijectionhq/library-geo in the app tree. For map settings, keyed tile providers and the export audit, place maps({...}) from @bijectionhq/library-geo/maps/library (Map settings, keyed tiles and exports). See Spatial queries and Geofences.

Grid references

Use @bijectionhq/library-geo/maps/geo in guest TypeScript to format WGS84 coordinates as MGRS or USNG and convert references back to coordinates or a polygon.
The formatters take longitude first and write spaced references. They truncate to 1–5 digits per axis and default to 5 digits (one metre). MGRS uses UPS at 84°N and above and south of 80°S. USNG covers only the UTM latitudes from 80°S to just below 84°N. mgrsToPoint returns the square’s southwest corner as [longitude, latitude]. mgrsSquare returns its four corners as a closed WGS84 GeoJSON Polygon. Both read MGRS and USNG references with 0–5 digits per axis, with or without spaces. Use usngToPoint when an input must belong to USNG’s UTM grid.