pywasp.io.rastermap_to_vectormap

pywasp.io.rastermap_to_vectormap(da, dz=None, gsize=None, lctable=None, as_geopandas=True)[source]

Convert raster map to vector map

Parameters:
  • da (xarray.DataArray) – Raster map to be converted, should have a name of “elevation”, “roughness”, or “landcover”. This is set by default when using “read_raster_map”

  • dz (float, optional) – Spacing of elevation in z-direction, only for elevation maps, by default 10 m

  • gsize (int, optional) – Precalculation grid size can increase on error, by default 1000000

  • lctable (windkit.LandCoverTable) – Landcover table, required if converting landcover rastermap

  • as_geopandas (bool) – Convert to Geopandas based vectormap or keep as WaspVectorMap

Returns:

WaspVectorMap or geopandas.GeoDataFrame – Vector representation of the input rastermap.