Skip to main content

Hi everyone,

I am currently comparing lines in database A and database B, and I want to categorize them based on distance from each other:

If line A < 10cm line B → class 1

If line A 10 - 30cm line B → class 2

If line A < 30cm line B → class 3

I thought I'd do this using the Clipper transformer: if part of line A is within 10cm of line B, and another part of line A is 12cm from line B, I want line A to be split. See my workflow below:

I have my Clippers grouped by ‘type’ and ‘level’, so drailroads on level 1] are compared to ]railroads on level 1] and sroad lines on level 2] are compared to ]road lines on level 2]. 
I have Overlapping Clippers set to ‘Clip Interim Results’ and I am generating a list of IDs from line B on line A. 

This is the situation im currently facing:


Database A in red, database B in black and a 10cm buffer around database B in grey. The darker grey area is where the two database B buffers overlap.

In the situation above I want to compare ID_A = 1 to ID_B = 1, but ID_B = 2 also crosses ID_A = 1, resulting in my problem. Line A will be clipped into three parts: 

ID_A list{0}.ID_B list{1}.ID_B
1 1 <missing>
1 1 2
1 1 <missing>

 

In the example above I could just take list{0}.ID_B and drop list{1}. But how can I be sure that, ID_B = 1 is in list{0}.ID_B, and not in list{1}.ID_B? 

Are there other methods that would work for my project? Am I not reading some very important Clipper documentation? I am using FME 2023.2

 

Kind regards and thanks in advance!

Joep

In your example, line 1 from dataset A is compared to line 1 from dataset B. If this is also the case in your real data, make sure both datasets have the same attribute name for the line ID. Then you can use Group By on that attribute to make sure line 1 from dataset A is only compared to line 1 from dataset B.


In your example, line 1 from dataset A is compared to line 1 from dataset B. If this is also the case in your real data, make sure both datasets have the same attribute name for the line ID. Then you can use Group By on that attribute to make sure line 1 is only compared to line 1.

Thanks for the swift reply. Sadly, this is not the case. I knew I had to edit my example :-)


Reply