Skip to main content
Solved

Generate lines from points in different features


cunningham.ba
Forum|alt.badge.img

Good morning,

I am trying to come up with a way to generate lines where the starting locations are contained in one data set and the end points are contained in another data set. I have 19 "start" points and 4 "end" points; I need a line from each start point to each end point - So I should end up with 76 lines. Any guidance on how I should accomplish this would be greatly appreciated. I've been toying around with lists and trying to loop through them to create all the pairs of points that I need to feed into the LineBuilder, but I've been struggling with how to get it done.

 

Thanks,

Brian

Best answer by ebygomm

You can unconditionally merge in the FeatureMerger (Requestor = 1 & Supplier = 1), build a list of the suppliers including the coordinates from the suppliers,then explode this list, and use a vertex creator to add the supplier point to create a line

 

 

 

View original
Did this help you find an answer to your question?

3 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • February 5, 2020

Read both Start and End points.

Use CoordinateExtractor to extract End point X and Y.

Then use FeatureMerger (1=1) to merge the X and Y from all end points to the start points (start = requester , end = supplier, merge all suppliers using a list).

Use ListExploder to create the pairs and add the end point using VertexCreator.

Hope this helps.


ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • Best Answer
  • February 5, 2020

You can unconditionally merge in the FeatureMerger (Requestor = 1 & Supplier = 1), build a list of the suppliers including the coordinates from the suppliers,then explode this list, and use a vertex creator to add the supplier point to create a line

 

 

 


cunningham.ba
Forum|alt.badge.img

Thanks guys... I actually ended up stumbling upon that exact solution myself about 2 minutes after my posting this morning. I found another forum post where a user highlighted the ability to do the 1=1 join in the FeatureMerger and then I utilized the list from the merger to get my points. I was previously unaware that you could do the 1=1 join in the FeatureMerger... that is extremely helpful! You learn something new every day!

I had been working on this most of the afternoon yesterday and made my post this morning before jumping back in to work on it. After having my fresh set of eyes on it this morning, I came across the solution pretty quickly.

Thanks for the validation of my solution!

Brian


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