I'm working in least-cost paths. I used r.walk to create cost maps. I used SAGA least-cost path routine to create routes from several points to the cost-map center.

Now I need to calculate the travel time of these routes. How I can do it?

1 Answer 1


So if I understand correctly your output is a route consisting of raster cells?

You could either calculate the length of these raster cells by using the cell size of the raster cells.

Or depending on how your data looks you could try to use r.to.vect and convert your raster cells to lines. Please read the documentation of possible additional steps such as thinning and cleaning of the lines. https://grass.osgeo.org/grass78/manuals/r.to.vect.html

  • No the output I have are shapes from the starting point of the cost maps to several arrival points. As I have the cost raster from r.walk I ghess it should be a way to have the travel time of eack track according to the cost map. Isn't it?
    – Roger
    Mar 23, 2020 at 14:14
  • Sorry if this is not clear to me but these shapes already took into account the cost in the least-cost path creation. The output should be a shapes list of points and of profile lines. If the length of a profile is given ( or calculated by a simple field calculator $length), then the travel time is a matter of defining a travel speed?
    – MarcM
    Mar 26, 2020 at 9:23

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.