pywasp.io.vectormap_to_rastermap

pywasp.io.vectormap_to_rastermap(gdf, res, xmin=None, ymin=None, xmax=None, ymax=None, lctable=None)[source]

Converts a geopandas.GeoDataFrame vectormap object to a xarray.DataArray rastermap object.

Parameters:
  • gdf (geopandas.GeoDataFrame) – vectormap to be coverted

  • res (float) – Resolution of x and y dimensions (dx, dy)

  • xmin, ymin, xmax, ymax (float, optional) – Bounding box values of the output raster map. By default (None), the entire vectormap bounding box is used.

  • lctable (LandCoverTable) – Landcover table specifying the landcover classes and their mappings to roughness and displacement height. Required for ‘landcover’ maps.

Returns:

xarray.DataArray – Rastermap representation of the map