Install & Compatibility
Where this runs
tested against v1.0.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.5s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Tile
✓ from pygeotile.tile import Tile
✗ from pygeotile import Tile
Tile is not directly under pygeotile package; must import from submodule.
Point
✓ from pygeotile.point import Point
✗ from pygeotile import Point
Point is not directly under pygeotile package; must import from submodule.
MercatorProjection
✓ from pygeotile.tile import MercatorProjection
Create a Tile from lat/lng and access TMS, Google coordinates, and bounds.
from pygeotile.tile import Tile
# Convert WGS84 coordinates to TMS tile at zoom 15
tile = Tile.for_latitude_longitude(latitude=47.376, longitude=8.548, zoom=15)
print('TMS tile:', tile.tms_x, tile.tms_y, tile.zoom)
# Convert tile to Google (XYZ) coordinates
print('Google tile:', tile.google_x, tile.google_y)
# Get bounding box of the tile
bbox = tile.bounds
print('Bounding box:', bbox)
Errors
Common errors & fixes
AttributeError: module 'pygeotile' has no attribute 'Tile'
Incorrect import: using 'from pygeotile import Tile' instead of 'from pygeotile.tile import Tile'.
fixUse: from pygeotile.tile import Tile
ValueError: The maximum zoom level is 30
Zoom level provided exceeds 30, which is the maximum allowed zoom.
fixProvide a zoom level between 0 and 30 inclusive.
Upgrade
Version history
1.0.6latest on PyPI · released Mar 8, 2018
Audit
Dependencies
No dependency data recorded yet.