Distance of ocean path problem

1945
2
12-25-2012 10:57 PM
by Anonymous User
Not applicable
Original User: asancheti

Hello Everyone,

I have a problem which I am having trouble figuring out a solution for. I think the point I'm stuck on is relatively simply compared to the problem itself.

Problem: I have a series of lat-long points which span the entire planet, these are about 200 points. I want to find the distance between every one of these points and every other point. So I have 208! permutations. The tricky part is that all of these points are in an ocean and the distance needs to be the distance of the shortest water only path between the two points.

I think I have this essentially figured out by adapting instructions from

http://www.biology.ualberta.ca/gis/uploads/instructions/AVMeasureNonLinearDistances.pdf

into the current ArcMap and automating using a python script (attached). As I understand it (my first GIS problem so be easy on me) you use an ocean raster to create a cost allocation raster and a backlink raster (whatever that is) on a particular source point. Then for each other point use costPath on the previously made raster layers, convert this costpath raster to a polyline and then calculate the length of it.

All this seems to be fine and indeed kind-of works except that the process does not take into account that the world is a sphere. In an extreme case two points that are really next to each other are calculated as the entire earth's circumference apart. Please see attached picture as a visual on what I mean, it is a screenshot of the output of the cost allocation raster process on the highlighted point you can see that the yellow circle indicating a small distance should extend east and wrap to the left side of the layer.

Does any one have any suggestions/help for me?

Thank you.

[ATTACH=CONFIG]20187[/ATTACH]

[ATTACH=CONFIG]20186[/ATTACH]
0 Kudos
2 Replies
by Anonymous User
Not applicable
Original User: asancheti

Shameless self-bump.

Anyone have any ideas?
0 Kudos
JohnPorter
New Contributor II
I've been doing a similar analysis - but not at your scale!  As you did, I used Python to create a cost accumulation raster and iterated through my list of possible source points.  A difference from what you did, was that I used "extract points from raster" to extract the "cost" of getting to each of my destination points. That should work for you if you set the cost of traversing each cell for ocean to be 1 and some really, really high number (or maybe nodata) for land.  It saves having to generate the backlink raster.

One ugly, but possible, solution for your "world is round" problem would be to "cut the world in half" - using two meridians that are 180 apart.  So you would run the analysis using 0-deg as a cutpoint (Raster goes from 0 to 360), then run it again using 180 degrees as a cutpoint (Raster goes from -180 to +180). You would get a cost-distance score from each of those rasters and the minimum of the two scores for a given destination point is the minimum cost.    It is possible (but very unlikely in my thinking, given your cost layer) that you might need some additional cutlines to guarantee that each point and it's nearest source are not on either side of an edge.... (hard to imagine that the shortest distance would be 1/2 way around the world) but I think it could happen if the cost layer were more complex....

Hope that helps!