Skip to main content
Solved

Merge lines sections by attributes

  • September 21, 2023
  • 1 reply
  • 37 views

pabloolivaresm
Supporter
Forum|alt.badge.img+5

I have 3 tables, a linear tables of sections, a non geometric table of bus lines, and a intermediate table between both, with relations N:M. I need to merge the sections to get the geometry of bus lines. but some of the sections belongs to many bus lines, so I need to "duplicate" some of the sections.

 

Any idea of how to get the geometry of bus lines?

 

Thank you again

Best answer by daveatsafe

Hi @pabloolivaresm​,

From your description of the tables, I think there should be a row on the intermediate table for every unique combination of section and bus line, so I would use this table as the initial feature set.

Use a FeatureMerger to merge the bus line attributes (Supplier) onto each intermediate table row (Requestor). Connect the Merged results to a second FeatureMerger as the Requestor, with the sections as the Supplier. In this FeatureMerger, set:

  • Feature Merge Type to Geometry
  • Process Duplicate Suppliers to Yes
  • Geometry Merge type to Build Polygons (which will build lines from segments as well)

The Merged output should give you the individual bus lines with line geometry and all the attributes.

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.

1 reply

daveatsafe
Safer
Forum|alt.badge.img+20
  • Safer
  • Best Answer
  • September 21, 2023

Hi @pabloolivaresm​,

From your description of the tables, I think there should be a row on the intermediate table for every unique combination of section and bus line, so I would use this table as the initial feature set.

Use a FeatureMerger to merge the bus line attributes (Supplier) onto each intermediate table row (Requestor). Connect the Merged results to a second FeatureMerger as the Requestor, with the sections as the Supplier. In this FeatureMerger, set:

  • Feature Merge Type to Geometry
  • Process Duplicate Suppliers to Yes
  • Geometry Merge type to Build Polygons (which will build lines from segments as well)

The Merged output should give you the individual bus lines with line geometry and all the attributes.