geoprimsField-grade geospatial math

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.

20

20 geohashes cover the area.

Geohashes
Geohash
dppn50
dppn52
dppn58
dppn5b
dppnh0
dppn51
dppn53
dppn59
dppn5c
dppnh1
dppn54
dppn56
dppn5d
dppn5f
dppnh4
dppn55
dppn57
dppn5e
dppn5g
dppnh5
Provenance
Computed by
indexing.geohash.cover 1.0.0, core 0.1.0
Model
The geohash grid at the precision (cells 360° / 2^⌈5p/2⌉ wide and 180° / 2^⌊5p/2⌋ tall), kept where a cell overlaps the box or polygon, or where its center is inside. Polygon edges are straight in latitude and longitude, like the cells
Accuracy
Exact on the latitude-longitude grid; a polygon may not cross the antimeridian
Notes
None
Cites
Niemeyer, G., geohash.org, Geohash (public domain algorithm)

Something look off?

Your values

Showing an example. Change anything.
KML, KMZ, GPX, GeoJSON, CSV, WKT, or WKB — or drop it on the box. Read on this device.
Run many at once from a CSV

Loading…

How we got thisFormula, worked example, sources, and proof

Model: The geohash grid at the precision (cells 360° / 2^⌈5p/2⌉ wide and 180° / 2^⌊5p/2⌋ tall), kept where a cell overlaps the box or polygon, or where its center is inside. Polygon edges are straight in latitude and longitude, like the cells

Show your work

  1. Cell size

    360° / 2^⌈5p/2⌉ by 180° / 2^⌊5p/2⌋

    precision 6 = 0.01099° × 0.005493°

  2. Geohashes

    cells that overlap the area

    20 cells in the area's bounds = 20

The same steps an agent gets from the MCP server with explain: true.

Accuracy: Exact on the latitude-longitude grid; a polygon may not cross the antimeridian

When to use this: Use this to turn an area into a set of geohash prefixes you can index or query with: the cells that touch a bounding box or polygon, or only those whose centres fall inside. It is the usual way to make a spatial query out of a string prefix match.

Limitations: Pick the mode for the job. Overlap keeps every cell the area touches, so nothing inside is missed and some outside is included -- the right choice for a query. Centre keeps only cells centred inside, so cells are more or less contained, and a polygon smaller than one cell covers nothing at all, which is correct and surprising. Geohash cells are not square and alternate between wide and tall as precision grows, because each character adds five bits split unevenly between longitude and latitude. Polygon edges are treated as straight in latitude and longitude, the same space the cells live in.

Worked example: Downtown Pittsburgh at precision 6. Source: Geohash cell arithmetic (Niemeyer 2008). It is golden test vector v001, and every build checks the tool still gives its answer within its tolerance.

You enter

Bounding box
40.43, -80.02, 40.45, -79.98
Precision
6

You get

Geohashes
20

Review: Not yet independently reviewed by a GIS professional.

Last verified: 2026-09-18, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.

Status: version 1.0.0, core 0.1.0. See this tool in the verification report.

Checked against: 22 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.

Sources