I need to find least cost path between two points inside a river polygon. The least cost path criteria is water flow direction, I need to follow the water flow to waste as little energy as possible.

I found out that flow direction maps exist in ArcGIS, and I've created something similar for QGIS.The blue lines are flow direction lines. And red line is a direction between start and end points.

Now I want to use Least cost path plugin to calculate the shortest path. But I don't know how to do it. Maybe someone has encountered such a problem or has any ideas? I'm new in QGIS and geographic and I looked for ways but found nothing at all.

enter image description here

  • Such path exists only if point downstream sits on a flow path from upper point.
    – FelixIP
    Feb 4 at 18:13
  • But what's if it would be not ideal path? I think that the Fastest path (point to point) could be helpful if I could calculate speed and direction fields
    – redhat
    Feb 4 at 19:30
  • Wouldn't you need a flow accumulation surface for this? grass.osgeo.org/grass83/manuals/r.flow.html
    – GBG
    Feb 5 at 15:35
  • I don't understand what your image is showing. That's not what I'd think of when someone said a flow direction map Feb 19 at 1:11
  • @Tom Brennan Is it possible to create a flow map in QGIS or is this only for ArcGIS? I don't have a map and I try to create something similar but I don't how to use it, how to extract information from it
    – redhat
    Feb 19 at 17:04

1 Answer 1


You may need to break your original question down into separate questions.

Below is is what I would call a flow direction map. It's based off a raster DEM and each pixel has a flow direction in one of the 8 primary directions, using values from 1-128 (2^x). The raster is the actual flow direction map, the arrows are just for visualisation purposes.

This one was generated using Whitebox Tools D8Pointer algorithm. There are also SAGA tools that will produce flow direction eg Catchment Area has a Channel Direction option.

enter image description here

A flow direction map like this can be used as part of a least cost path analysis. It may be worth reading the information on the CostDistance and CostPathway tools in Whitebox Tools: https://www.whiteboxgeo.com/manual/wbt_book/available_tools/gis_analysis_distance_tools.html#costdistance

They may be helpful in establishing what input data you need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.