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

All Samples(60)  |  Call(56)  |  Derive(0)  |  Import(4)

        def coverage(geom, srs):
    if isinstance(geom, (list, tuple)):
        return BBOXCoverage(geom, srs)
    else:
        return GeomCoverage(geom, srs)
        


src/m/a/MapProxy-1.6.0/mapproxy/config/coverage.py   MapProxy(Download)
    build_multipolygon,
)
from mapproxy.util.coverage import coverage
 
 
    else:
        return None
    return coverage(geom or bbox, SRS(srs))
 

src/m/a/mapproxy-HEAD/mapproxy/config/coverage.py   mapproxy(Download)
    build_multipolygon,
)
from mapproxy.util.coverage import coverage
 
 
    else:
        return None
    return coverage(geom or bbox, SRS(srs))
 

src/m/a/mapproxy-HEAD/mapproxy/test/unit/test_geom.py   mapproxy(Download)
    build_multipolygon,
)
from mapproxy.util.coverage import coverage, MultiCoverage
from mapproxy.layer import MapExtent, DefaultMapExtent
from mapproxy.test.helper import TempFile
    def setup(self):
        # box from 10 10 to 80 80 with small spike/corner to -10 60 (upper left)
        self.geom = shapely.wkt.loads(
            "POLYGON((10 10, 10 50, -10 60, 10 80, 80 80, 80 10, 10 10))")
        self.coverage = coverage(self.geom, SRS(4326))
    def test_eq(self):
        g1 = shapely.wkt.loads("POLYGON((10 10, 10 50, -10 60, 10 80, 80 80, 80 10, 10 10))")
        g2 = shapely.wkt.loads("POLYGON((10 10, 10 50, -10 60, 10 80, 80 80, 80 10, 10 10))")
        assert coverage(g1, SRS(4326)) == coverage(g2, SRS(4326))
        assert coverage(g1, SRS(4326)) != coverage(g2, SRS(31467))

src/m/a/MapProxy-1.6.0/mapproxy/test/unit/test_geom.py   MapProxy(Download)
    build_multipolygon,
)
from mapproxy.util.coverage import coverage, MultiCoverage
from mapproxy.layer import MapExtent, DefaultMapExtent
from mapproxy.test.helper import TempFile
    def setup(self):
        # box from 10 10 to 80 80 with small spike/corner to -10 60 (upper left)
        self.geom = shapely.wkt.loads(
            "POLYGON((10 10, 10 50, -10 60, 10 80, 80 80, 80 10, 10 10))")
        self.coverage = coverage(self.geom, SRS(4326))
    def test_eq(self):
        g1 = shapely.wkt.loads("POLYGON((10 10, 10 50, -10 60, 10 80, 80 80, 80 10, 10 10))")
        g2 = shapely.wkt.loads("POLYGON((10 10, 10 50, -10 60, 10 80, 80 80, 80 10, 10 10))")
        assert coverage(g1, SRS(4326)) == coverage(g2, SRS(4326))
        assert coverage(g1, SRS(4326)) != coverage(g2, SRS(31467))