Skip to main content
Question

Connecting line segments using common value from different attributes


Forum|alt.badge.img

Hi guys,

 

I have a speed limit dataset with over 3,000 line features which represents road segments that have been chunked up into several bits.

I'd like to optimize the dataset by linking road segments that are related. The related road segments have a common road name, and speed limit. However, there are two more attributes for each road segment: from_ufi and to_ufi. As an example, segment 1 will have 222 and 242 for from_ufi and to_ufi attributes respectively. Segment 2 will have 195 and 222 for from_ufi and to_ufi attributes respectively.

The challenge is connecting segment 1 and segment 2 using the from_ufi attribute for segment 1 and to_ufi for segment 2.

I'm new to FME so the easier, most efficient solution would be appreciated. Is there a way to do this in FME? What transformers can be used for this task?

Appreciate your help in advance.

 

Regards, Dennis

4 replies

Forum|alt.badge.img
  • Author
  • August 22, 2019

The complete dataset would be as follows:

 

Road_name, speed_limit, from_ufi, to_ufi

London Street, 40, 222, 242

London Street, 40, 195, 222

London Street, 40, 162, 195

London Street, 40, 132, 162

 

 


fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • August 22, 2019

Hi @deegee You might need just a LineCombiner. You can group by Road_name and speed_limit and also create a list if you need to maintain the different *ufi values. Are the *ufi values also measures on the lines?


Forum|alt.badge.img
  • Author
  • August 23, 2019

Hi @danatsafe,

No, the *ufi values are not measures on the lines.

I already tried LineCombiner with mixed results. For some roads, it works perfectly. For others (such as Right of Way roads), it combined them into one line segment while on the map there are located in different geospatial locations.

That is why I'm seeking a different solution that takes into account the *ufi values for the different lines.

Meaning, only combine two or more lines if the from_ufi/to_ufi of 1st segment is equal to from_ufi/to_ufi for another segment.

From my example dataset:

link segment 1 to segment 2 on account of: from_ufi_1 = to_ufi_2.

link segment 2 to segment 3 on account of: from_ufi_2 = to_ufi_3

link segment 3 to segment 4 on account of: from_ufi_3 = to_ufi_4

The result should be one line segment including segment 1, 2, 3, 4


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • August 23, 2019

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings