TopoLake

Récapitulatif

Defines a list of polygon feature classes that specify the location of lakes.

Discussion

This object is used in the tool Topo To Raster.

All output raster cells within a lake will be assigned to the minimum elevation value of all cells along the shoreline.

Syntaxe

TopoLake (inFeatures)
ParamètreExplicationType de données
inFeatures
[inFeature,...]

The input feature datasets.

String

Propriétés

PropriétéExplicationType de données
inFeatures
(Lecture et écriture)

The input feature datasets.

String

Exemple de code

TopoLake example 1 (Python window)

Demonstrates how to create a TopoLake 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")
TopoLake example 2 (stand-alone script)

Interpolates a surface with TopoToRaster using the TopoLake 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")

Rubriques connexes


7/10/2012