Finding duplicate geometries that are not identical

04-05-2021 07:30 PM
Labels (2)
New Contributor III

I'm working with a few roads and trails datasets. There are some duplicate geometries that are not identical. See photos below.

Screenshot 2021-04-05 201923.pngScreenshot 2021-04-05 201940.png

I tried Find Identical with XY Tolerance, but it didn't seem to find most of these. I tried continuing to increase the XY tolerance, but I just got it finding parallel roads like the roads below.

Screenshot 2021-04-05 201830.png

I even tried planarizing the lines and just got a bunch of segments. I thought about trying to pull them out based on number of intersections, but I'm not even sure how to make that work. Any suggestions would be greatly appreciated!


0 Kudos
4 Replies
MVP Esteemed Contributor

Select by location using the same file for the selector and target, IF, the duplicates are in the same file.

More importantly, what do you want to do with them? 

Delete one?

Average the paths? 

How many do you have? 

How did they end up in the same file?

... sort of retired...
0 Kudos
New Contributor III

I tried the select by location process you mention, but it didn't seem to work. Can you clarify that please?

Yes, I want to remove one. I'm uncertain how many there are. I have four datasets, each with at least 100,000 features, and I've found at least a few by hand in each one, but I definitely don't have the time to inspect all of the feature classes by hand. I'm unsure how they all ended up in the same file. They're all from government agencies, so I didn't create the data.

0 Kudos
MVP Notable Contributor

If the data are in a database that has the function available, you can try filtering based on the Hausdorff Distance. It'll depend a lot on where the data are stored, but it's usually ST_HausdorffDistance or similar.

SELECT a.objectid,
FROM your_table a
LEFT JOIN your_table b ON ST_HausdorffDistance(a.shape, b.shape) < 5

Adjust the value at the end to determine how similar the shapes are allowed to be.

- Josh Carlson
Kendall County GIS
Esri Frequent Contributor

Related to the Find Identical GP tool, there is a Delete Identical GP tool that will delete records in a Feature Class if the geometry field is selected for a parameter.  Like the Find Identical, this tool uses an XY tolerance so I suspect won't get everything but quite a bit.

0 Kudos