Synthèse
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.
Discussion
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.
Syntaxe
Resample (raster, {resampling_type}, {input_cellsize}, {output_cellsize})
Paramètre | Explication | Type de données |
raster | The input raster. | Raster |
resampling_type | The method used to change the spatial resolution of the input raster.
(La valeur par défaut est None) | String |
input_cellsize | The cell size of the input raster. (La valeur par défaut est None) | Double |
output_cellsize | The cell size of the output raster. (La valeur par défaut est None) | Double |
Type de données | Explication |
Raster | The output raster. |
Exemple de code
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)
Vous avez un commentaire à formuler concernant cette rubrique ?