Distance between features without crossing other features?

1595
10
10-04-2017 03:12 PM
ScottBingo
New Contributor

I am trying to figure out how to find the distance between features of various types and I have the same issue for each.  I am looking at features along the coastline of an island and would like to be able to find the distance to nearest ocean features, but I cannot have the distance measure crossing land to do so.

For example:  I have a polygon that is representative of a depth layer.  I have points along the coast line.  I want to find the closest distance from a each point to the polygon without crossing land.  In some instances the measurement would cross the island to go to the depth on the opposite side, and, if this is indeed the closest area, I need it to skirt the polygon that is the island.

I also have points in the water that are indicative of certain features which I need to find the closest distance to shoreline points without crossing land in the same way.

I have separate shape files for all features, points, and the island coastline.

Thank you.

Edit: an image has been added for reference.  I am trying to find, among other things, the closest distance between the black points on the coastlines and the red polygon (shipping data), the blue polygon (depth contour), and the yellow points without crossing the islands in the center to measure said distances.

0 Kudos
10 Replies
DanPatterson_Retired
MVP Emeritus

image?

0 Kudos
ScottBingo
New Contributor

I've edited the original post with an image.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Scott, this is best done in raster world using.

Cost distance cost path analysis and corridor analysis...

http://desktop.arcgis.com/en/arcmap/latest/tools/spatial-analyst-toolbox/cost-path.htm

http://desktop.arcgis.com/en/arcmap/latest/tools/spatial-analyst-toolbox/creating-the-least-cost-pat...

http://desktop.arcgis.com/en/arcmap/latest/tools/spatial-analyst-toolbox/understanding-cost-distance...

http://desktop.arcgis.com/en/analytics/case-studies/cost-lesson-3-desktop-creating-a-least-cost-path...

tons of other links in the same area

replicating this in vector world is more along the lines of robotics and movement in 2d, although you can emulate parts of it with visibility analysis... but I would recommend the raster approach

PS

you can set the cost of traversing 'water' to 1 and land to a really big number.

If you don't want to get too close to a shore, you buffer (via Euclidean distance or expand) and reclassify buffer zones assigning higher costs to near shore and lesser within the main channel.  This could be a linear relationship (inverse distance to shore as an integer as the cost value for example

ScottBingo
New Contributor

Thanks Dan.

I've been looking at using rasters with Cost Path/Distance and have a question.  From what I see of the tools, the cost path is between two (or a set of?) points and finding the least cost path between.  Is that correct?

In my case, I have start points and am trying to find distance to polygons so it seems I'm missing the path as well as the endpoint.

0 Kudos
DanPatterson_Retired
MVP Emeritus

read the whole process carefully.  You start out with origin(s), from which a cost surface is calculated using the cost raster.  Once that is created, you use the possible destinations (your locations along shore using the cost path analysis, you will get the path back to the origin.  It is a two stage process to get the actual paths

PS this is where the 'optional' backlink grid comes into play... it is only optional if you don't need a full path analysis (go figure)

XanderBakker
Esri Esteemed Contributor

In addition to what Dan Patterson explained; since you would probably not want to navigate in shallow water you would have to exclude not only the islands, but also the areas near to the islands (as you can see in the resulting routes in your image). Although setting the islands (and shallow waters) to a high value would work, setting them to NoData will be the only guarantee that they won't be included in the resulting routes. 

DanPatterson_Retired
MVP Emeritus
0 Kudos
ScottBingo
New Contributor

Alright, I've got a solution that works for me so I'll share it.

My source raster covers the study area that is all zero values except for my start point, which I valued at 1.  This will need to be done for each start point.

My cost raster covers the study area with values of 1, except for non-navigable areas which are given null values.

Using these raster files, I use the cost distance tool to output a distance raster.

I also have a destination raster file of the destination features that I am measuring distance to.  This raster covers the study area with values of zero and the possible end point areas with values of 1.  This will need to be done for each destination type.

Using the raster calculator, the distance raster is multiplied with the destination raster.  The resulting raster contains all the original destinations, except that their 1 values have been replaced with the distance from the origin.

0 Kudos
DanPatterson_Retired
MVP Emeritus

That pretty well sums up cost distance... with the caveat that your locational costs are uniform

0 Kudos