xarray.Dataset.xvec.encode_wkb#
- Dataset.xvec.encode_wkb()#
Encode geometries to Well-Known Binary (WKB) format.
This method converts all geometry coordinates and data variables in the DataArray or Dataset to WKB format. CRS information is stored in the attributes of the encoded geometries as PROJJSON. CRS information on variable geometry is assumed to be stored using the
xproj
package. Additionally, thewkb_encoded_geometry
attribute equal toTrue
is added to avoid ambiguity during the decoding step.- Returns:
- xr.DataArray or xr.Dataset
A new object with geometries encoded in WKB format.