Synthèse
Creates pixels on a raster object where holes exist in the elevation.
Discussion
For more information about how this function works, see Elevation Void Fill 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
ElevationVoidFill (raster, max_void_width)
Paramètre | Explication | Type de données |
raster | The input elevation raster. | Raster |
max_void_width | The maximum void width value is used to specify the largest size of a void to be filled. If the width or height of the bounding box around the void is larger than the maximum void width value, the void is not filled. The units of this parameter are the same as the units used in the data's spatial reference system. If this parameter is blank or has a value of 0, no maximum width will be used, and all voids will be filled. A value of -1 means that no void filling will occur. (La valeur par défaut est 0) | Integer |
Type de données | Explication |
Raster | The output raster. |
Exemple de code
from arcpy.sa import *
out_evf_raster = ElevationVoidFill("elevation.tif", 0)
out_evf_raster.save("C:/arcpyExamples/outputs/raster_evf.tif")
# Import system modules
import arcpy
from arcpy.sa import *
# Set the analysis environments
arcpy.env.workspace = "C:/arcpyExamples/data"
# Define input parameters
in_raster = "elevation.tif"
max_void_width = 0
# Execute the ElevationVoidFill function
out_evf_raster = ElevationVoidFill(in_raster, max_void_width)
# Save output
out_evf_raster.save("C:/arcpyExamples/outputs/raster_evf.tif")
Rubriques connexes
Vous avez un commentaire à formuler concernant cette rubrique ?