h3_index
Convert any latitude/longitude coordinate into an H3 hexagonal grid cell index at a chosen resolution for spatial aggregation and heat map generation.
Instructions
Convert a coordinate to an H3 hexagonal grid cell index at a given resolution.
Returns: { h3_index (string), resolution, center_lat, center_lon }.
Resolution guide (area per cell):
5: ~250 km² — country/large region level
7: ~5 km² — city neighbourhood level (most common for analytics)
9: ~0.1 km² — city block level
12: ~0.003 km² — building level
USE FOR: Spatial aggregation, density heat maps, geospatial indexing, joining datasets by grid cell. NOTE: For bulk H3 indexing of many coordinates, call individually — do not attempt to derive adjacent cells manually.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lat | Yes | Latitude. Range: -90 to 90. | |
| lon | Yes | Longitude. Range: -180 to 180. | |
| resolution | Yes | H3 resolution 0–15. Use 7 for neighbourhood-level aggregation, 9 for block-level. |