I have global point data of marine species along the coast. I would like to measure the distance between the two closest points but this distance needs to be measured in the sea and not on the land mass. Attach is an image that may explain my point. I am using ArcGIS 10.6.
-
2Possible duplicate of Measure shortest distance around polygon– JimTCommented Aug 20, 2018 at 8:44
-
2Solution in above post is wrong.– FelixIPCommented Aug 20, 2018 at 19:20
-
There's a paper that explains the concept of sea distance using Dijkstras method. Furthermore there's a link here which discusses a similar solution and provides code.– JimTCommented Aug 20, 2018 at 20:34
-
Hi Felix, Is there any tool in ArcGIS that can do this analysis instead of running the script?– Rakhshan RoohiCommented Aug 24, 2018 at 1:08
1 Answer
The following may help. Derive a raster where land contains a NoData value (eg, reclassify). Below, the white area has a raster cell value of "NoData" and this represents land. The yellow point is the origin (or source) feature.
Use the Path Distance tool to derive distance radiating from this origin point. Note how it curves around the NoData cells.
Then use the Cost Back Link tool to derive a backlink surface. This uses the same origin point.
Finally, run the Cost Path as Polyline tool to derive the path that will provide the distance value. Use the second point, your destination, as the feature destination data. The feature class's attribute table will contain the distance value.
You may have to set Environments>ProcessingExtent to ensure your whole area is processed while using the various tools.
-
Thank you very much. Seems like it can solve my problem. I will try and update you. Commented Sep 19, 2018 at 21:39