Skip to content

Instantly share code, notes, and snippets.

@rmarianski
Created June 15, 2016 19:19
Show Gist options
  • Save rmarianski/27743e6b38405543e17ad0655355a275 to your computer and use it in GitHub Desktop.
Save rmarianski/27743e6b38405543e17ad0655355a275 to your computer and use it in GitHub Desktop.
from tilequeue.tile import coord_to_mercator_bounds
from tilequeue.tile import deserialize_coord
from tilequeue.process import _find_meters_per_pixel
coord = deserialize_coord('10/100/100')
merc_bounds = coord_to_mercator_bounds(coord)
tile_meters_wide = merc_bounds[2] - merc_bounds[0]
meters_per_pixel = _find_meters_per_pixel(10)
print 'z10 level tile meters wide: %f' % tile_meters_wide
print 'meters per pixel: %f' % meters_per_pixel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment