Tools that honor the Resampling Method environment interpolate pixel values while transforming your raster dataset. This is used when the input and output do not line up exactly, when the pixel size changes, when the data is shifted, or a combination of these.
- The nearest neighbor option should be used for categorical data, since no new values are created.
- The bilinear and cubic options should not be used with categorical data, but they produce better-looking outputs for continuous data.
- Resampling Method—Choose which resampling method to use when creating the output.
- Nearest—Performs a nearest neighbor assignment and is the fastest of the interpolation methods. It is used primarily for discrete data, such as a land-use classification, since it will not change the values of the cells. The maximum spatial error will be one-half the cell size. This is the default.
- Bilinear—Performs a bilinear interpolation and determines the new value of a cell based on a weighted distance average of the four nearest input cell centers. It is useful for continuous data and will cause some smoothing of the data..
- Cubic—Performs a cubic convolution and determines the new value of a cell based on fitting a smooth curve through the 16 nearest input cell centers. It is appropriate for continuous data, although it may result in the output raster containing values outside the range of the input raster. If this is unacceptable, use Bilinear instead. The output from cubic convolution is geometrically less distorted than the raster achieved by running the nearest neighbor resampling algorithm. The disadvantage of the Cubic option is that it requires more processing time.
arcpy.env.resamplingMethod = "interpolation_type"
The following resampling techniques can be used:
import arcpy # Set the resampling method environment to bilinear interpolation arcpy.env.resamplingMethod = "BILINEAR"