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)

        LinearProjection.__init__(self, 0, t)
Esempio n. 2
0
    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)

        LinearProjection.__init__(self, 0, t)
Esempio n. 3
0
    def __init__(self, srs, resolutions, tile_size=256, transformation=Transformation(1, 0, 0, 0, 1, 0)):
        """
        Creates a new instance with the projection specified in srs, which is in Proj4
        format.
        """
        
        self.resolutions = resolutions
        self.tile_size = tile_size
        self.proj = Proj(srs)
        self.srs = srs
        self.tile_dimensions = \
            [self.tile_size * r for r in self.resolutions]

        try:
             self.base_zoom = self.resolutions.index(1.0)
        except ValueError:
            raise TileStache.Core.KnownUnknown('No zoom level with resolution 1.0')

        LinearProjection.__init__(self, self.base_zoom, transformation)