Spatial indexing
H3 cells, geohashes, map tiles, and Plus Codes.
Not yet independently reviewed by a GIS professional.
Spatial indexes turn a location into a short key you can store, join, and search. This section covers H3 hexagons, A5 pentagons, S2 cells, geohashes, Plus Codes, and web map tiles, and converts one place between them. Developers and GIS analysts use them to bucket points, join datasets by cell, and plan map caches. If you are not sure which system fits, start with the cross-index tool, which shows one place in each at a matched cell size. Pitfall: every key names an area, not a point, and its size depends on the resolution you choose.
No tools here match . or .
A5
See allA5 equal-area pentagonal cells, their boundaries, and their hierarchy.
- A5 cell boundary
The center, equal area, resolution, and closed curved-edge boundary of an A5 cell for inspection or mapping.
- A5 parent and children
The immediate parent and children of an A5 cell in its logical resolution hierarchy.
- A5 cell from latitude and longitude
The equal-area A5 pentagonal cell containing a point at resolution 0 to 30, with its center and area.
Convert
See allMoving between indexing systems: one place in each, at resolutions chosen to match a cell size.
- One place in every index, at a matched cell size
A point written as an H3 cell, an S2 cell, a geohash, a Plus Code, a map tile, a Maidenhead locator, and an MGRS reference, each at the resolution whose cell is closest to the size you name, with the size it actually has there.
- Convert a cell from one index system to another
Reads a geohash, H3, S2, Plus Code, or map-tile reference and re-expresses that place in another of those systems, at the resolution whose cell size is closest to the source cell's.
Geohash
See allGeohash encoding, decoding, and neighbors.
- Geohashes covering an area
Every geohash at a precision that touches a bounding box or polygon, or only those whose centers fall inside, for indexing or querying an area.
- Geohash decoder
The center, bounding box, and error margins of a geohash.
- Geohash encoder
The geohash for a latitude and longitude at precision 1 to 12, with the cell's size and bounds.
- Geohash neighbors
The 8 geohash cells around a geohash, wrapping across the antimeridian; past a pole there is no neighbor.
H3
See allUber's H3 hexagonal grid.
- H3 base cell
Which of H3's 122 resolution 0 base cells an H3 cell descends from, and whether that base cell is a pentagon.
- H3 cell area
The exact area of one H3 cell on H3's sphere, with its resolution's average hexagon area for comparison.
- H3 cell boundary
The vertices of an H3 cell's boundary in order, ready to draw the hexagon or pentagon on a map.
- H3 cell inspector
Everything about an H3 cell: center (cellToLatLng), boundary (cellToBoundary), resolution, base cell, pentagon and Class III checks, area, and decimal form.
- H3 cell to latitude and longitude
The latitude and longitude of an H3 cell's center, with the cell's resolution.
- H3 local IJ for a cell (cellToLocalIj)
The local IJ coordinates of a cell as seen from an origin cell: two whole numbers on the grid H3 unfolds around that origin.
- H3 cell set outline (cellsToMultiPolygon)
The outline of a set of H3 cells: the boundary between the set and everything outside it, as polygons with their holes, in GeoJSON.
- H3 center child
The child cell at the center of an H3 cell, at a finer resolution.
- H3 child position
Where an H3 cell falls in the ordered list of its ancestor's children, and the ancestor at the resolution asked for.
- H3 children cells
The finer H3 cells inside a cell (cellToChildren), their count, and the center child.
- H3 compact
Replaces every complete group of 7 sibling cells with their parent, repeatedly, for the smallest set covering the same area (compactCells).
- H3 directed edges
The directed edges leading out of an H3 cell, one to each neighbor, as H3 edge indexes.
- H3 edge length
The length of one H3 directed edge on the ground, with the cells on either side of it.
- H3 edges and vertexes
The directed edges (with lengths and neighbors) and vertexes of an H3 cell (originToDirectedEdges, cellToVertexes).
- H3 grid disk (k-ring)
All H3 cells within k steps of a cell (gridDisk); fewer than 3k(k+1)+1 when a pentagon is nearby.
- H3 grid distance
The number of H3 grid steps between two cells of the same resolution.
- H3 grid path and distance
The grid distance between two H3 cells (gridDistance) and the line of cells joining them (gridPathCells).
- H3 grid ring
The H3 cells exactly k steps from a cell (gridRing), the hollow ring.
- H3 resolution class check
Whether an H3 cell's resolution is Class III (odd resolutions, rotated about 19.1° from the previous) or Class II (even).
- Is this H3 cell a pentagon?
Whether an H3 cell is one of the twelve pentagons at its resolution, which have five neighbors instead of six.
- H3 cell for a point
The H3 cell containing a latitude and longitude at resolution 0 to 15 (latLngToCell), with the cell's center and area.
- H3 cell at local IJ (localIjToCell)
The H3 cell at local IJ coordinates around an origin cell, undoing cellToLocalIj.
- H3 parent cell
The coarser H3 cell that contains a cell (cellToParent), and the cell's position among that parent's children.
- H3 polygon fill (polygonToCells)
The H3 cells that fill a polygon (with holes, across the antimeridian) at a resolution, by an explicit containment mode: centers, full cells, overlap, or buffered bounding-box overlap.
- H3 cell resolution
The resolution of an H3 cell, 0 (coarsest) to 15 (finest), with H3's average hexagon area at that resolution.
- H3 resolution chooser
The H3 resolution whose average cell is closest to a target area or edge length, with the full resolution table (122 base cells, 12 pentagons at each resolution).
- H3 uncompact
Expands a mixed-resolution set of H3 cells to one resolution (uncompactCells).
- Validate an H3 index
Whether a string is a valid H3 cell index, and if not, why not.
- H3 vertexes
The topological vertexes of an H3 cell as H3 vertex indexes, with each vertex's latitude and longitude.
Plus Code
See allOpen Location Codes (Plus Codes).
- Plus Code decoder
The center and area of a Plus Code; a short code needs a nearby reference point to recover the full code.
- Plus Code encoder
The Plus Code (Open Location Code) for a latitude and longitude at code length 2 to 15, with the area it covers.
- Shorten a Plus Code
The shortest form of a full Plus Code that still recovers uniquely near a reference point (such as the nearest town).
S2
See allS2 cells: a point to a cell id or token at any level, what a cell covers, and the cells across its edges.
- S2 cell area
The exact area of an S2 cell on a sphere of the Earth's mean radius, with the average for its level and the ratio between them.
- S2 cell details
Everything about an S2 cell: its center, its four corners, the face and level, its exact area against the average for that level, and its parent and children.
- S2 cells covering a region
The S2 cells that cover a latitude and longitude rectangle, a circle around a point, or a polygon with holes, within a level range and a cell budget.
- S2 cell hierarchy
An S2 cell's parent, its ancestor at any coarser level, and its four children.
- S2 cell for a point
The S2 cell containing a latitude and longitude at a level from 0 to 30, with its token, its 64-bit id, the face it sits on, and its area.
- S2 edge neighbours
The four cells across an S2 cell's edges, at the same level, wrapping onto the next cube face where the cell lies on a face edge.
- S2 token and cell id
Converts an S2 cell between its compact hexadecimal token and its 64-bit decimal cell id, with its level and face.
- S2 cell vertices
The four corners of an S2 cell as latitude and longitude, counterclockwise, ready to draw the cell.
Tile
See allWeb map tiles and ground resolution.
- Map tile bounds
The latitude and longitude bounds of a z/x/y tile or quadkey, with its XYZ, TMS, and quadkey forms; detect mode shows both y conventions.
- Map tiles covering a box
Every z/x/y tile at a zoom that touches a latitude and longitude box, across the antimeridian when west is greater than east, for pre-caching or download planning.
- Map tile parent and children
The parent tile one zoom out and the four children one zoom in of a z/x/y tile or quadkey, in XYZ or TMS numbering.
- Map tile for a point (XYZ, TMS, quadkey)
The web map tile containing a point at a zoom: XYZ, TMS, and quadkey, with the ground resolution.
- Map ground resolution and scale
Meters per pixel and map scale for a Web Mercator zoom level at a latitude, for 256 or 512 pixel tiles.
- Map tile to quadkey and back
Converts a map tile between zoom/x/y and the Bing Maps quadkey, a string of one digit per zoom level.
- XYZ and TMS tile numbering
Converts a map tile's z/x/y between the XYZ scheme, which counts rows from the north, and TMS, which counts them from the south.