hydromt.gis.DataArray.raster.gdal_compliant#

gis.DataArray.raster.gdal_compliant(rename_dims: bool = True, force_sn: bool = False, write_transform: bool = False) DataArray | Dataset#

Update attributes to get GDAL compliant NetCDF files.

Parameters:
  • rename_dims (bool, optional) – If True, rename x_dim and y_dim to standard names depending on the CRS (x/y for projected and lat/lon for geographic).

  • force_sn (bool, optional) – If True, forces the dataset to have South -> North orientation.

  • write_transform (bool, optional) – Whether or not to write the geotransform as an attribute of the ‘spatial_ref’ information coordinate. Writing this can make life easier for GDAL, but it can also cause conflict. Use with caution. By default False.

Returns:

ojb_out – GDAL compliant object

Return type:

xr.Dataset or xr.DataArray