Find Downstream Path from a Location

The ArcGIS API for Python packs a set of tools to discover features that pass a number of criteria that you specify. These tools are typically used for site selection, view shed analysis, and downstream analysis, where the objective is to find places that satisfy multiple criteria.

Trace downstream

The Trace Downstream tool determines the downstream flow paths from specified input locations. This tool uses the world elevation service to determine the downstream flow path of fluids (like drain or storm water) from a specified point of interest. This tool is particularly useful in predicting the course of flash floods, dispersion of water-borne pollutants, etc.

In the example below, we observe how this tool can be used to calculate the flow path of snow melt in Southern California mountains.

# connect to GIS
from arcgis.gis import GIS
gis = GIS(profile="your_online_profile")

Map starting point location

search_result = gis.content.search("Big bear", "feature collection", max_items=1)
bigbear_item = search_result[0]
bigbear_item
Big Bear Lake
Feature Collection layer created from Map note.Feature Collection by api_data_owner
Last Modified: August 01, 2023
0 comments, 17 views
map1 = gis.map("Big bear, California")
map1

big-bear-trace.png

map1.content.add(bigbear_item)

Run the Trace Analysis

# create a feature collection to represent big bear from the item
bigbear_fc = bigbear_item.layers[3]

# import the find_locations sub module
from arcgis.features import find_locations
trace1 = find_locations.trace_downstream(bigbear_fc)
{"cost": 0}

Add Trace to the Map

map1.content.add(trace1)

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.