com1DFA.com1DFA.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 overlaping and return an error if it is the case if False check if features are overlaping and average the value for overlaping areas

Returns

updates the line dictionary with the rasterData

Raster2D numpy array

raster of the area (returned if relRHlist is empty OR if combine is set to True)

or RasterList : list

list of 2D numpy array rasters (returned if relRHlist is not empty AND if combine is set to True)

Return type

Either