Hi everyone,

as always simple questions may have difficult answers. I just have this:

1) a set of 400 points, for which I need to find the shortest paths between them over a cost raster. Not really the path itself but just the total cost of the path.

2) a cost raster

If I do spatial analyst/shortest path I cannot specify " from" and "to" , just a source. I now choose one location, make it a separate point file and run it with this one as the source, but that in effect leads to calculating the SP for each individual cell of the reference raster (= cost raster with 44 million cells) to that single location (takes 10 minutes for that one alone!). I just need to do that for the 400 cells that matter. Now my code runs 48 hours because of all these superfluous calculations.

So in short: whats the code for the SP from a single point A to a single point B over a cost raster?

thanks for any help on this

cheers,

Dirk

as always simple questions may have difficult answers. I just have this:

1) a set of 400 points, for which I need to find the shortest paths between them over a cost raster. Not really the path itself but just the total cost of the path.

2) a cost raster

If I do spatial analyst/shortest path I cannot specify " from" and "to" , just a source. I now choose one location, make it a separate point file and run it with this one as the source, but that in effect leads to calculating the SP for each individual cell of the reference raster (= cost raster with 44 million cells) to that single location (takes 10 minutes for that one alone!). I just need to do that for the 400 cells that matter. Now my code runs 48 hours because of all these superfluous calculations.

So in short: whats the code for the SP from a single point A to a single point B over a cost raster?

thanks for any help on this

cheers,

Dirk

indeed you need the info of the whole cost raster because you don't know where the shortest path will go. My understanding of what is going on, however, is that the long computing time does not stem from that but from the fact that the SP's from ALL raster cells to the source point are calculated. My result should not be 44 million numbers but just one: the length of the SP from point A to point B. Because I cannot specify a "from" point and a "to" point but just a source the result now is that I get 44 million SP's of which I only need to know one.