Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am investigating methods to perform a simple least cost path analysis with gdal. By simple, I mean using the slope of a dem as the only cost factor.

I would prefer to do using the python or .net bindings, but will take anything. Can anyone suggest any good tutorials or the like?

share|improve this question
2  
For analytical questions, perhaps better use a GIS rather than a data format abstraction library... – markusN Jul 1 '12 at 8:12
Out of curiosity, what is the application? It is difficult to think of anything for which the DEM's slope would be a realistic proxy for the cost of travel. Are you sure this is what you need? It would be a pity if, after going to the effort of writing this code, you discovered it did not actually solve your problem! – whuber Jul 1 '12 at 17:42
Slope could be useful as a travel cost if you're modelling a gravity-dependent dispersal model of some sort, though I'd expect some other factors too rather than just slope. – MappaGnosis Jul 2 '12 at 8:45
Also, slope usually shows the maximum slope at each cell, even if the route is not travelling directly downhill or uphill. – Matthew Snape Jul 25 '12 at 20:05

1 Answer

You can use the A* search algorithm using slope as the cost between generated nodes. To see a quick visualization of what that looks like:

A Star Animated

See A* Search Algorithm (Wiki) and Python A* Search Algorithm (SO)

to understand A*.

For a slope map there are options out there - Here is one.

With a slope map (raster) you can get cost values out of it with GDAL.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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