mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 01:45:41 +02:00
Merge branch 'master' into earcut-polygon
Conflicts: tile.cc
This commit is contained in:
+13
-2
@@ -909,6 +909,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;
|
||||
|
||||
@@ -1061,7 +1070,7 @@ drawvec impose_tile_boundaries(drawvec &geom, long long extent) {
|
||||
return out;
|
||||
}
|
||||
|
||||
drawvec simplify_lines(drawvec &geom, int z, int detail) {
|
||||
drawvec simplify_lines(drawvec &geom, int z, int detail, bool mark_tile_bounds) {
|
||||
int res = 1 << (32 - detail - z);
|
||||
long long area = 0xFFFFFFFF;
|
||||
if (z != 0) {
|
||||
@@ -1078,7 +1087,9 @@ drawvec simplify_lines(drawvec &geom, int z, int detail) {
|
||||
}
|
||||
}
|
||||
|
||||
geom = impose_tile_boundaries(geom, area);
|
||||
if (mark_tile_bounds) {
|
||||
geom = impose_tile_boundaries(geom, area);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < geom.size(); i++) {
|
||||
if (geom[i].op == VT_MOVETO) {
|
||||
|
||||
Reference in New Issue
Block a user