Zusammenfassung
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.
Diskussion
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.
Syntax
Resample (raster, {resampling_type}, {input_cellsize}, {output_cellsize})
Parameter | Erläuterung | Datentyp |
raster | The input raster. | Raster |
resampling_type | The method used to change the spatial resolution of the input raster.
(Der Standardwert ist None) | String |
input_cellsize | The cell size of the input raster. (Der Standardwert ist None) | Double |
output_cellsize | The cell size of the output raster. (Der Standardwert ist None) | Double |
Datentyp | Erläuterung |
Raster | The output raster. |
Codebeispiel
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)