Tile Zoom Level Resolution Approximation Lookup

Web Mercator nominal local ground resolution using radius 6378137m, caller tile pixel width; latitude limited to Mercator range.

Description

Estimate local spherical Web Mercator ground meters per pixel.

The ground distance represented by a Web Mercator pixel varies with latitude, zoom and tile pixel dimensions. This tool estimates that distance using a spherical ground-resolution formula.

When to use this tool

Estimate local spherical Web Mercator ground meters per pixel. Use it when the input measurements and conventions below match the operation you need.

  • Prepare zoom, latitudeDegrees, tilePixels, 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.

The calculation is 2 times pi times 6,378,137 times cos(latitude) divided by tilePixels times 2^zoom. Latitude is converted to radians and limited to the Web Mercator latitude range; zoom is an integer from 0 to 30 and tilePixels from 1 to 8,192.1

Input fieldMeaning and unitsAccepted input
zoomZoom.Integer; from 0 to 30 inclusive
latitudeDegreesLatitude degrees. Degrees.Finite number; from -85.0511287798066 to 85.0511287798066 inclusive
tilePixelsTile pixels.Integer; from 1 to 8192 inclusive
Output fieldInterpretation
resultObject containing the following named result fields.
result.approximateGroundMetersPerPixelApproximate ground meters per pixel; use the stated units and sign convention.
json
{
  "input": {
    "zoom": 0,
    "latitudeDegrees": 0,
    "tilePixels": 256
  },
  "output": {
    "result": {
      "approximateGroundMetersPerPixel": 156543.03392804097
    }
  }
}

Limitations and assumptions

  • The output is approximate ground meters per pixel under the spherical convention. It does not establish physical display scale, device-pixel ratio or a local ellipsoidal surveying scale.
  • 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 Zoom Level Resolution Approximation Lookup — tool.io

Similar or alternative tools

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