Add an option for the Visvalingam simplification algorithm (#16)

* First attempt at porting Paul Mach's Visvalingam implementation

* Make indent

* Mostly working

* Approximate equivalence from Douglas-Peucker to Visvalingam levels

* Don't simplify away tile boundary crossing points

* Add a command-line option and test for Visvalingam simplification

* Update changelog

* Cleanup in response to review feedback

* Include <stdio.h> to fix compiler warnings
This commit is contained in:
Erica Fischer
2022-09-30 12:00:07 -07:00
committed by GitHub
parent 6de00c15ec
commit 4ef430b913
11 changed files with 4282 additions and 4 deletions
+2
View File
@@ -4,6 +4,7 @@
#include <vector>
#include <atomic>
#include <sqlite3.h>
#include <stdio.h>
#define VT_POINT 1
#define VT_LINE 2
@@ -79,5 +80,6 @@ double get_mp_area(drawvec &geom);
drawvec simple_clip_poly(drawvec &geom, long long x1, long long y1, long long x2, long long y2);
drawvec clip_lines(drawvec &geom, long long x1, long long y1, long long x2, long long y2);
drawvec clip_point(drawvec &geom, long long x1, long long y1, long long x2, long long y2);
void visvalingam(drawvec &ls, size_t start, size_t end, double threshold, size_t retain);
#endif