mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 18:05:42 +02:00
Make calculation of child tile overlap match clipping behavior.
Coordinates that are right on the tile boundary appear in both adjacent tiles. Make tippecanoe-decode also use exact edge coordinates instead of half-pixel locations.
This commit is contained in:
@@ -376,8 +376,10 @@ void rewrite(drawvec &geom, int z, int nextzoom, int maxzoom, long long *bbox, u
|
||||
// Division instead of right-shift because coordinates can be negative
|
||||
bbox2[k] = bbox[k] / (1 << (32 - nextzoom - 8));
|
||||
}
|
||||
bbox2[0] -= buffer;
|
||||
bbox2[1] -= buffer;
|
||||
// Decrement the top and left edges so that any features that are
|
||||
// touching the edge can potentially be included in the adjacent tiles too.
|
||||
bbox2[0] -= buffer + 1;
|
||||
bbox2[1] -= buffer + 1;
|
||||
bbox2[2] += buffer;
|
||||
bbox2[3] += buffer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user