Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

src/t/i/TileStache-HEAD/TileStache/Geography.py   TileStache(Download)
 
from ModestMaps.Core import Point, Coordinate
from ModestMaps.Geo import deriveTransformation, MercatorProjection, LinearProjection, Location
from math import log as _log, pi as _pi
 
    def __init__(self):
        pi = _pi
 
        # Transform from raw mercator projection to tile coordinates
        t = deriveTransformation(-pi, pi, 0, 0, pi, pi, 1, 0, -pi, -pi, 0, 1)
    def __init__(self):
        p = _pi
 
        # Transform from geography in radians to tile coordinates
        t = deriveTransformation(-p, p/2, 0, 0, p, p/2, 2, 0, -p, -p/2, 0, 1)

src/n/o/NokiaWebGL-HEAD/tiles.py   NokiaWebGL(Download)
from urllib import urlopen
 
from ModestMaps.Geo import Location, MercatorProjection, deriveTransformation
from ModestMaps.Providers import IMapProvider
from ModestMaps.Core import Coordinate
def get_projection():
    ''' Return the correct spherical mercator project for Nokia.
    '''
    # the spherical mercator world tile covers (-π, -π) to (π, π)
    t = deriveTransformation(-pi, pi, 0, 0, pi, pi, 1, 0, -pi, -pi, 0, 1)