3

I have a polygon (or let's call it just a series of points). I want to simplify it (reduce the amount of points) to a given number of points.

Currently I use Douglas Peucker and try to guess the correct epsilon. That works more or less (I get approximately the given amount of points). The biggest problem is, that I have to call DP over and over again. Since I want to massively reduce the points, e.G. from 10.000s to 30 the process is a bit frustrating.

So I thought, that I might create my own version of DP, were I stop when I reach the amount of points I am looking for. Are there any existing or maybe better solutions available?

5
  • approximately how many points would you want to reach at the end of the process ? Are you still far from the extent rectangle of your polygon.
    – radouxju
    May 17, 2016 at 13:59
  • Visvalingam's algorithm suits probably better for your use case. An interactive example is at bost.ocks.org/mike/simplify
    – user30184
    May 17, 2016 at 14:01
  • @radouxju Well I reach the desired amount of points. But I have to rerun DP quite often. Therefore, I am looking for a better solution, since I want to calculate the simplification more or less efficient.
    – Robin
    May 17, 2016 at 14:05
  • @user30184 Thanks yes, you might be right. Adapting the Visvalingam to stop when a given node count is reached would be easier.
    – Robin
    May 17, 2016 at 14:12
  • That simplify is huge... you may want to use a topological simplification with postgis topology for example.... strk.kbt.io/blog/2012/04/13/…
    – WKT
    May 17, 2016 at 14:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.