Resumen
Creates a raster object by changing the spatial resolution of the input raster and sets rules for aggregating or interpolating values across the new pixel sizes.
Debate
For more information about how this function works, see the Resample raster function.
The referenced raster dataset for the raster object is temporary. To make it permanent, you can call the raster object's save method.
Sintaxis
Resample (raster, {resampling_type}, {input_cellsize}, {output_cellsize})
Parámetro | Explicación | Tipo de datos |
raster | The input raster. | Raster |
resampling_type | The method used to change the spatial resolution of the input raster.
(El valor predeterminado es None) | String |
input_cellsize | The cell size of the input raster. (El valor predeterminado es None) | Double |
output_cellsize | The cell size of the output raster. (El valor predeterminado es None) | Double |
Tipo de datos | Explicación |
Raster | The output raster. |
Muestra de código
Resamples the input raster from a 1-meter spatial resolution to 3-meter resolution using the NearestNeighbor method.
Import arcpy
resampled_raster = arcpy.sa.Resample("NAIP_1_meter.tif", "NearestNeighbor", 1, 3)