Get gdal development libraries:
$ sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
$ sudo apt-get update
$ sudo apt-get install libgdal-dev
Create and activate a virtual environment:
""" | |
Web Mercator Scale and Resolution Calculations | |
Python implementation of the formulas at http://msdn.microsoft.com/en-us/library/bb259689.aspx | |
""" | |
import math | |
def meters_per_pixel(zoom, lat): | |
""" | |
ground resolution = cos(latitude * pi/180) * earth circumference / map width | |
""" |