pywasp.raster_to_vector
- pywasp.raster_to_vector(da, dz=None, gsize=None, polygons=True)[source]
Convert raster map to vector map
Warning
This function is experimental and its signature may change.
- Parameters:
da (
xarray.DataArray
) – Raster map to be converted, should have a name of “elevation”, “roughness”, or “landcover”.dz (
float
, optional) – Spacing of elevation in z-direction, only for elevation maps, by default 10 mgsize (
int
, optional) – Precalculation grid size can increase on error, by default 1000000as_geopandas (
bool
) – Convert to Geopandas based vector map or keep as _WaspVectorMappolygons (
bool
) – Only relevant for landcover and roughness maps. Whether to convert the file to polygons, default True. If False, opens the file as change lines.
- Returns:
_WaspVectorMap
orgeopandas.GeoDataFrame
– Vector representation of the input raster map.