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—Calculates cell values by applying linear interpolation to the TIN triangles. This is the default.
Natural Neighbors—Calculates cell values by using natural neighbors interpolation of TIN triangles
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.
String
Z 因子
(可选)
Z 值将乘上的系数。 此值通常用于转换 z 线性单位来匹配 x,y 线性单位。 默认值为 1,此时高程值保持不变。 如果输入表面的空间参考具有已指定线性单位的 z 基准面,则此参数不可用。
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—Calculates cell values by applying linear interpolation to the TIN triangles. This is the default.
NATURAL_NEIGHBORS—Calculates cell values by using natural neighbors interpolation of TIN triangles
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.
String
z_factor
(可选)
Z 值将乘上的系数。 此值通常用于转换 z 线性单位来匹配 x,y 线性单位。 默认值为 1,此时高程值保持不变。 如果输入表面的空间参考具有已指定线性单位的 z 基准面,则此参数不可用。
'''******************************************************************
Name: TinRaster Example
Description: This script demonstrates how to use the
TinRaster tool to create rasters from
each TIN in the target workspace.
******************************************************************'''
# Import system modules
import arcpy
# Set environment setting
arcpy.env.workspace = "C:/data"
# Set Local Variables
dataType = "INT"
method = "NATURAL_NEIGHBORS"
sampling = "CELLSIZE 10"
zfactor = "1"
# Create list of TINs
TINList = arcpy.ListDatasets("*", "Tin")
# Verify the presence of TINs in the list
if TINList:
# Iterate through the list of TINs
for dataset in TINList:
# Define the name of the output file
outRaster = "{0}_natural.img".format(dataset)
# Run TinRaster
arcpy.ddd.TinRaster(dataset, outRaster, dataType,
method, sampling, zfactor)
print("Finished.")
else:
print("There are no TIN(s) in {0}.".format(env.workspace))