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

  1. Enter every field in the input table using the stated units and exact supported selector spelling where applicable.
  2. Run the tool. Correct input errors before interpreting an output.
  3. 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 fieldMeaning and unitsAccepted input
minTileXMin tile x.Finite number
maxTileXMax tile x.Finite number
minTileYMin tile y.Finite number
maxTileYMax tile y.Finite number
zoomZoom.Integer; from 0 to 26 inclusive
Output fieldInterpretation
resultObject containing the following named result fields.
result.tileCountTile count; use the stated units and sign convention.
json
{
  "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

  1. Tool behavior and example: Tile Count to Cover Extent at Zoom Calculator — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies