xarray.Dataset.xvec.decode_cf#
- Dataset.xvec.decode_cf()#
Decode geometries stored as CF-compliant arrays to shapely geometries.
- The following invariant is satisfied:
assert ds.xvec.encode_cf().xvec.decode_cf().identical(ds) is True
A
GeometryIndex
is created automatically and CRS information, if available following CF’sgrid_mapping
convention, will be associated with theGeometryIndex
.This function uses
cf_xarray.geometry.decode_geometries
under the hood, and will only work on Datasets.- Returns:
- Dataset