需要 Spatial Analyst 许可。
摘要
定义悬崖位置的线要素类列表。
讨论
此对象用于地形 (topo) 转栅格工具。
必须指定所有线要素的方向以使线的左侧位于悬崖的低端,线的右侧位于悬崖的高端。
要显示线各部分的方向,可将符号系统更改为“终点处显示箭头”选项,从而使用显示线方向的箭头符号绘制线的各个部分。
语法
TopoCliff (inFeatures)
参数 | 说明 | 数据类型 |
inFeatures [inFeature,...] | The input feature datasets. | String |
属性
属性 | 说明 | 数据类型 |
inFeatures (读写) | 输入要素数据集。 | String |
代码实例
TopoCliff 示例 1(Python 窗口)
演示如何在 Python 窗口下创建 TopoCliff 类,并通过 TopoToRaster 工具使用该类。
import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
myTopoPtElev = TopoPointElevation([["spots.shp", "spot_meter"], ["spots2.shp", "elev"]])
myTopoContour = TopoContour([["contours.shp", "spot_meter"]])
myTopoBoundary = TopoBoundary(["boundary.shp"])
myTopoLake = TopoLake(["lakes.shp"])
myTopoSink = TopoSink([["sink1.shp", "elevation"], ["sink2.shp", "NONE"]])
myTopoStream = TopoStream(["streams.shp"])
myTopoCliff = TopoCliff(["cliff.shp"])
myTopoCoast = TopoCoast(["coast.shp"])
myTopoExclusion = TopoExclusion(["ignore.shp"])
outTopoToRaster1 = TopoToRaster([myTopoPtElev, myTopoContour, myTopoBoundary, myTopoLake, myTopoSink, myTopoStream, myTopoCliff, myTopoCoast, myTopoExclusion])
outTopoToRaster1.save("C:/sapyexamples/output/ttraster1")
TopoCliff 示例 2(独立脚本)
将 TopoCliff 类作为一项输入参数,通过 TopoToRaster 工具插值成面。
# Name: TopoBoundary_Ex_02.py
# Description: Execute TopoToRaster using all the supported objects.
# Requirements: Spatial Analyst Extension
# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *
# Set environment settings
env.workspace = "C:/sapyexamples/data"
# Create all the supported Objects
myTopoPtElev = TopoPointElevation([["spots.shp", "spot_meter"], ["spots2.shp", "elev"]])
myTopoContour = TopoContour([["contours.shp", "spot_meter"]])
myTopoBoundary = TopoBoundary(["boundary.shp"])
myTopoLake = TopoLake(["lakes.shp"])
myTopoSink = TopoSink([["sink1.shp", "elevation"], ["sink2.shp", "NONE"]])
myTopoStream = TopoStream(["streams.shp"])
myTopoCliff = TopoCliff(["cliff.shp"])
myTopoCoast = TopoCoast(["coast.shp"])
myTopoExclusion = TopoExclusion(["ignore.shp"])
# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")
# Execute TopoToRaster
outTopoToRaster = TopoToRaster([myTopoPtElev, myTopoContour, myTopoBoundary, myTopoLake, myTopoSink, myTopoStream, myTopoCliff, myTopoCoast, myTopoExclusion])
# Save the output
outTopoToRaster.save("C:/sapyexamples/output/ttraster2")