Skip to main content
Question

merge multiple lines into one


Hi,

i tried to merge multiple lines into only one line, but the difficult is, that also connected lines on a course between start- and end-Point should be merged into the "one line"

with linejoiner the lines were only merged until the next Connection.

has anyone an idea?

15 replies

takashi
Influencer
  • October 20, 2016

Hi @sebastiangoerck, you can transform them into a single MultiCurve (IFMEMultiCurve) geometry using the Aggregator transformer.


:-) sometimes it is so simple, thank you!


no i have Aggregate it, but the next step is to deaggregate it, by endnodes.

any idea?


itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • October 20, 2016

Have you tried to use the group by setting in the aggregator? that will aggregate your features per group.


i have connected the endnode Reader to the aggregator, then i have tried to Group by endnode Name, but the result is not that what i expect.

the Count of objects were 5 but in the inspector were one highlighted


itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • October 20, 2016
sebastiangoerck wrote:

i have connected the endnode Reader to the aggregator, then i have tried to Group by endnode Name, but the result is not that what i expect.

the Count of objects were 5 but in the inspector were one highlighted

Strange since in the display control there are 5 aggregates, what are the values in the Name attribute? are they all the same ?

 

 


the attributes were separated by the endnode names


has nobody an idea?


jpvo
Participant
Forum|alt.badge.img+1
  • Participant
  • March 1, 2017

Deaggregating by Endnode..You should be able to do it with a TopologyBuilder.

One more thing, if you want to deaggregate by spatial connection, you can do it as follow:

spatialaggregate.fmw

I hope it helps.

.JP


Hi, topologybuilder was the right transformer...thanks


esaka
Participant
Forum|alt.badge.img
  • Participant
  • October 8, 2018

Hi,

I think,

the first step should be "NetworkTopologyCalculator". It is connecting to the lines and it is creating "_network_id".

the second step should be "Aggregator" (group by: "_network_id")


  • December 21, 2022

Hi,

I am in the same situation as the one initially described by you and I saw that you found a solution, but I did not manage to solve it using everything that was written here.

Can you describe to us all the steps taken to create a single line

Thank you


hi,

as "esaka" wrote is the "NetworkTopologyCalculator" the right Transformer. It create the "_network_id". then you can use this to aggregate or something else.

otherwise you have to explain your issue more detailed.


  • January 9, 2023

 

Yes, it is a very good solution and it works great. The problem I encounter is that after the aggregator, IFMEMultiCurve type lines result.

What I would like is to result in a polyline that I can store in the poistgis database.

 

Or maybe I could also store this result in the database, but I don't know how.

 

Thanks a lotpoliline


danminneyatsaf
Safer
Forum|alt.badge.img+12
alain2002 wrote:

 

Yes, it is a very good solution and it works great. The problem I encounter is that after the aggregator, IFMEMultiCurve type lines result.

What I would like is to result in a polyline that I can store in the poistgis database.

 

Or maybe I could also store this result in the database, but I don't know how.

 

Thanks a lotpoliline

Hi @alain2002​ you could try using the GeometryCoercer transformer to change the geometry type to fme_line.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings