Esempio n. 1
0
    def get_latlon_extent(self):
        layers = self.get_layers()
        if not layers:
            return stores.Extent(0, 0, 0, 0)

        extent = layers[0].get_latlon_extent()
        for layer in layers[1:]:
            e = layer.get_latlon_extent()
            extent.addX(e.minX(), e.maxX())
            extent.addY(e.minY(), e.maxY())

        return extent
Esempio n. 2
0
 def get_latlon_extent(self):
     rect = mapscript.rectObj(*self.get_extent())
     rect.project(mapscript.projectionObj(self.get_proj4()),
                  mapscript.projectionObj("+init=epsg:4326"))
     return stores.Extent(rect.minx, rect.miny, rect.maxx, rect.maxy)
Esempio n. 3
0
 def get_extent(self):
     extent = self.ms.getExtent()
     return stores.Extent(extent.minx, extent.miny, extent.maxx, extent.maxy)