I have a global grid of points in the ocean and need to calculate the distance to and identify the closest 10 polygons along the coastline for the entire world while also avoiding crossing land.
For example, in the Figure below, the circled point would not include the green line distance. Instead the distance would consider going around the peninsula.
Near table produces the type of output I need but calculates distances without consideration for whether the path crosses land.
I also tried cost distance by creating a raster of the land at high cost and ocean area at low but if my understanding is correct, that type of analysis is limited to between just two points and the output isn't distance, it is a distance raster.
I have roughly 40,000 ocean points and polygons buffered around 1 degree of coastline. I need to find the 10 closest polygons for each point.