src.interpolation package

Submodules

src.interpolation.flatten module

class src.interpolation.flatten.Flatten

Bases: object

static patch(res, raster)

Function that patches in any holes that may have unwillingly occurred in the process. Checks if a raster value is NO_DATA, then uses the median of the 8 surrounding cells to give the missing cell a value. Only uses value of surrounding cell if that is not NO_DATA.

Parameters
  • res – List representing the resolution of the raster [x-res, y-res]

  • raster – Numpy array holding the raster value [x, y, z]

Returns

Raster with all NO_DATA holes patched

water(origin, res, raster, tin, extents, stage)

Function that flattens the water bodies that are present within the specified raster. Uses all local polygons in shapefile format that are available in the specified folder in the config, theoretically not limited to water. Retrieves the polygons within the bounding box of the raster to interpolate the median value for this polygon. Then overlays these values in the correct position in the raster to create flattened areas on the raster.

Parameters
  • origin – List containing the coordinates of the top left corner of the raster

  • res – List containing the x and y resolution of the raster

  • raster – Numpy array containing the content of the raster (x, y, z)

  • tin – startin.DT() object containing all relevant LAS points for interpolating values of polygons

  • extents – List containing the extents of the raster as [[minx, maxx], [miny, maxy]]

Returns

Numpy array containing raster with flattened areas where polygons were found

src.interpolation.interpolation module

class src.interpolation.interpolation.Interpolation(input_tile: src.tile.Tile, result_type: str)

Bases: object

interpolate()

Module contents