Skip to main content

I have a network of lines, and I need to identify the genuine odd one out.

In the diagram below, the red lines represent "Active" lines and the pink lines are "Inactive" lines.

Those lines that branch off from the network to a dead-end are genuine, the "Inactive" lines that have an "Active" line either side have been incorrectly attributed, and theses are the ones I need to identify.

 

I am new to FME, so a nice step by step guide would be appreciated please.

image

So you want to identify the pink line on the left?


Yes, as this is the odd one out in the network. The one to the right is legitimate as it only touch's an active line at one end.

 


One possible way. I've used this method to identify dangling lines, but if you know which lines are dangling and set as inactive you can infer that all others must not be dangling and therefore active

> Build Topology, generating a list of edges on the nodes

>Count how many elements in the list

>Test for element count of 1, this identifies the node marked in black in your example network

image> Merge edges onto nodes using the absolute value of the fme_arc_id ( @abs(@Value(edege{0}.fme_arc_id))

>Edges exiting the unmerged port are the active lines

image


Will this method identify the the inactive line that touch's 2 "active" lines. It looks like your solution is identifying the legitimate inactivate line on the right.

As I say, I am rather new to this, so I may have misinterpreted your solution.


Will this method identify the the inactive line that touch's 2 "active" lines. It looks like your solution is identifying the legitimate inactivate line on the right.

As I say, I am rather new to this, so I may have misinterpreted your solution.

All legitimate active lines will exit the merged port of the FeatureMerger, therefore any inactive line that exits the unmerged requestor should not be inactive as it touches two or more active lines


Will this method identify the the inactive line that touch's 2 "active" lines. It looks like your solution is identifying the legitimate inactivate line on the right.

As I say, I am rather new to this, so I may have misinterpreted your solution.

Simple example attached


Thankyou for your time and help, I will give this a try.


Reply