Skip to main content
Question

Midpoint between points

  • July 21, 2020
  • 5 replies
  • 137 views

katt
Supporter
Forum|alt.badge.img+12
  • Supporter
  • 41 replies

Hello, I have a list of points and their geometry:

Point IDStreet NameRegion 1Street AA

 

 

2Street A

 

A

 

 

3Street B

 

A

 

 

4Street B

 

A

 

 

5Street C

 

B

 

 

6Street C

 

B

 

 

7Street A

 

C

 

 

8Street A

 

C

 

 

 

I would like to create points that are located midway between points that share the same street name and region. In this case, I would like to create a center point between Point 1 & 2, another one between Point 3 & 4, another one between Point 5 & 6, another one between Point 7 & 8. There are always exactly two points sharing the same street name and region, never more or less. What transformers could help me? Thx.

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.

5 replies

drc43
Contributor
Forum|alt.badge.img+11
  • Contributor
  • 83 replies
  • July 21, 2020

@katt

I'm not 100% sure on this, but I feel like you could run your points into a LineBuilder, grouping by Street Name and Region. Then, run the line output into a Snipper set to percentage mode with the start and end locations set to 50. This should find the mid point of the lines.


david_r
Celebrity
  • 8392 replies
  • July 21, 2020

The easiest is probably to create the lines 1-2, 3-4, etc. using the LineBuilder (group by Street Name + Region) and then use the CenterPointReplacer to get the mid-point on each line.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • July 21, 2020

I would try a LineBuilder grouping by Street Name followed by a snipper with Snipping Mode Distance (Percentage) and Starting Location 50 and Ending Location 50 to get a point at the centre of the line


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • July 21, 2020

@katt

I'm not 100% sure on this, but I feel like you could run your points into a LineBuilder, grouping by Street Name and Region. Then, run the line output into a Snipper set to percentage mode with the start and end locations set to 50. This should find the mid point of the lines.

Snap!


erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • July 21, 2020

Another option would be using the Aggregator transformer (group by street and region), followed by a CenterPointReplacer.