Skip to main content
Question

Midpoint between points


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

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.

5 replies

drc43
Contributor
Forum|alt.badge.img+11
  • Contributor
  • 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
  • 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+32
  • Influencer
  • 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+32
  • Influencer
  • July 21, 2020
drc43 wrote:

@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+17
  • Contributor
  • July 21, 2020

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


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