I am trying to find the least-cost path between 2 points. The problem I am having is that if I use point A as source and point B as destination, I get a value, but when I do the opposite i.e., use point B as source and point A as destination I get another value for the least-cost path. I need to have the same distance whatever source or destination I am using; is that possible? Is there a way to ask ArcGIS to find the least-cost path that would result in the same distance whatever the source and destination as long as I am using the same two points? thanks

  • 2
    (1) Which functionality are you using? CostDistance or PathDistance? (2) How different are the results? (You can expect slight differences due to floating point roundoff error.)
    – whuber
    Commented Jan 6, 2014 at 14:33

1 Answer 1


If your points A and B are point features, there could be a snapping issue when (internally) converting to raster. It is safer to use a raster as input, making sure that the "snap raster" is activated.

On the other hand, it is theoretically possible to have two (or more) "best path", so you would need to add additional constraint to chose your "preferred one".

  • If two "shortest paths" returned by software have different lengths, then isn't the one with the longer length an error?
    – whuber
    Commented Jan 6, 2014 at 15:29
  • @whuber this is true for distance, but we are talking about cost weighted distance if I understand well. So you can have two best paths with different length, and the shortest is not necessarily the best. (e.g. swimming accross a river vs using the bridge a bit further)
    – radouxju
    Commented Jan 6, 2014 at 19:00
  • 1
    In a costdistance context "shortest" is irrelevant, so in your original (now edited) answer I understood "shortest" in the sense of "least cost." Although it is possible--indeed common--to have multiple least-cost paths, by definition they all have the same cost.
    – whuber
    Commented Jan 6, 2014 at 19:12
  • Here you can find something about the possibility of mentioned many "best" paths gis.stackexchange.com/questions/178156/…
    – EikeMike
    Commented Apr 26, 2016 at 20:09

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.