HOW TO

# Find the 'start points' of a stream and buffer a certain distance upstream

Last Published: April 25, 2020

## Summary

** Internal Publish Only! This article may contain information that is not intended for external circulation. **

How can the 'start points' of a stream network be identified? Can buffers be generated from these points to a certain distance upstream?The goal here is to locate, for each stream section, the point where the stream merges with the next stream. Once these locations are identified, a buffer can be generated around the stream from the start points to a certain distance upstream.

## Procedure

The solution listed here is a shell indicating one method to get the results desired. The concept of stream ordering is used to help locate the start points.

`Code:/* General operations preparing original data/* Calculate flow direction.FDIR = flowdirection (ELEV)/* Calculate flow accumulationFACC = flowaccumulation (FDIR)/* Generate stream network.  value of 45 to be in/decreased/* according to dataset.STREAMS = con (FACC > 45, 1)/* Gives unique value to each section of the stream.SLINK = streamlink (STREAMS, FDIR)/* Assign each link its minimum elevation.ZMIN = zonalmin (SLINK, ELEV)**************************************THIS STEP ASSUMES A LINEAR NETWORK THATIS ONE CELL WIDE, WHICH MAY NOT BE THECASE. IF THE NETWORK IS 2 CELLS WIDE THEREST OF THE SOLUTION FALLS APART. MORERESEARCH NEEDS TO BE DONE TO DETERMINE AWAY TO DETERMINE THE START CELL./* Finds "start" cells for each stream segment.START_CELL = con ( ELEV eq ZMIN, ZMIN, 0)**************************************/* Assigns all start cells value 1.START_CELL1 = con (START_CELL > 0, 1)/* Determine the stream ordering/* Stream network of elevation values.STR_ELEV = setnull (STREAMS eq 0, ELEV)/* Calculate flow direcion along stream network.STR_FLOWDIR = flowdirection( STR_ELEV)/* Calculate the stream ordering.  Use Shreve order. STR_ORDER = (STREAMS, STR_FLOWDIR, shreve)/* Measure upstream from the start cells and buffer out./* Note that this has been done only for the first order streams.  /* The process will need to be looped to evaluate remaining orders. /* Set the first order streams to value 1.SO1_ORDER = setnull (STR_ORDER ne 1, 1)/* Find the start cells for order 1 streams.SO1_SOURCE = con ( START_CELL1 eq 1 and SO1_ORDER eq 1, 1)/* Measure the distance upstream.SO1_COSTDIS = costdistance (SO1_SOURCE, SO1_ORDER, #, #, 100)/* Set the upstream distance to single value.SO1_LENGTH = con (SO1_COSTDIS ge 0, 1)/* Generate buffers.SO1_BUFF = eucdistance (SO1_LENGTH, #, #, 20)/* Final buffers as single value.SO1_FINAL =  con (SO1_BUFF ge 0, 1)/* For the next stream order,  update the SOx_ORDER line accordingly:/*   ie: SO2_ORDER = setnull (STR_ORDER ne 2, 1)/* In this example, the upstream distance was 100 units, and/* the buffer was 20.  Set these as appropriate.        `

Article ID:000002118

Software:
• ArcMap 8 x

Get help from ArcGIS experts

Contact technical support