hydromt.Dataset.vector.update_geometry#
- Dataset.vector.update_geometry(geometry: Optional[GeoSeries] = None, geom_format: Optional[str] = None, x_name: Optional[str] = None, y_name: Optional[str] = None, geom_name: Optional[str] = None, replace: bool = True)#
Update the geometry in the Dataset/Array with a new geometry (if provided) or update the current geometry to a new geometry format.
- Parameters:
geometry (GeoSeries, optional) – New geometry, by default None
geom_format ({'xy', 'wkt', 'geom'}) – Geometry format
x_name (str, optional) – The name of the x, y and geometry coordinate.
y_name (str, optional) – The name of the x, y and geometry coordinate.
geom_name (str, optional) – The name of the x, y and geometry coordinate.
replace (bool, optional) – Whether to replace the current geometry, by default True
- Returns:
Update GeoDataset/Array
- Return type:
Dataset, DataArray