get_h3_indices
Generate Uber H3 cell indices for polygons, named locations, or bounding boxes at a chosen resolution, respecting exact boundaries and interior holes.
Instructions
Get Uber H3 cell indices for a polygon (including interior holes), location boundary, or bounding box at a target resolution. When a WKT/GeoJSON polygon or named location boundary is provided, fills the exact polygon geometry (subtracting interior holes) rather than just its bounding rectangle.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bbox | No | The geometry to parse. Can be a raw bounding box string ('lat1,lng1,lat2,lng2'), WKT polygon (with optional holes), GeoJSON polygon/multipolygon, tile 'z/x/y', or ogrinfo extent. Either 'location' or 'bbox' MUST be provided. | |
| compact | No | Whether to return a compacted list of cells (mixing resolutions) to minimize response size. Defaults to false. | |
| location | No | A text location to search for (e.g. 'San Francisco'). Either 'location' or 'bbox' MUST be provided. | |
| resolution | Yes | The H3 resolution level, from 0 to 15. (e.g. 7) | |
| summary_only | No | If true, returns only cell count, sample cells, and map share URL without dumping thousands of cell IDs into context. Ideal for high resolutions. Defaults to false. | |
| return_geometry | No | If true, return GeoJSON FeatureCollection with hex boundary polygons in addition to cell IDs. Defaults to false. | |
| use_polygon_boundary | No | If true (default), fills the exact WKT/GeoJSON/OSM polygon boundary (including interior holes) instead of its rectangular bounding box when available. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cells | No | ||
| compact | Yes | ||
| geojson | No | ||
| complete | Yes | ||
| warnings | Yes | ||
| share_url | Yes | ||
| cell_count | Yes | ||
| provenance | Yes | ||
| resolution | Yes | ||
| sample_cells | No | ||
| summary_only | Yes | ||
| original_bbox | Yes | ||
| used_polygon_boundary | Yes |