Floating Point—The output raster will use 32-bit floating point, which supports values ranging from -3.402823466e+38 to 3.402823466e+38. This is the default.
Integer—The output raster will use an appropriate integer bit depth. This option will round z-values to the nearest whole number and write an integer to each raster cell value.
String
方法
(可选)
将用于计算像元值的插值方法。
Linear—Applies a distance based weight to the Z of each node in the triangle encompassing the center of a given cell, then sums the weighted values to assign the cell value. This is the default.
Natural Neighbors—Applies an area based weighting scheme that uses Voronoi polygons to determine cell values.
String
采样距离
(可选)
用于定义输出栅格的像元大小的采样方法和距离。
Observations—Defines the number of cells that divide the longest side of the output raster. This method is used by default with the value of 250.
Cell Size—Defines the cell size of the output raster.
FLOAT—The output raster will use 32-bit floating point, which supports values ranging from -3.402823466e+38 to 3.402823466e+38. This is the default.
INT—The output raster will use an appropriate integer bit depth. This option will round z-values to the nearest whole number and write an integer to each raster cell value.
String
method
(可选)
将用于计算像元值的插值方法。
LINEAR—Applies a distance based weight to the Z of each node in the triangle encompassing the center of a given cell, then sums the weighted values to assign the cell value. This is the default.
NATURAL_NEIGHBORS—Applies an area based weighting scheme that uses Voronoi polygons to determine cell values.
String
sample_distance[sampling_method distance,...]
(可选)
用于定义输出栅格的像元大小的采样方法和距离。
OBSERVATIONS—Defines the number of cells that divide the longest side of the output raster. This method is used by default with the value of 250.
CELLSIZE—Defines the cell size of the output raster.
'''*********************************************************************
Name: TerrainToRaster Example
Description: This script demonstrates how to use the
TerrainToRaster tool.
**********************************************************************'''
# Import system modules
import arcpy
# Set environment setting
arcpy.env.workspace = "C:/data"
# Set Local Variables
terrain = "sample.gdb/featuredataset/terrain"
bitType = "INT"
method = "LINEAR"
sampling = "CELLSIZE 10"
pyrLvl = 2.5
outRas = arcpy.CreateUniqueName("terrain_level.img")
# Run TerrainToRaster
arcpy.ddd.TerrainToRaster(terrain, outRas, bitType,
method, sampling, pyrLvl)