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.

  • 15 March 2016
  • 5 replies
  • 0 views

Userlevel 4
Badge +13
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

Userlevel 5

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

Userlevel 5
Badge +26

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

Userlevel 5

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.

Userlevel 2
Badge +16

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

Userlevel 4
Badge +25

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

Reply