Add an option not to clip features and to include each exactly once per zoom

This commit is contained in:
Eric Fischer
2016-04-20 15:06:43 -07:00
parent 41099ed731
commit ea638914ce
14 changed files with 2477 additions and 77 deletions
+9
View File
@@ -648,6 +648,15 @@ int quick_check(long long *bbox, int z, int detail, long long buffer) {
return 2;
}
bool point_within_tile(long long x, long long y, int z, int detail, long long buffer) {
// No adjustment for buffer, because the point must be
// strictly within the tile to appear exactly once
long long area = 1LL << (32 - z);
return x >= 0 && y >= 0 && x < area && y < area;
}
drawvec clip_lines(drawvec &geom, int z, int detail, long long buffer) {
drawvec out;