eurocropsml.acquisition.clipping.utils.mask_polygon_raster¶
- mask_polygon_raster(tilepaths: list[Path], polygon_df: DataFrame, parcel_id_name: str, product_date: str) DataFrame¶
Clipping parcels from raster files (per band) and calculating median pixel value per band.
- Parameters:
tilepaths – Paths to the raster’s band tiles.
polygon_df – GeoDataFrame of all parcels to be clipped.
parcel_id_name – The country’s parcel ID name (varies from country to country).
product_date – Date on which the raster tile was obtained.
- Returns:
Dataframe with clipped values.
- Raises:
FileNotFoundError – If the raster file cannot be found.