fmeobjects.FMERasterTools.resampleBySpacing

FMERasterTools.resampleBySpacing(xSpacing, ySpacing, interpolation, raster, parms)

Performs resampling (both upsampling and downsampling) on a raster using ‘xSpacing’ and ‘ySpacing’.

The X / Y spacing in ground units dictates the desired size of the raster after processing. Valid input values are positive floating point numbers. The new number of rows columns of the raster will be determined based on the input spacing and the extents of the raster in ground coordinates.

Parameters:

Possible parms are :

kFME_Resample_snapOffsetX

  • Valid arguments for this option are floating point values. If specified, the x origin of the resampled raster is adjusted by the provided value. The sample locations used when determining the data values of the output raster will also be offset by this value. This is useful when a raster needs to be accurately aligned to a reference grid. In order to more quickly adjust a raster origin without modifying data values, use the offset function.

kFME_Resample_snapOffsetY

  • This parameter is identical to resample_SnapOffsetX, except that it adjusts the y origin.

Return type:

FMERaster

Returns:

The raster after resampling.

Raises:

FMEException – An exception is raised if an error occurred.