Exercise 8. HDDS_Longest Flow Length

Juling Bao

Dept of Civil Engineering
University of Texas at Austin

Spring Semester 1997

This script is to get the longest flow length for a new delineated watershed and add the longest flow length value to the atrribute table of the watershed. The procedure to get longest flow length is
  • get fdr grid of the new delineated watershed.
  • get a grid of an upstream flow length
  • get a grid of an downstream flow length
  • get a grid of summation of the upstream flow length and downstream flow length.
    The maximum value of this VAT of this grid is the longest flow path length.

    Here is the script called hdds.length.

    The following sentence were used on this script. L1 = grdsub.FlowLength(NIL,false) , L2 = grdsub.FlowLength(NIL, true), L1.buildVat, L2.buildVat, L1=L1.int, L2=L2.int, L =L1+ L2, grd=Gthm.GetGrid, grdsub=grd.ExtractByPolygon(Poly, Prj.MakeNull, false), gsubthm=gtheme.make(grdsub).

    Here is the project window running this script.


    Go to Spatial Hydrology Seminar's Home Page