Did I find the right examples for you? yes no

All Samples(5)  |  Call(4)  |  Derive(0)  |  Import(1)

src/n/i/nik2img-0.8.0/mapnik_utils/metaclass_injectors.py   nik2img(Download)
 
# mapnik_utils
from mapnik_utils.projection import EasyProjection
 
if not hasattr(mapnik,'ProjTransform'):
    def proj_obj(self):
        return EasyProjection(self.srs)
 
    def lon_lat_bbox(self):
        return self.envelope().forward(self.proj_obj,EasyProjection(4326))
    def lon_lat_layers_bounds(self):
        return self.layers_bounds().forward(self.proj_obj,EasyProjection(4326))
 
    def layers_bounds(self):
        new_box = None
    def proj_obj(self):
        return EasyProjection(self.srs)
 
    def set_srs_by_srid(self,srid):
        self.srs = EasyProjection(srid).params()