Solved

merge multiple lines into one line

  • 10 August 2022
  • 2 replies
  • 239 views

Badge +6

Hallo FME community,

I have many lines in a shapefile and some lines are connected to each other. I want to bring all lines that are connected together into one feature. I would be grateful if someone could give me an idea.

 

icon

Best answer by dustin 10 August 2022, 14:21

View original

2 replies

Userlevel 3
Badge +26

If they are all end node connected, you can use the LineCombiner.

 

If they are not end noded, I would first use the NetworkTopologyCalculator transformer. This should tag each connected set of lines with a common attribute _network_id. From there, you can aggregate those lines into one feature with Aggregator with Group By set to _network_id. You may need to process the lines through an Intersector before the NetworkTopologyCalculator, if the lines are not node connected.

Badge +6

If they are all end node connected, you can use the LineCombiner.

 

If they are not end noded, I would first use the NetworkTopologyCalculator transformer. This should tag each connected set of lines with a common attribute _network_id. From there, you can aggregate those lines into one feature with Aggregator with Group By set to _network_id. You may need to process the lines through an Intersector before the NetworkTopologyCalculator, if the lines are not node connected.

it works. many Thanx. :)

Reply