2

I am trying to find distances between centroids of islands and the nearest land mass. I have a point shapefile of island centroids and a polygon shapefile of land masses.

My issue is that some of these islands (for which I have centroid points) are also included in the landmass shapefile, so those distances are 0. I would like to know the distance to the nearest land mass that is not itself.

I have tried using the Near tool in ArcGIS and setting the "search radius" to ">0" without luck.

1

Instead of using Near, you should use Generate Near Table, that allows you to calculate the distance to several closest features.

  1. Run the Generate Near Table tool with the 'Find only closest feature (optional)' check box unchecked, then type '2' in the Maximum number of closest matches (optional)' box:

enter image description here

  1. In the output table, select the features with '0' in the 'NEAR_DIST' field and delete them.

  2. Select the closest land mass (for the centroids that don't overlap a land mass and still have 2 records in the Near table) with Summary Statistics:

enter image description here

  1. Join the output of the Summary Statistics tool to the centroids feature class, using FID as join field for the table and the OBJECTID as join field for the centroids.

If a centroid can intersect more than one land mass (which would question the quality of the data, but having island centroids overlapping land masses is also weird in the first place), you can increase the number of closest matches to be found by the Generate Near Table tool accordingly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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