pywasp.wasp.TopographyMap#

class pywasp.wasp.TopographyMap(elev_map, rou_map, lctable=None, external_roughness=None, check_errors=True, obstacle_map=None)[source]#

Class for topography maps

This is a helper class that allows the calculation of roughness and elevation roses or site effects at specific points.

Parameters:
  • elev_map (gpd.GeoDataFrame or xarray.DataArray) – Elevation map

  • rou_map (gpd.GeoDataFrame) – Landcover or roughness map

  • lctable (wk.LandCoverTable) – Landcover table that specifies the landcover properties in case the rou_map only has landcover

  • external_roughness (None or float) – Only relevant when using a polygon rou_map. The external roughness specifies the roughness outside areas specified by the polygons. If None, the last lines spanning all polygons are removed and the last encountered polygon is valid infinitely in upwind direction.

  • check_errors (bool) – If True, check for errors in the rou_map. If False, skip the error check. Default is True.

  • obstacle_map (gpd.GeoDataFrame or None) – Optional obstacle map of (multi)polygons, e.g. buildings or tree rows, in the same projection as the elevation map. The height column gives the obstacle height in m above ground (> 0), the optional porosity column the porosity between 0 (solid) and 1 (fully porous), 0 if omitted. Obstacles must be valid polygons and must not overlap, but they may touch; overlaps below 1% of the smaller obstacle’s area are accepted. Locations inside an obstacle and below its height get NaN obstacle speedups, with a warning.

Notes

Multi-part gpd.GeoDataFrame are always converted to single-part GeoDataFrames.

Methods

__init__(elev_map, rou_map[, lctable, ...])

get_elev_rose(output_locs[, n_sectors, conf])

Create elevation rose for a set of output locations from a given map

get_rou_rose(output_locs[, n_sectors, conf, ...])

Create a roughness rose xarray object for all points

get_site_effects(output_locs[, conf, n_sectors])

Calculate speedups at all points provided

get_site_effects_rose(elev_rose, rou_rose, hgts)

Calculate speed ups, and reweight the significant land fraction

load(filename)

Load a TopographyMap from a zip file.

save(filename)

Save a TopographyMap to a zip file.

Attributes

elev_map

The elevation map, validated at construction time.

obstacle_map

The obstacle map, validated at construction time.