Select to view content in your preferred language

Removing Mismatched Segments from LRS using Overlay

1479
6
01-28-2026 02:09 PM
jbradley
Emerging Contributor

Hi All,

I'm attempting to remove some segments (future construction) from various LRS layers using ArcPy, and I'm running into a stumbling block that I'd appreciate some help with.

Using the Overlay Events tool from the Linear Referencing toolbox gives me an overlay of the future construction layer and the layer they're to be removed from.

Then, using a select by attribute query, I can trim this down to just the segments that need to be deleted. These are the records where there are values for both the future construction and the layer that it needs to be removed from (where both records are not null).

I initially thought I could just use the Route IDs from these segments to then remove them from the other layer, but the problem is that the segment to be deleted is a shorter segment than the segment that it's being deleted from. In other words, I can't just remove Route XYZ from my layer because it would remove more than just the future construction segment.

You can see an example of this in the attached screenshots. The red segment needs to be removed from the blue polyline, but that route actually extends beyond the red segment (see the second image with that route selected).

I thought about using an erase and then recalculating the to/from measures, but was unsure if that would cause additional issues or breakages in segments.

Any thoughts or guidance is greatly appreciated! Anyone else done something similar?

0 Kudos
6 Replies
AyanPalit
Esri Regular Contributor

@jbradley A few questions to clarify the use case:

Assumed situation:

  • There is LRS Route layer R
  • There is LRS Event layer EV1 that has future construction 
  • There is LRS Event layer EV2 that has current and future construction
  • You need to remove future construction from layer EV2

If the above is correct:

Ayan Palit | Principal Consultant Esri
0 Kudos
jbradley
Emerging Contributor

Hi Ayan, that's all correct. I'm writing a Python script to automate the overlay and removal of future construction from a large batch of layers.

I am using the Overlay Events tool to identify the segments of future construction that need to be removed.

My hangup is just in how best to actually remove them. I am pretty new to working with LRS data, so I'm unsure how to approach.

0 Kudos
CliveReece
Esri Contributor

Hello @jbradley ,

Could you clarify if you are wanting to remove (retire) the section of route that covers the future construction you want deleted?  Or .. do you want to retire a section of a future construction event?  

That will help us provide you with some guidance. 

Clive

0 Kudos
jbradley
Emerging Contributor

Hey Clive,

If I'm understanding you correctly, then you have it right. I want to remove the sections of Layer A/B/C/D that are coincident with the future construction layer. The end user will see a published Layer A/B/C/D that does not contain future construction. 

0 Kudos
CliveReece
Esri Contributor

Hi @jbradley   Are you using Roads and Highways (Location Referencing) in an enterprise LRS, or the Linear Referencing toolbox on standalone feature classes?  

0 Kudos
CliveReece
Esri Contributor

@jbradley 

I'll take a swing at this from just a linear referencing viewpoint.  I'm going to assume we are talking about two events which then get run through Overlay Event (linear referencing)

Separate EventsRoute IDFrom MeasureTo MeasureValue 
Event AABC123015Some Value 
Event BABC12305Future Construction 
      
Overlay Events TableRoute IDFrom MeasureTo MeasureEvent A ValueEvent B Value
Record 1ABC12305Some ValueFuture Construction
Record 2ABC123515Some Value<null>

 

The goal is to remove 'Future Construction' sections from Event A.  The logic I'll follow is "If Overlay has a 'Future Construction' value, then drop those sections from a new vintage of Event A"

Then here is one method:  (a) Filter the Overlay to records 'Event B Value is NULL'.  Then (b) Dyn-Seg the filtered Overlay and use that to replace as the new vintage of Event A.  (possible refinement would be to dissolve where adjacent records have the same Event A value)

Another method could be what you meant in the original post using erase, but I think this would be more work that the steps above.  Method 2:  (a) DynSeg the Overlay table.  (b) Erase 'Future Construction' segments from Event A.  (c) Recalculate From/To Measures from the Event A polyline vertices.

Caveat:  If we are talking about Roads and Highways Location Referencing, I would suggest a different set of steps. 

0 Kudos