[GIS] Snapping multiple points to nearest edge of polygon using ArcGIS for Desktop

arcgis-10.3arcgis-desktopsnapping

I have a point grid (representing the centroid of a map tile) laid across a landbase; however, some of those points fall outside the boundaries (in the ocean). I need to somehow snap those points back inside the polygon (landbase) so I can use an identity tool and return results for all of the points. Is there a simple way to do this? (There are hundreds of points)

There may be a better way to do this too… I'm open to suggestions.

I'm trying to use identity to combine two datasets (map tiles and counties), but I want to make sure each point (map tile) only falls within one of the other polygons (counties). I hope this is at least somewhat clear…

enter image description here

Best Answer

There is an ArcToolbox tool called Snap found in the "Editing Tools" toolset.

You could use Select by Location to select all the points that don't intersect one of your polygons (the ones that are in the ocean), and then run the Snap tool to snap those to the nearest polygon edge. Use invert_spatial_relationship to select the points that don't intersect.

Please note that Snap modifies the existing data, it doesn't output into a new feature class so take a copy first.

Related Question