This is my first time using the distance tools, and I must be doing something wrong, because the output doesn't look as I expect it to. That said, I can't seem to figure out why. Here is what I'm doing:
Aim: To determine the shortest path from a nest to marine foraging locations for an individual bird. The bird is restricted to traveling along water only (i.e., freshwater and ocean).
How I'm doing it: After reading multiple entries in this and other forums, I decided the best way to do this was to use a cost distance approach: - I created a raster where all water = 1 and where all land = NoData. This is my cost raster. I have also ensured that all nests intersect a value cell on the raster. - I then used the above as input to the cost distance tool, with the nest site as the feature source data, creating cost distance and backlink rasters that I then used as input in the cost path tool, with foraging locations as the feature destination data. The output is supposed to be the least cost path from the nest to each foraging location; since all water cells have equal cost, this should thus represent the shortest path, right?
The problem: The paths that are being output are not the shortest - I can easily look at the map and find routes that are much shorter. I've attached an image to illustrate this. The path along the first inlet (north-south) looks okay, but after that, the paths are questionable, especially upon entering the bay where all the foraging locations are. I've also attached an image of the backlink raster, which looks very odd. I understand the information provided in the backlink, but what isn't making sense is the "next" cell it is directing to. Why is the raster so "patchy" (once out of the n-s inlet)?
Additional note: I'm actually performing this analysis using Model Builder, iterating through several nests, with different selections of foraging locations based on the nest value; however, I obtain the same output from both the model and from performing the analysis manually on a single nest, so the problem is not in the model.
Any help would be much appreciated. My apologies if anything above is not clear.
I reproduced your analysis and ended up with a similar result... a less than optimal "shortest path" to the destination cells. In the defense of the ESRI algorithm, "shortest path" is sort of relative in a raster environment. For example, when traveling diagonaly, you are forced traverse from cell to cell in an often "stairstep" sort of path instead of a more logical straight line like an actual animal might travel along. Some other GIS programs (IDRISI) make use of hexagonal cells, which helps to minimize the problem I think.
I reproduced your analysis and ended up with a similar result... a less than optimal "shortest path" to the destination cells... sort of. In the defense of the ESRI algorithm, "shortest path" is sort of relative in a raster environment. For example, when traveling diagonaly, you are forced traverse from cell to cell in an often "stairstep" sort of path instead of a more logical straight line like an actual animal might travel along. Some other GIS programs (IDRISI) make use of hexagonal cells, which helps to minimize the problem I think. All in all, all these algorithms are only models and approximations, which are limited by a number of factors (square cells being one of them).
Thanks for taking the time to reproduce my analysis and examine the result. I see what you mean; however, based on the backlink, the animal can travel diagonally across a given cell (value 2 for example). That said, the animal cannot travel diagonally across the entire bay (the most direct route), as this would imply "cutting across corners" of grid cells - which is not possible. In other words, diagonal travel is from corner to corner of a single grid cell only, and not from edge to edge.
So I guess this is the shortest path - in a square raster cell environment. Do you know of any other approaches that may be more realistic?
Nothing out of the box comes to mind... Although there are lots of tantalizing possibilities that would require programming and a lot of R&D...
I've been messing around with Network Analyst quite a bit lately.
What if you had a "Network" of lines that connected all the adjacent cell centers (or maybe all the cell centers within a certain radius). And your birds used Network analyst to find the optimum route to their food spot? Kick out the routes that cross land.
I'm currently trying to create a network that will allow 16-direction movement....but as you can imagine, it is taking a very long time! I may have to settle for the 8-direction movement imposed by the raster. It would be useful if I could at least quantify the error associated with this (i.e., the % difference between a path following 8-direction movement and one through continuous space). Hmmm...something to ponder!