com1DFA.DFAtools.getAreaMesh

getAreaMesh(dem, num)[source]

Get area of grid cells.

Parameters
  • dem dict updated with

    Nx: 2D numpy array

    x component of the normal vector field on grid points

    Ny: 2D numpy array

    y component of the normal vector field on grid points

    Nz: 2D numpy array

    z component of the normal vector field on grid points

    headerdict

    dem header (cellsize)

  • num (int) – chose between 4, 6 or 8 (using then 4, 6 or 8 triangles) or 1 to use the simple cross product method (with the diagonals)

Returns

areaRaster: 2D numpy array

real area of grid cells

Return type

dem dict updated with