TopoExclusion (arcpy.sa)
Resumen
Defines a list of feature classes containing polygons that represent areas of data that will be excluded.
Debate
This object is used in the tool Topo To Raster.
This permits removal of elevation data from the interpolation process, typically used over dam walls and bridges, to enable interpolation of the underlying valley structure.
Data typically removed are those associated with features on the actual land surface that can interrupt accurate representation of shape and drainage structure of the true land surface.
Sintaxis
Parámetro | Explicación | Tipo de datos |
inFeatures [inFeature,...] |
The input feature datasets. | String |
Propiedades
Propiedad | Explicación | Tipo de datos |
inFeatures (Lectura y escritura) |
The input feature datasets. | String |
Ejemplo de código
Demonstrates how to create a TopoExclusion 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"])
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")
Interpolates a surface with TopoToRaster using the TopoExclusion 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"])
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")