How to use the sentinelsat.SentinelAPI.to_geodataframe function in sentinelsat

To help you get started, we’ve selected a few sentinelsat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sentinelsat / sentinelsat / tests / test_pandas.py View on Github external
def test_to_geopandas(products):
    gdf = SentinelAPI.to_geodataframe(products)
    assert type(gdf).__name__ == "GeoDataFrame"
    print(gdf.unary_union.area)
    assert gdf.unary_union.area == pytest.approx(89.6, abs=0.1)
    assert len(gdf) == len(products)
    assert gdf.crs == {"init": "epsg:4326"}
github sentinelsat / sentinelsat / tests / test_mod.py View on Github external
def test_to_geopandas(products):
    gdf = SentinelAPI.to_geodataframe(products)
    assert type(gdf).__name__ == 'GeoDataFrame'
    print(gdf.unary_union.area)
    assert gdf.unary_union.area == pytest.approx(89.6, abs=0.1)
    assert len(gdf) == len(products)
    assert gdf.crs == {'init': 'epsg:4326'}
github sentinelsat / sentinelsat / tests / test_pandas.py View on Github external
def test_missing_dependency_geodataframe(monkeypatch):
    with pytest.raises(ImportError):
        monkeypatch.setitem(sys.modules, "geopandas", None)
        SentinelAPI.to_geodataframe({"test": "tst"})
github sentinelsat / sentinelsat / tests / test_mod.py View on Github external
def test_to_geopandas_empty(products):
    gdf = SentinelAPI.to_geodataframe({})
    assert type(gdf).__name__ == 'GeoDataFrame'
    assert len(gdf) == 0
github sentinelsat / sentinelsat / tests / test_pandas.py View on Github external
def test_to_geopandas_empty():
    gdf = SentinelAPI.to_geodataframe({})
    assert type(gdf).__name__ == "GeoDataFrame"
    assert len(gdf) == 0