Skip to main content
Question

Connect multiple points 1-to-M

  • December 11, 2017
  • 2 replies
  • 37 views

I have two point datasets (image below). There is a 1-to-many relationship between the yellow squares (1) and the red circles (many). The points are related by an ID attribute which is common to both datasets. I need to draw connecting lines from the yellow squares (the "hubs") to the red circles ("spokes") which share the same ID. I've read a number of previous posts regarding connecting points in separate datasets but they all seem to deal with either a single point connecting to many points or many-to-many relationships between datasets, but not a one-to-many relationship between two large (5,000+ rows) datasets. Any advice or info is much appreciated.

 

 

Cheers,

Rich

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.

2 replies

erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • December 11, 2017

Read both datasets. and use the FeatureMerger transformer (based on the common ID) to add the yellow data (Supplier) to the red (Requester) (attributes only). Before merging use the CoordinateExtractor to extract X and Y from the yellow data.

Use the option to generate lines using the VertexCreator (adding the X and Y from the yellow data).

If needed reverse the line using the Orientor transformer.


  • Author
  • 1 reply
  • December 11, 2017

Thanks so much. That worked a treat.