HOW TO
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 accumulation
FACC = 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 THAT
IS ONE CELL WIDE, WHICH MAY NOT BE THE
CASE. IF THE NETWORK IS 2 CELLS WIDE THE
REST OF THE SOLUTION FALLS APART. MORE
RESEARCH NEEDS TO BE DONE TO DETERMINE A
WAY 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
Get help from ArcGIS experts
Download the Esri Support App