I have a set of very large shapefiles and would like to merge polygons within these that share one vertex.

Currently they are all separate like so:

enter image description here

What tool can I use to merge all the polygons that share one vertex so in the above example the selected polygon would be part of the one to the left like so:

enter image description here

  • Have you seen this thread Merge adjacent polygons ArcGIS?
    – Taras
    May 9, 2019 at 8:56
  • I would investigate Polygon Neighbors which I believe can recognize polygons that share one vertex (i.e. are node neighbors).
    – PolyGeo
    May 9, 2019 at 9:19
  • Convert back to integer raster, region group, to polygons, dissolve to multipart.
    – FelixIP
    May 9, 2019 at 19:51
  • @FelixIP That worked! Thanks for the help. If you post as an answer I'll accept it.
    – tom91
    May 10, 2019 at 10:44

2 Answers 2


Suggestion in my comments "Convert back to integer raster, region group, to polygons, dissolve to multipart" will work for polygons derived from rasters.

However in general it's better to start with suggestion by @Polygeo . You'll need to use script though:

import arcpy
import networkx as nx
##  replace 2 lines below to point to polygons and neighbours table
with arcpy.da.SearchCursor(Links, (fldFROM,fldTO)) as cursor:
    for f,t in cursor:
for group in nx.connected_components(G):
    for n in group:d[n]=N
with arcpy.da.UpdateCursor(Nodes, ("OBJECTID","GRP")) as cursor:
    for k, v in cursor:
        if k in d:v=d[k]
        else: N+=1;v=N

Script assumes that your neighborhood table called NBRS, your polygons stored in file GDB and there is a field called "GRP" to store group numbers.

enter image description here

  • Thank you, this worked in my instance, but I'll keep that script in mind too!
    – tom91
    May 13, 2019 at 8:12

If the polygons are really connected to each other, a Union will merge the neighbors.

  • 1
    Unfortunately, I've tried Union, including with an xy tolerance but it still produces a shape file where polygons sharing a vertex are separate. They definitely share a vertex because the shape files were made via converting a raster. Is there something else I can try?
    – tom91
    May 9, 2019 at 8:52

Your Answer

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

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