Select to view content in your preferred language

Node-Node Snapping Test

747
2
10-04-2010 04:22 AM
SanjayRana
Emerging Contributor
Hi,

I am looking for a fast approach to test if two or more polygons that share an edge also share the nodes along the shared edge.

I have tried various trivial approaches but am not pleased with the computational performance. My shapefile tends to have hundreds of thousands of polygons.

Any tips or suggestions will be much appreciated!
Sanj.
0 Kudos
2 Replies
DuncanHornby
MVP Notable Contributor
Hi Sanja,

This is just a random idea that popped into my head, so may not be any better?

Explode your polygons into individual points (if you are familiar with ArcObjects I'm think of the IPointCollection Interface) into a new featureclass, extract their XY coordinates as attributes and concatenate that into a single string field then do some sort of group by query?

Just an idea...

Duncan
0 Kudos
SanjayRana
Emerging Contributor
Hi Duncan,

Thanks for picking up the post. I figured out an acceptable idea, which is as follows.

Step 1. Do an intersection between two polygons and test if the the intersection outcome is a polyline. If the outcome is a polyline then they share edge(s).

Step 2. If two polygons share an edge then split them into ISegmentCollection. Convert the ILines in ISegmentCollection into IPolylines. Do an intersection between the Polylines of the two polygons and test if the outcome is a polyline. If the outcome of intersection between polylines is a polyline then then the overlap.

Step 3. Finally, check if the overlapping pair of polylines are identical. If not, then shared polygon edges do not have same configuration of nodes.

The operation can be optiimised by making sure that there is Spatial Index on the shapefile and castnig each geometry to a ISpatialIndex.

Best,
Sanjay.


Hi Sanja,

This is just a random idea that popped into my head, so may not be any better?

Explode your polygons into individual points (if you are familiar with ArcObjects I'm think of the IPointCollection Interface) into a new featureclass, extract their XY coordinates as attributes and concatenate that into a single string field then do some sort of group by query?

Just an idea...

Duncan
0 Kudos