hydromt.DataArray.vector.from_netcdf#

static DataArray.vector.from_netcdf(path: str | DataArray, parse_geom: bool = True, geom_name: str = None, x_name: str = None, y_name: str = None, crs: int = None, **kwargs) DataArray#

Read netcdf file or convert xr.DataArray as GeoDataArray.

Parameters:
  • path (str, xr.DataArray) – path to file

  • parse_geom (bool, optional) – Create geometry objects in place of existing x, y or wkt geometry coordinates.

  • 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.

  • crs (int, optional) – EPSG of the data. If not given, it will be inferred.

  • **kwargs – passed to xarray.open_dataarray()

Returns:

DataArray with vector as accessor

Return type:

xr.DataArray