Select to view content in your preferred language

How to batch match polygon edge?

3234
13
06-07-2017 08:01 AM
XingboChen
Emerging Contributor

Here's an example, the two polygons below have no gaps or overlaps, but the nodes on the shared edges are not exact the same, how can I make them have same nodes? And I've got like more than 50 thousands polygons in a feature class like that, is there any tools to get it done?

0 Kudos
13 Replies
AbdullahAnter
Honored Contributor

The main problem here that there are many uncritical vertices in most edges.

So I think you can try use Simplify Polygon tool  (Arc toolbox > cartography tools > Generalization >Simplify Polygon ). And make Simplification Algorithm is POINT_REMOVE.

  • POINT_REMOVE—Keeps the so-called critical points that depict the essential shape of a polygon and removes all other points. This is the default.
  • Simplification Tolerance

The tolerance that determines the degree of simplification. A tolerance must be specified, and it must be greater than zero. You can choose a preferred unit; the default is the feature unit.

  • For POINT_REMOVE algorithm, the tolerance you specify is the maximum allowable offset.
  • For BEND_SIMPLIFY algorithm, the tolerance you specify is the length of the reference bend baseline.
Minimum Area (optional)

Sets the minimum area for a simplified polygon to be retained. The default value is zero, that is, to keep all polygons. You can choose a preferred unit for the specified value; the default is the feature unit.

Handling Topological Errors (optional)

Specifies how the topological errors (possibly introduced in the process, including line crossing, line overlapping, and collapsed zero-length lines) will be handled.

  • NO_CHECK—Specifies not to check topological errors. This is the default.
  • FLAG_ERRORS—Specifies to flag topological errors if any are found.
  • RESOLVE_ERRORS—Specifies to resolve topological errors if any are found.
Keep collapsed points (optional)

Specifies whether to keep collapsed zero-area polygons as points if any are found in the process. This option applies only when NO_CHECK or FLAG_ERRORS is specified.

  • Checked—Specifies to keep the collapsed zero-area polygons as points. The endpoints of the collapsed polygons will be stored in a point feature class at the output feature class location, taking the name of the output feature class plus a suffix _Pnt. This is the default.
  • Unchecked—Specifies not to keep the collapsed zero-area polygons as points even if they are found in the process; therefore, the point feature class will be empty.
DuncanHornby
MVP Notable Contributor

I explored your approach and it does not work, see example below. Whilst keeping the shape and removing some of the vertices it does not remove all of them.

A similar question was asked on GIS SE here. There is a generalize tool on the topology toolbar, you can select up all polygon edges and click on that, it worked very well on my simple test data, but not sure how it would fare with 50,000 polygons?

AbdullahAnter
Honored Contributor

Duncan, you find another method good job. But I wondered that you said that Simplify Polygon  doesn't work. and your link is approve this tool too. did you read carefully ?. may be that you don't defined Simplification Tolerance well. I think you defined small tolerance so not all vertices deleted. 

0 Kudos
DuncanHornby
MVP Notable Contributor

Abdullah, I tried setting the tolerance to very small, even what Xingbo used (0.00001 meter) but I still get some vertices left after the Simplify Polygon has been run. The tool on the toolbar seems to work for me, removing all vertices except for the ones that the boundaries share. I was able to select all polygons and run the tool on them, but my sample is much smaller than Xingbo's. Anyway Xingbo seems happy!

0 Kudos
XingboChen
Emerging Contributor

The tool Abdullah Anter mentioned is in the arctoolbox, the tool you mentioned is on the advanced edting toolbar (Arcgis 10.4). And both of them work by setting a very very small tolerance like 0.0001 meter, I got what I wanted. But I prefer the one in the arctoolbox since I've got too much polygons.

0 Kudos
XingboChen
Emerging Contributor

Here's my earlier example after I run the tool.

0 Kudos
XingboChen
Emerging Contributor

Thank you very much, Simplify Polygon works, I set a very very small tolerance like 0.00001 meter.

DanPatterson_Retired
MVP Emeritus

Run an experiment... run a Check Geometry on the file that you have shown with your pattern... then export that to a new file and report if there are any differences.  What you are seeing is the result of merging polygons from different data sources or not using the 'autocomplete polygon' tool when creating the polygon pair in the first place

AbdullahAnter
Honored Contributor

Yes , Dan I agree with you except 'autocomplete polygon' , because it will be the first place if there one , two or three polygons , but Xingbo Chen says :

And I've got like more than 50 thousands polygons in a feature class like that

0 Kudos