TopoStream

Available with Spatial Analyst license.

Summary

Defines a list of line feature classes of stream locations.

Discussion

This object is used in the tool Topo To Raster.

All lines must be oriented to point downstream.

The feature class should only contain single line streams.

To display the direction of the line sections, change the symbology to include an arrow at the end. This will draw the line sections with an arrow symbol showing the line directions.

Syntax

 TopoStream (inFeatures)
ParameterExplanationData Type
inFeatures
[inFeature,...]

The input feature datasets.

String

Properties

PropertyExplanationData Type
inFeatures
(Read and Write)

The input feature datasets.

String

Code sample

TopoStream example 1 (Python window)

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

Interpolates a surface with the TopoToRaster tool using the TopoStream 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"])
# Execute TopoToRaster
outTopoToRaster = TopoToRaster([myTopoPtElev, myTopoContour, myTopoBoundary, myTopoLake, myTopoSink, myTopoStream])
# Save the output 
outTopoToRaster.save("C:/sapyexamples/output/ttraster2")

Related topics