Select to view content in your preferred language

Hidden/Stacked polylines

1000
10
Jump to solution
02-12-2025 02:54 PM
GIS_Life
Emerging Contributor

I have a feature layer of distribution mains (polyline layer). That I need to find lines that are on top of one another. There are 640,000+ features (lines) in this layer.

I have utilized the FIND IDENTICAL tool off the layers Shape field to find lines with identical geometric.

This feature layer more than likely has lines of different geometries and slight differences in vertices that are hidden or stacked on each other.

I need suggestions on how I can find these "duplicate", "hidden", "stacked" lines.

All research has pointed me to use the intersect tool. The problem with this is, the intersect tool also selects lines that touch or cross other lines. 

I only need to find lines on top of each other that may not have the same geometry.

0 Kudos
1 Solution

Accepted Solutions
MarkBoucher
Honored Contributor

I don’t have time to do any detail cogitating on this, but it sounds like a topology issue. Get it in a geodatabase and set up topology rules. 

View solution in original post

10 Replies
DanPatterson
MVP Esteemed Contributor

polylines that overlap one another will have the same length (within floating point precision).

You might want to give a look at sorting the shape_length field and see if there are any duplicates or close to duplicates.

If you see obvious candidates, I would try using the

Find Identical (Data Management)—ArcGIS Pro | Documentation 

with shape_length as the key field


... sort of retired...
0 Kudos
GIS_Life
Emerging Contributor

Thank you for the direction. I was under the impression that I have already found all my lines with the same length using the FIND INDENTICAL tool with the SHAPE as the key field. This found all lines with the same geometry.

I am now concerned about lines that are on top of one another with different lengths (follow the same path but are not the exact length). I am not certain of the workflow editors may have used but have been told that there could be hidden lines that are not the same size (a longer line on top of a shorter line).

I have also run SUMMARIZE STATICS to get a COUNT on the SHAPE_LENGTH field, but this did not do what I was hoping due to the different way lengths are rounded.

I am going to spend some time reading on floating point precision now.

0 Kudos
DanPatterson
MVP Esteemed Contributor

my reading is that Find Identical compares the points that make up the shape to ensure that they are coincident and in the same order.  There is no indication that they use other geometry geometry parameters such as length (or area, or volume for instance).

So using the Shape field isn't what I was referring to but the shape_length field.  This may undoubtedly identify seemingly identical features whose lengths are the same but their shapes are not.

To this one could calculate a shape extent, area field which in conjunction would further delineate candidates.

What am I gettin at?  consider 2 polylines that completely overlap.  The first is just 2 points, the second is a densified version of the first (that is, many points).  Therefore, only the start and end points are identical so you can use a point comparison to deem those as identical-ish,.  They do share the same areal extent, slope, perhaps orientation, definitely length, but they are only "identical" in one sense of the word but differ greatly in other contexts


... sort of retired...
0 Kudos
GIS_Life
Emerging Contributor

I appreciate your time and response. It was my understanding that using the FIND IDENTICAL tool on the SHAPE field (geometry of the line) would find duplicate lines that have the exact same geometry on top of another. It appears I was able to successfully do this.

I would not think the SHAPE_LENGTH field would work because you could have two different lines of the same length. I did sort my SHAPE_LENGTH field and found multiple instances where this is the case. Two different lines in different locations, but with the same length.

Not quite following on the point comparison.

0 Kudos
MarkBoucher
Honored Contributor

I don’t have time to do any detail cogitating on this, but it sounds like a topology issue. Get it in a geodatabase and set up topology rules. 

GIS_Life
Emerging Contributor

This is what I was looking for. Set up a rule for Must Not Overlay. There are some instances where lines are not duplicates but just have enough section of pipe that overlays another below it, but the Error inspector is very cool and simplifies the cleanup process.

First time working with Topology and Error layers, pretty cool! Thank you for the direction.

0 Kudos
DanPatterson
MVP Esteemed Contributor

three_polylines.png

3

they look identical but they are different in so many ways


... sort of retired...
0 Kudos
GIS_Life
Emerging Contributor

Yes, I see. I am trying to find lines that are different and hidden under other lines.

0 Kudos
MarkBoucher
Honored Contributor

Is there a way to create a code to loop through these and select the shapes that have both the same start and end xy and merge them? You may need to find a way to make sure the fields from the simpler one are the default unless the data in the field is different.

Here is a crude conceptural code (not python at all) - sorry no time to make this perfect...

  • for shp in shapes
  •     select shapes in shape where [shp(start)=other_shapes(start) and shp(end)=other_shapes(end)     
  •           or shp(start)=other_shapes(end) and shp(end)=other_shapes(start)] # addresses those in reverse direction
  •     if count(selected shapes) >1
  •         merge 
         end if
  • end for
0 Kudos