TopoBoundary
摘要
Defines a list of feature classes containing polygons that represent the outer boundary of the output raster.
讨论
此对象用于地形 (topo) 转栅格工具。
Cells in the output raster outside this boundary will be NoData. This option can be used for clipping out water areas along coastlines before making the final output raster.
The boundary polygons define the locations within which the calculations will be performed.
语法
TopoBoundary (inFeatures)
参数 | 说明 | 数据类型 |
inFeatures [inFeature,...] |
The input feature datasets. | String |
属性
属性 | 说明 | 数据类型 |
inFeatures (可读写) |
输入要素数据集。 | String |
代码示例
TopoBoundary example 1 (Python window)
Demonstrates how to create a TopoBoundary class and use it in the TopoToRaster tool within the Python window.
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"]) outTopoToRaster1 = TopoToRaster([myTopoPtElev, myTopoContour, myTopoBoundary, myTopoLake, myTopoSink, myTopoStream]) outTopoToRaster1.save("C:/sapyexamples/output/ttraster1")
TopoBoundary example 2 (stand-alone script)
Interpolates a surface with TopoToRaster using the TopoBoundary class as one of the input parameters.
# 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"]) # Check out the ArcGIS Spatial Analyst extension license arcpy.CheckOutExtension("Spatial") # Execute TopoToRaster outTopoToRaster = TopoToRaster([myTopoPtElev, myTopoContour, myTopoBoundary, myTopoLake, myTopoSink, myTopoStream]) # Save the output outTopoToRaster.save("C:/sapyexamples/output/ttraster2")
相关主题
7/10/2012