Question

Find dead ends from association using attributes only


Badge

Hi Experts,

I am working on FME 2019.0. I have to find the dead ends from a huge road network (without geometry). I have to take only associations into consideration.

There are two columns jun_id_to and jun_id_from for each road. The value that comes just once in jun_id_to or jun_to_from both would be the dead-ending road. A small illustration about how the road network would look like and the association table is below:

Road geometry:

Attributes:

I tried using StatisticalCalculator, but, I am not sure if it can tell the count of each character in both the columns. Also, FeatureMerger with jun_id_to and jun_id_from merge doesn't give the required output. I think Lists might work in this case but not sure how.

Any ideas?

Thanks.


3 replies

Userlevel 2
Badge +19

There could be more elegant solutions, but here is mine:

xlsxr2none.fmw

Userlevel 4

This will find all the node IDs that only occur once:

See also template for FME 2019.1: dead_end_node.fmwt

Userlevel 2
Badge +17

Hi @dewan, alternatively, if you are familiar with SQL, the InlineQuerier can also be a choice.

SQL Query:

select node_id
from (
    select jun_id_from as node_id from Sheet1
    union all
    select jun_id_to from Sheet1
)
group by node_id having count(*) = 1

0684Q00000ArKlzQAF.png

Reply