Codificar geohash
geohash-encodeCodifica latitud/longitud como geohash de precisión 1-12 e informa el tamaño de la celda. Cuándo: hay que calcular coordenadas, distancias, rumbos o áreas a partir de puntos dados. No para: decodificar un geohash en su punto central, caja delimitadora y margen de error (geohash-decode). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Encodes a latitude/longitude as a geohash string of precision 1-12 and reports the cell size in metres. When: coordinates, distances, bearings or areas have to be computed from given points. Not for: decoding a geohash to its center point, bounding box and error margins (geohash-decode). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lat | Yes | Latitude in decimal degrees (number; required; min -90; max 90). | |
| lon | Yes | Longitude in decimal degrees (number; required; min -180; max 180). | |
| precision | No | Characters 1-12 (integer; optional; default 9; min 1; max 12). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| geohash | No | ||
| cell_width_m | No | ||
| cell_height_m | No |