Registry / data / pygeotile

pygeotile

JSON →
library1.0.6pypypi✓ verified 87d ago

Python package to handle tiles and points of different projections, in particular WGS 84 (Latitude, Longitude), Spherical Mercator (Meters), Pixel Pyramid and Tiles (TMS, Google, QuadTree). Version 1.0.6 is the latest, released intermittently.

pip install pygeotile
INSTALL
IMPORT
SIG · PYGEOTILE
P
pygeotile
datapythonv1.0.6
Install
2.5s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibc
py 3.103.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)
Debug
Known issues
gotchaTile coordinates are zero-based and may differ between TMS and Google (XYZ) schemes. Ensure correct flip for TMS Y axis.
fix
Use tile.tms_y vs tile.google_y as appropriate.
affects: all
gotchaThe 'quadtree' methods expect a specific input format; incorrect usage leads to ValueError.
fix
Review the QuadTree section in documentation.
affects: all
deprecatedOld import style from pygeotile.pygeotile may exist in outdated examples; not supported in v1.0.6.
fix
Use correct imports as shown in quickstart.
affects: >=1.0.0
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'.
fix
Use: from pygeotile.tile import Tile
ValueError: The maximum zoom level is 30
Zoom level provided exceeds 30, which is the maximum allowed zoom.
fix
Provide 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.

Agent activity
2 hits · last 30 days
node
2
Resources
pygeotile — pip install pygeotile · libregistry