Expand description
global_digital_address Square-cell Web Mercator encoder/decoder for globally unique grid codes.
API:
get_digi_pin(lat, lon, levels)-> Stringget_lat_lng_from_digipin(code)-> Result<LatLng, Error>- constants:
DIGIPIN_GRID,MAX_LAT approx_cell_size_meters(levels)
Notes:
- Uses Web Mercator (EPSG:3857) math identical to the JS reference.
- Longitude normalized to (-180, 180]; latitude clamped to ±MAX_LAT.
- Grid subdivision is 6×6 per level.
Structs§
Enums§
Constants§
- DIGIPIN_
GRID - 6×6 symbol grid (rows top→bottom, columns left→right)
- MAX_LAT
- Mercator latitude clamp (degrees)
Functions§
- approx_
cell_ size_ meters - Approximate cell size (meters) for a given code length. world width / 6^levels
- get_
digi_ pin - Encode lat/lon to a square-cell global code.
- get_
lat_ lng_ from_ digipin - Decode a DIGIPIN back to the center lat/lon of its cell.