cf_xarray.geometry.encode_geometries

cf_xarray.geometry.encode_geometries(ds)[source]

Encode any discovered geometry variables using the CF conventions.

Practically speaking, geometry variables are numpy object arrays where the first element is a shapely geometry.

Parameters:
dsDataset

Dataset containing at least one geometry variable.

Returns:
Dataset

Where all geometry variables are encoded. The information in a single geometry variable in the input is split across multiple variables in the returned Dataset following the CF conventions.