Finding Duplicate lines or lines that intersect.

7162
11
08-06-2012 07:49 AM
JayKappy
Occasional Contributor
I have a single Feature Class of Pipes....I noticed that somehow along the way Duplicates were created.
They are basically exact duplicates right on top of one another.

Is there a tool to run to find the lines that intersect or duplicate in a single Feature Class?

THanks
Tags (2)
0 Kudos
11 Replies
DanLee
by Esri Regular Contributor
Esri Regular Contributor
0 Kudos
JasonKleps
New Contributor
I have set of duplicate lines as well (they are spatially identical) but the Find Identical tool is not detecting them. I've tried numerous variations all to no avail.
0 Kudos
denisedavis
Occasional Contributor III
If you are using GIS10 you could try "Delete Identical" under Data Management in the toolbox. You may want to give coordinates (Calculate Geometry) to each line so you don't delete lines that are the same length.
0 Kudos
NobbirAhmed
Esri Regular Contributor
Hi Jason,

Could you please share part/all of your data? I have posted some questions to the other thread (on same issue) for you - please respond to the questions - that will help me refine my tests and find a good answer for you.

Thanks, Nobbir
Geoprocessing Team
0 Kudos
JasonKleps
New Contributor
Hi Jason,

Could you please share part/all of your data? I have posted some questions to the other thread (on same issue) for you - please respond to the questions - that will help me refine my tests and find a good answer for you.

Thanks, Nobbir
Geoprocessing Team


Hi Nobbir,

     Thanks for getting back to me so quickly. I'm sending you a folder ("Data_For_ESRI") that contains a personal geodatabase ("Data"). Inside there are 2 Feature Classes and a table. "Original_Data" is a FC I created to test the procedure. I started an editing session, set the snapping environment so that I could "Snap to Sketch" and then drew some legitimate lines (with no self-intersections) and various self-intersecting lines. I then broke these features apart using "Split Lines At Vertices" to create "Data_Split_Lines_By_Vertices". I then ran the "Find Identical" tool (selecting the "Shape" field in the dialog box) to create "Find_Identical_Table"). As you can see from the table it did not identify any of the self-intersecting segments. These tests were run in both geographic (NAD-83) and projected coordinate systems ("Albers Equal Area Conic"). As I said, I have tried it on a computer running SP4 as well as one with SP5.

Thanks,

       Jason
0 Kudos
NobbirAhmed
Esri Regular Contributor
Thanks for the data 🙂

I guess your input to Find Identical is Data_Split_Lines_By_Vertices, right? Here is the screenshot for one of the self-intersecting lines (feat# 5 of your Test_Lines data):

[ATTACH=CONFIG]19907[/ATTACH]

After splitting this line by vertices, we get 17 short lines.

[ATTACH=CONFIG]19909[/ATTACH]

None of these 17 lines lie exactly one upon another - that is, there is no spatially duplicate feature among these 17 lines. Could you share your spatially identical lines?
0 Kudos
JasonKleps
New Contributor
Thanks for the data 🙂

I guess your input to Find Identical is Data_Split_Lines_By_Vertices, right? Here is the screenshot for one of the self-intersecting lines (feat# 5 of your Test_Lines data):

[ATTACH=CONFIG]19907[/ATTACH]

After splitting this line by vertices, we get 17 short lines.

[ATTACH=CONFIG]19909[/ATTACH]

None of these 17 lines lie exactly one upon another - that is, there is no spatially duplicate feature among these 17 lines. Could you share your spatially identical lines?



Wouldn't a line that starts at vertex 0, goes out to vertex 1, then returns to vertex 0 and closes as vertex 2 (and vertex 2 lies on top of vertex 0 by setting the snapping environment appropriately) be identical by definition? And wouldn't splitting by vertices create 2 lines of the exact same length right on top of one another? Or am I missing something?

For example, take a look at OBJECT IDs 15 & 16 in Data_Split_Lines_By_Vertices. Are those not spatially identical? Or OBJECT IDs 7 & 8 to the north?
0 Kudos
NobbirAhmed
Esri Regular Contributor
Wouldn't a line that starts at vertex 0, goes out to vertex 1, then  returns to vertex 0 and closes as vertex 2 (and vertex 2 lies on top of  vertex 0 by setting the snapping environment appropriately) be identical  by definition?


Yes, the answer is "should be". However, in 10.0 (including SP5), digitizing direction mattered. So, the above two lines are considered non-identical 😞 We have enhanced the tool's behavior by ignoring the digitizing direction in 10.1.

Let me know if you need a workaround. If you want to try - just look the documentation for ArcPy Geometry classes. There is a method called equals - try using that.

Earlier, I was unable to reproduce the case as I was using a 10.1 setup. 😞
0 Kudos
JasonKleps
New Contributor
Yes, the answer is "should be". However, in 10.0 (including SP5), digitizing direction mattered. So, the above two lines are considered non-identical 😞 We have enhanced the tool's behavior by ignoring the digitizing direction in 10.1.

Let me know if you need a workaround. If you want to try - just look the documentation for ArcPy Geometry classes. There is a method called equals - try using that.

Earlier, I was unable to reproduce the case as I was using a 10.1 setup. 😞


Yes, if you have a workaround that would be great. I'll also explore the Arcpy Geometry class as well.
0 Kudos