xarray.DataArray.xvec.encode_wkb#
- DataArray.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
xprojpackage. Additionally, thewkb_encoded_geometryattribute equal toTrueis added to avoid ambiguity during the decoding step.- Returns:
- xr.DataArray or xr.Dataset
A new object with geometries encoded in WKB format.