I am very new to ArcGIS and have the following problem: I have a shapefile with around 1500 regions worldwide and want to calculate for each region the distance up to the coastline of its own country (or if the country has no access to the ocean, the nearest coastline).

I have a shapefile with data on all coastlines worldwide. However, the lines forming the coastlines are not country-specific (i.e. there is not 1 line feature for the coastline of each country).

Is it possible to extract national coastlines from this data? How could I proceed?

  • 1
    Please decide whether you wish to ask about where to find the data (probably better asked at the Open Data Stack Exchange) or where you get stuck using the data. At the moment you are asking at least two questions.
    – PolyGeo
    Dec 20, 2016 at 19:30
  • Thank you for your answers. Sorry, I wasn't specific before. I edited the post and hope my question is now clearer. Thanks.
    – Abby
    Dec 21, 2016 at 10:11
  • 1
    Thanks a lot for your help! I managed to create the national coastlines and now have one shapefile for the national coastlines, and one shapefile containing the regions. I tried the "Near by regions" tool in the model builder ( arcgis.com/home/item.html?id=37dbbaa29baa467d9da8e27d87d8ad45 ). Unfortunately, I always get an error message simply stating "Faild to execute". Are you familiar with the tool and have an idea what I am doing wrong? Alternatively, how can I get the same result using arcpy? Unfortunately, I don't have any experience using it and would be very thankful for help
    – Abby
    Jan 3, 2017 at 15:25
  • Please don't add "thank you" as an answer. Once you have sufficient reputation, you will be able to vote up questions and answers that you found helpful. - From Review Jan 3, 2017 at 16:14

1 Answer 1

  • create point every time country boundaries intersect ("feature vertices to point" if you have a clean geometry).

  • use "split line at point" to split the coastlines with those points

  • create a buffer around each country

  • loop on each country to select the regions and coastlines inside it, and run "near" or "spatial join" to compute the distance. The iteration can be done using model builder iterator or arcpy.

remark : instead of split point, you can intersect the buffers and the coastlines, but this will create small artefacts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.