hydromt.DataArray.vector.update_geometry#

DataArray.vector.update_geometry(geometry: GeoSeries = None, geom_format: str = None, x_name: str = None, y_name: str = None, geom_name: str = None, replace: bool = True) Dataset | DataArray#

Update the geometry in the Dataset/Array with a new geometry.

if provided or use that, otherwise 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