Skip to main content
Question

How can I create a point between two points if these two points are closer together than X? then delete the two original points, thus generalizing.


fmelizard
Safer
Forum|alt.badge.img+18
How can I create a point between two points if these two points are closer together than X? then delete the two original points, thus generalizing.

5 replies

david_r
Celebrity
  • March 15, 2016

Hi

You can use a NeighborFinder to find points closer than a specified distance, then a VertexCreator to draw a line between the point pairs. Then use a CenterPointReplacer to replace the line with the point in the middle and finally a Matcher to get rid of duplicate geometries (necessary because the NeighborFinder in "Candidates only"-mode will return one feature per point, not per pair). It could look like something this:

David


redgeographics
Celebrity
Forum|alt.badge.img+49

Just wondering out loud here: doesn't one of the generalization algorithms in the Generalizer do this?


david_r
Celebrity
  • March 15, 2016
redgeographics wrote:

Just wondering out loud here: doesn't one of the generalization algorithms in the Generalizer do this?

Feel free to test ;-) I did have a look, but the Generalizer does not seem to consider more than one feature at a time.


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • March 15, 2016

You can use the NeighborhoodAggregator to create aggregate features and then replace the aggregate by a point using the CenterPointReplacer.


mark2atsafe
Safer
Forum|alt.badge.img+44
  • Safer
  • March 15, 2016
redgeographics wrote:

Just wondering out loud here: doesn't one of the generalization algorithms in the Generalizer do this?

I thought that too, but I can't find it. Without that I think David's solution is probably the best


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