get_footprint
get_footprint#
- get_footprint(xds: Union[str, xarray.core.dataarray.DataArray, xarray.core.dataset.Dataset, rasterio.io.DatasetReader]) geopandas.geodataframe.GeoDataFrame [source]#
Get real footprint of the product (without nodata, in french == emprise utile)
>>> raster_path = "path/to/raster.tif" >>> footprint1 = get_footprint(raster_path) >>> # or >>> with rasterio.open(raster_path) as dst: >>> footprint2 = get_footprint(dst) >>> footprint1 == footprint2
- Parameters
xds (PATH_XARR_DS) – Path to the raster or a rasterio dataset or a xarray
- Returns
Footprint as a GeoDataFrame
- Return type
gpd.GeoDataFrame