in3Utils.geoTrans.prepareArea
- prepareArea(line, dem, radius, thList='', combine=True, checkOverlap=True)[source]
convert shape file polygon to raster
- Parameters
line (dict) – line dictionary
dem (dict) – dictionary with dem information
radius (float) – include all cells which center is in the polygon or close enough
thList (list) – thickness values for all features in the line dictionary
combine (Boolean) – if True sum up the rasters in the area list to return only 1 raster if False return the list of distinct area rasters this option works only if thList is not empty
checkOverlap (Boolean) – if True check if features are overlapping and return an error if it is the case if False check if features are overlapping and average the value for overlapping areas (Attention: if combine is set to False, you do not see the result of the averaging since the list of raters was not affected by the averaging step)
- Returns
contains either
Raster: 2D numpy array, raster of the area (returned if relRHlist is empty OR if combine is set
to True) - RasterList: list, list of 2D numpy array rasters (returned if relRHlist is not empty AND if combine is set to False)
- Return type
updates the line dictionary with the rasterData