Skip to main content

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

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

 

 


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?


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


You could probably use a variant of one of the answers in https://knowledge.safe.com/questions/74163/generate-lines-out-of-points-depending-on-multiple.html