Skip to main content
Question

merge multiple lines into one

  • October 20, 2016
  • 15 replies
  • 421 views

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?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

15 replies

takashi
Celebrity
  • 7843 replies
  • 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+18
  • Supporter
  • 1442 replies
  • 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+18
  • Supporter
  • 1442 replies
  • October 20, 2016

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
Contributor
Forum|alt.badge.img+1
  • Contributor
  • 58 replies
  • 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
  • 15 replies
  • 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")


  • 6 replies
  • 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.


  • 6 replies
  • 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+13
  • Safer
  • 485 replies
  • 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

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