fmeobjects.FMERasterTools.calculateAspect

FMERasterTools.calculateAspect(raster, parms)

Calculates the aspect (direction of slope) for each selected band of a raster.

Aspect is measured in degrees from 0 to 360, starting clockwise from the north. Each selected input band will be converted to a REAL64 band with output values that represent the aspect. If an input band does not have a nodata value, the output band nodata value will be set to - 1.

Parameters:
  • raster (FMERaster) – The raster object where the bands belong.

  • parms (dict[str, str]) –

    (Optional) Name-value pair representing additional parameters.

    Possible parms are:

    • kFME_CalculateAspect_interpolateNodata
      • Yes or No (Default is No)

      • Whether to calculate values at raster edges and near nodata values. When this is set to No, there will be a one pixel border around the edge of the raster set to the nodata value. Additionally, when any pixel in the 3x3 window used to calculate the aspect value is equal to nodata, the output pixel will also be set to nodata. When this is set to Yes, values around the edge and near nodata values will be estimated by interpolating missing values.

    • kFME_CalculateAspect_algorithm

Return type:

FMERaster

Returns:

The raster after calculating aspect.

Raises:

FMEException – An exception is raised if an error occurred.