fmeobjects.FMERasterTools.clip

FMERasterTools.clip(xMin, yMin, xMax, yMax, raster, parms)

Performs clipping on a raster.

The xMin, yMin, xMax, and yMax parameters specify the extents in ground units to which the raster will be clipped.

If the extents do not intersect the raster, exception will be raised.

If the extents align with or are larger than the raster extents, no processing will occur.

Parameters:
  • xMin (int) – Minimum value of x.

  • yMin (int) – Minimum value of y.

  • xMax (int) – Maximum value of x.

  • yMax (int) – Maximum value of y.

  • raster (FMERaster) – Raster object to be clipped.

  • parms (dict[str, str]) – (Optional) Name-value pair representing additional parameters.

Possible parms are :

kFME_Clip_preserveExtents

  • Yes or No (Default is No)

  • Specifies whether to preserve the extents of the input raster. If No, then the raster will be reduced to the specified extents. If Yes, the raster’s extents will not be modified, and areas outside the specified clip extents but within the input raster’s extents will be filled with nodata.

Return type:

FMERaster

Returns:

The raster after clipping.

Raises:

FMEException – An exception is raised if an error occurred.