How to calculate the longest flow path in GRASS GIS?

How to calculate the longest flow path in GRASS GIS?

Trace flow directions from the headwater points to calculate the longest flow path in vector format. The output vector map ( path) includes the longest flow path, but it passes through the outlet and flows beyond the watershed. We need to split the path at the outlet first and select only the upstream segment within the watershed.

Which is the longest flow path in vector format?

Now, lfp is the longest flow path raster map. Simply converting the lfp raster map to vector won’t produce the correct vector map because of this issue. To properly trace the longest flow path in vector format, we need to find the headwater raster cells and start tracing flow directions from there.

How to calculate the longest flow path in FLS?

Those cells along the watershed divide get assigned 0. These two raster maps have the same maximum value at the outlet cell in FLUS and the upstream-most cell on the longest flow path (LFP) in FLDS. If we add both maps, cells on the output map will have the same maximum value greater than non-LFP cells and we use that fact to calculate LFP.

How is the flow length of a pixel determined?

This distance is measured along the direction of flow, not “as the crow flies”. Definition (GIS): In GIS, the flow length of an arbitrary pixel is determined by summing the incremental distances from center-to-center of each pixel along the flow path from the selected pixel to the outlet pixel. The flow length assigned to the outlet pixel is zero.

How is an output flowline generated in r.flow?

Output flowline is generated downhill. The line segments of flowline vectors have endpoints on edges of a grid formed by drawing imaginary lines through the centers of the cells in the elevation map. Flowlines are generated from each cell downhill by default; they can be generated uphill using the flag -u.

How to assign IDs in r.accumulate-grass?

Assigning IDs also requires id_column option to specify the output column name for the IDs in the longest_flow_path vector map. The outlet_id_column specifies a column in the outlet vector map that contains unique IDs to be copied over to the id_column column in the output map.

How is r.accumulate different from r.watershed?

Unlike r.watershed, r.accumulate does not require elevation data to calculate weighted flow accumulation. Instead, this module only uses a flow direction map to trace and accumulate the amount of flow draining through and including each cell.