Skip to main content

Calculates Open Street Map tile coordinates.

Project description


Open Street Map Tile Calculator

Calculates Open Street Map tile coordinates required to map the given area at certain zoom level.

Mapped area (bounding box) is a rectangle determined by given location coordinates and the radius parameter in kilometers which is a distance from the location to the corners of the rectangle.

Returns a list of urls pointing to calculated tiles.


This package is available on PyPI

pip install osmtilecalc


osmtilecalc latitude longitude radius zoom_level [-h] [-t] [-m]

positional arguments:

latitude Latitude of location in decimal format

longitude Longitude of location in decimal format

radius Radius from location in kilometers

zoom_level Map zoom level (0-21)

optional arguments:

-h, --help Show this help message and exit

-t, --total-only Only show total number of tiles

-m, --miles Change radius unit to US mile


You can use the osmtilecalc command to calculate your tiles:

$ osm-tile-calc 54.5189 18.5305 5 12

Or you can use the get_urls_for_location function to do it in your code:

>>> from osmtilecalc import get_urls_for_location
>>> get_urls_for_location([54.5189, 18.5305], 5, 11)
['', '']

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

osmtilecalc-1.0.0.tar.gz (3.6 kB view hashes)

Uploaded source

Built Distribution

osmtilecalc-1.0.0-py3-none-any.whl (8.1 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page