I have a point feature and am interested in finding the least cost path between two points in the feature using a raster as the cost surface. I first calculate the cost distance and cost backlink via the CostDistance tool. I then use the CostPath tool to get the actual path and then look at the PATHCOST attribute for the raster cell's with value 3.

What I do not understand is if I run the CostPath tool with output workspace pointed at a GDB, the PATHCOST comes out as expected. When I run the CostPath tool using in_memory (this is actually part of a script) as the output workspace, the PATHCOST values always come out to zero. I've debugged this until I was able to pintpoint this as culprit, happening in ArcMap as well, not just the script environment.

  • 3 years later I have the same problem. unfortunately nobody answered... – Christoph Jul 26 '16 at 13:00
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review – ArMoraer Jul 26 '16 at 13:36

This is a documented bug: Bug BUG-000083280 Using in_memory workspaces causes the PATHCOST field to result in zero values.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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