Map tile for a point (XYZ, TMS, quadkey)
The web map tile containing a point at a zoom: , , and quadkey, with the ground resolution.
A published result changed on 2026-09-19: The geohash encoder, map tile for a point, tile bounds, H3 grid disk, and haversine distance are now stable, so their results no longer carry the EXPERIMENTAL_TOOL warning; the Web Mercator clamp and pentagon warnings moved to the first position. Each matches published worked examples (Wikipedia, the mercantile README, the Bing Maps Tile System, H3 C, and Rosetta Code) and agrees with a separately written library on 250 to 1,000 cases. No numbers changed. Changelog
The tile is 12/1137/1544, quadkey 032001112001.
- x
- y (XYZ)
- y (TMS)
- Quadkey
- Ground resolution (per pixel)
Provenance
- Computed by
- indexing.tile.from-point 1.0.1, core 0.1.0
- Model
- Spherical Web Mercator (EPSG:3857) tile grid
- Accuracy
- Exact tile; resolution on the Web Mercator sphere
- Notes
- None
- Cites
- OpenStreetMap Wiki, Slippy map tilenames; Microsoft, Bing Maps Tile System
Something look off?
How we got thisFormula, worked example, sources, and proof
Model: Spherical Web Mercator (EPSG:3857) tile grid
Show your work
Tiles across the map
2^12= 4,096Column
⌊(-79.982222 + 180) / 360 × 4,096⌋= 1,137Row
from latitude 40.446111° at zoom 12= 1,544Tile
tile = zoom/x/y12/1137/1544= 12/1137/1544
The same steps an agent gets from the MCP server with explain: true.
Accuracy: Exact tile; resolution on the Web Mercator sphere
When to use this: Use this to find which web map tile a point falls in at a zoom level, in XYZ, TMS, and quadkey form, with the ground resolution at that point. It is how a coordinate is turned into a tile request, a cache key, or a pyramid lookup. It is also how a point is matched to the imagery or terrain tile that covers it, which is the first step in reading a value out of a tiled raster.
Limitations: Web Mercator distorts with latitude, so a tile covers far less ground near the poles than at the equator, and the projection stops short of the poles themselves. The tile is an area containing the point, and the y convention matters: XYZ and TMS number rows in opposite directions. At high zooms the tile numbers grow large, and a coordinate outside Web Mercator's latitude limits has no tile at all rather than one at the edge.
Worked example: Pittsburgh at zoom 12. Source: add-spatial-indexing-and-raster scenario: 12/1137/1544, TMS y 2551, quadkey 032001112001, about 29.08 m/px. It is golden test vector v001, and every build checks the tool still gives its answer within its tolerance.
You enter
- Latitude
- 40.446111 deg
- Longitude
- -79.982222 deg
- Zoom
- 12
You get
- XYZ tile
- 12/1137/1544
- x
- 1137
- y (XYZ)
- 1544
- y (TMS)
- 2551
- Quadkey
- 032001112001
- Ground resolution (per pixel)
- 29.08 m
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.1, core 0.1.0. See this tool in the verification report.
Changes
- 2026-09-23, fixed: Tile from point (version 1.0.1) rejected a tile size given as the number 512 ("Tile size must be a string"). Every tool now accepts a numeric option such as 512 as a number or as text. Changelog
- 2026-09-19, result change: The geohash encoder, map tile for a point, tile bounds, H3 grid disk, and haversine distance are now stable, so their results no longer carry the EXPERIMENTAL_TOOL warning; the Web Mercator clamp and pentagon warnings moved to the first position. Each matches published worked examples (Wikipedia, the mercantile README, the Bing Maps Tile System, H3 C, and Rosetta Code) and agrees with a separately written library on 250 to 1,000 cases. No numbers changed. Changelog
Checked against: 25 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.
Sources
- Slippy map tilenames, OpenStreetMap Wiki, Current wiki page. Lon./lat. to tile numbers, tile numbers to lon./lat., resolution and scale.
- Bing Maps Tile System, Microsoft, Online documentation. Tile coordinates and quadkeys; ground resolution = cos(lat) × 2π × 6,378,137 / (256 × 2^level).
Terms
- TMS: Tile Map Service
- A web map tile numbering like XYZ, but with rows counted from the south edge. Source: Slippy map tilenames
- XYZ: XYZ web map tiles
- The common web map tile numbering, zoom/x/y, with rows counted from the north edge. Source: Slippy map tilenames
TMS — Tile Map Service
A web map tile numbering like XYZ, but with rows counted from the south edge.
Source: Slippy map tilenames
XYZ — XYZ web map tiles
The common web map tile numbering, zoom/x/y, with rows counted from the north edge.
Source: Slippy map tilenames
Learn the concept: Map tiles, zoom levels, and quadkeys explained