Visvalingam-Whyatt polyline simplification algorithm clarification

后端 未结 3 1886
广开言路
广开言路 2021-02-04 12:32

I\'m trying to implement a polyline simplification algorithm. The original article can be found here: http://archive.is/Tzq2. It seems straightforward in concept but I don\'t un

3条回答
  •  天命终不由人
    2021-02-04 13:30

    I was confused by this too, went back and read the article again, and afaict it's not needed if you're removing points as you go - aka if you're doing a one-off simplification with a fixed area threshold. afaict the javascript implementation works this way, so it actually doesn't need the 'if' statement (but it has it anyway, oh well).

    The 'if' statement is needed if you're keeping all the points around. In that case, you're storing the 'effective area' with each point so that later you can filter them, perhaps using an interactive slider that controls the # of output points. By storing that larger effective area, you preserve the proper ordering.

提交回复
热议问题