Tile Count to Cover Extent at Zoom Calculator
Count inclusive caller established XYZ tile bounds at zoom; does not derive bounds from lon/lat or handle wrapped extents.
Description
Count tiles in an inclusive, already established tile-index rectangle at one zoom level.
A tile extent can be described by the minimum and maximum tile indices at one zoom level. Counting every column and row in that inclusive rectangle gives its tile count.
When to use this tool
Count tiles in an inclusive, already established tile-index rectangle at one zoom level. Use it when the input measurements and conventions below match the operation you need.
- Prepare minTileX, maxTileX, minTileY, maxTileY, zoom, respecting the measurement basis and boundaries below.
- Compare the worked example with your intended operation before reusing its result.
How to use the tool and how it works
- Enter every field in the input table using the stated units and exact supported selector spelling where applicable.
- Run the tool. Correct input errors before interpreting an output.
- Read the result fields below; use accompanying flags and the stated sign, boundary or model convention when interpreting a number.
zoom must be an integer from 0 to 26. Each tile index must be an integer from zero through 2^zoom minus one, with each minimum no greater than its maximum. tileCount equals (maxTileX minus minTileX plus 1) times (maxTileY minus minTileY plus 1).1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| minTileX | Min tile x. | Finite number |
| maxTileX | Max tile x. | Finite number |
| minTileY | Min tile y. | Finite number |
| maxTileY | Max tile y. | Finite number |
| zoom | Zoom. | Integer; from 0 to 26 inclusive |
| Output field | Interpretation |
|---|---|
| result | Object containing the following named result fields. |
| result.tileCount | Tile count; use the stated units and sign convention. |
{
"input": {
"minTileX": 0,
"maxTileX": 1,
"minTileY": 1,
"maxTileY": 2,
"zoom": 2
},
"output": {
"result": {
"tileCount": 4
}
}
} Limitations and assumptions
- The input is already a tile-index rectangle. Geographic bounds are not projected, wraparound at the antimeridian is not resolved, and image byte size is not estimated.
- Every declared field is required and unexpected fields are rejected. Numeric inputs must be finite; input errors are distinct from a valid false result or an explicitly qualified output.
- Extremely large inputs and nonfinite or excessively large outputs are rejected. List positions reported by the tool use zero-based indices unless stated otherwise.
Alternative or Complementary methods
For a map-layout decision, inspect the rendered map at its intended size as well as its numerical dimensions. For classification or coordinate work, retain the chosen boundary and coordinate conventions with the result. Compare the scope of the nearby tools below before substituting one.
References
Similar or alternative tools
- Tile Zoom Level Resolution Approximation Lookup
Web Mercator nominal local ground resolution using radius 6378137m, caller tile pixel width; latitude limited to Mercator range.
- Map Extent Width Height from Bounds at Scale Calculator
Projected rectangular ground extent to print dimensions under constant representative fraction; no latitude/longitude distance conversion.