Dataset.rst accessor#
The Dataset.rst accessor exposes GeoUtils raster methods on xarray.Dataset objects.
It applies operations through DataArray.rst to all compatible raster variables
by default, or to those selected with variables.
For the main raster API reference page, see Raster API.
Below is the full class description specific to Dataset.rst:
- class geoutils.DatasetRasterAccessor(xarray_obj)[source]#
Bases:
objectThis class defines the Xarray accessor ‘rst’ for rasters in a Dataset.
Dataset methods delegate calculations to the DataArray accessor for all recognized raster variables (default) or for selected ones (by passing
variablesto an operation), then combine the results to return a Dataset. Other variables and independent coordinates are preserved. Operations raise an error if their new grid would affect an unselected variable.A raster variable is recognized as a numeric 2D or 3D variable with two spatial dimensions and a CRS. The
compatible_variablesproperty maps names to DataArrays for all variables recognized as rasters.- clip(*args, variables=None, **kwargs)[source]#
Clip rasters in the dataset.
See
DataArray.rst.clip()for shared arguments.
- property compatible_variables: Mapping[str, DataArray]#
Compatible raster variables as Xarray’s mapping of names to DataArrays.
Use keys() to list their names in Dataset order. The mapping shares the original data without loading file-backed values or computing Dask arrays.
- crop(*args, variables=None, **kwargs)[source]#
Crop rasters in the dataset.
See
DataArray.rst.crop()for shared arguments.
- fill_nodata(*args, variables=None, **kwargs)[source]#
Fill raster gaps in the dataset.
See
DataArray.rst.fill_nodata()for shared arguments.
- filter(*args, variables=None, **kwargs)[source]#
Filter raster values in the dataset.
See
DataArray.rst.filter()for shared arguments.- Parameters:
- Return type:
- Returns:
Dataset with filtered values and unchanged coordinates.
- icrop(*args, variables=None, **kwargs)[source]#
Crop raster rows and columns in the dataset.
See
DataArray.rst.icrop()for shared arguments.
- interp_at_points(points, *args, variables=None, **kwargs)[source]#
Interpolate rasters in the dataset at points.
See
DataArray.rst.interp_at_points()for shared arguments.- Parameters:
- Return type:
- Returns:
Dataset with selected raster variables replaced by values on the point dimension.
- interp_points(points, *args, variables=None, **kwargs)[source]#
Interpolate rasters in the dataset at points.
Alias of interp_at_points(). See
DataArray.rst.interp_points()for shared arguments.- Parameters:
- Return type:
- Returns:
Dataset containing interpolated point values.
- reduce_at_points(points, *args, variables=None, **kwargs)[source]#
Reduce raster windows in the dataset at points.
See
DataArray.rst.reduce_at_points()for shared arguments.- Parameters:
- Return type:
- Returns:
Dataset with reduced raster values on the point dimension.
- reproject(*args, variables=None, **kwargs)[source]#
Reproject rasters in the dataset.
See
DataArray.rst.reproject()for shared arguments.- Parameters:
- Return type:
- Returns:
Dataset with the transformed raster variables.
- resample_at_points(points, *args, variables=None, **kwargs)[source]#
Resample rasters in the dataset at points.
See
DataArray.rst.resample_at_points()for shared arguments.- Parameters:
- Return type:
- Returns:
Dataset with selected raster values sampled on the point dimension.
- sieve(*args, variables=None, **kwargs)[source]#
Remove small regions from rasters in the dataset.
See
DataArray.rst.sieve()for shared arguments.
- stats(*args, variables=None, **kwargs)[source]#
Calculate statistics for rasters in the dataset.
Grouping or vector fractional coverage is calculated once for all variables, and statistics are computed at once for all variables with same dimensions.
See
DataArray.rst.stats()for shared arguments.- Parameters:
- Return type:
- Returns:
Named statistics, a grouped table, or a grouped table and masks.
- translate(*args, variables=None, **kwargs)[source]#
Translate raster grids in the dataset.
See
DataArray.rst.translate()for shared arguments.- Parameters:
- Return type:
- Returns:
Dataset containing the translated rasters.
- variogram(*, variables=None, **kwargs)[source]#
Estimate an empirical variogram for each selected raster variable.
Each variable is sampled independently after excluding its missing values. Dask rasters are read in chunks; the returned variograms contain eager NumPy arrays. An integer random_state is reused for each variable, while a supplied generator advances in the selected variable order.
See
DataArray.rst.variogram()for shared arguments.- Parameters:
- Return type:
- Returns:
Dictionary mapping each selected variable name to its Variogram.