def test_is_projected(): assert is_projected_crs({'init': 'EPSG:3857'}) is True assert is_projected_crs({'init': 'EPSG:4326'}) is False lcc_crs = crs.from_string('+lon_0=-95 +ellps=GRS80 +y_0=0 +no_defs=True +proj=lcc +x_0=0 +units=m +lat_2=77 +lat_1=49 +lat_0=0') assert is_projected_crs(lcc_crs) is True wgs84_crs = crs.from_string('+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs') assert is_projected_crs(wgs84_crs) is False
def test_is_projected(): assert is_projected_crs({'init': 'EPSG:3857'}) is True assert is_projected_crs({'init': 'EPSG:4326'}) is False lcc_crs = crs.from_string( '+lon_0=-95 +ellps=GRS80 +y_0=0 +no_defs=True +proj=lcc +x_0=0 +units=m +lat_2=77 +lat_1=49 +lat_0=0' ) assert is_projected_crs(lcc_crs) is True wgs84_crs = crs.from_string( '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs') assert is_projected_crs(wgs84_crs) is False
def is_valid_crs(crs): """Check if valid geographic or projected coordinate reference system.""" return is_geographic_crs(crs) or is_projected_crs(crs)
def is_valid_crs(crs): return is_geographic_crs(crs) or is_projected_crs(crs)