hydromt.data_catalog.adapters.GeoDataFrameAdapter.transform#
- GeoDataFrameAdapter.transform(gdf: GeoDataFrame, metadata: SourceMetadata, *, mask: GeoDataFrame | None = None, variables: List[str] | None = None, predicate: str = 'intersects', handle_nodata: NoDataStrategy = NoDataStrategy.RAISE) GeoDataFrame | None [source]#
Read transform data to HydroMT standards.
- Parameters:
gdf (
gpd.GeoDataFrame
) – input GeoDataFramemetadata (
SourceMetadata
) – source metadatamask (
Optional[gpd.GeoDataFrame]
, optional) – mask to filter by geometry, by default Nonevariables (
Optional[List[str]]
, optional) – variable filter, by default Nonepredicate (
str
, optional) – predicate to use for the mask filter, by default “intersects”handle_nodata (
NoDataStrategy
, optional) – how to handle no data being present in the result, by default NoDataStrategy.RAISE
- Returns:
filtered and harmonized GeoDataFrame
- Return type:
Optional[gpd.GeoDataFrame]
- Raises:
ValueError – if not all variables are found in the data
NoDataException – if no data in left after slicing and handle_nodata is NoDataStrategy.RAISE