hydromt.data_catalog.DataCatalog.get_geodataframe#
- DataCatalog.get_geodataframe(path_or_key: Union[str, Path], bbox: Optional[List] = None, geom: Optional[GeoDataFrame] = None, buffer: Union[float, int] = 0, variables: Optional[Union[List, str]] = None, predicate: str = 'intersects', **kwargs)[source]#
Returns a clipped and unified GeoDataFrame (vector) from the data catalog.
To clip the data to the area of interest, provide a bbox or geom, with optional additional buffer and align arguments. To return only the dataframe columns of interest and check their presence, provide the variables argument.
- Parameters:
path_or_key (str) – Data catalog key. If a path to a vector file is provided it will be added to the data_catalog with its based on the file basename without extension.
bbox (array-like of floats) – (xmin, ymin, xmax, ymax) bounding box of area of interest.
geom (geopandas.GeoDataFrame/Series,) – A geometry defining the area of interest.
buffer (float, optional) – Buffer around the bbox or geom area of interest in meters. By default 0.
predicate ({'intersects', 'within', 'contains', 'overlaps', 'crosses', 'touches'}, optional) – If predicate is provided, the GeoDataFrame is filtered by testing the predicate function against each item. Requires bbox or mask. By default ‘intersects’
align (float, optional) – Resolution to align the bounding box, by default None
variables (str or list of str, optional.) – Names of GeoDataFrame columns to return. By default all columns are returned.
- Returns:
gdf – GeoDataFrame
- Return type: