mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-03-25 13:17:38 +00:00
Merge pull request #152 from mapbox/clip-buffer
Make clipping behavior with no buffer consistent with Mapnik
This commit is contained in:
commit
baf576f257
@ -1,3 +1,8 @@
|
||||
## 1.7.1
|
||||
|
||||
* Make clipping behavior with no buffer consistent with Mapnik.
|
||||
Features that are exactly on a tile boundary appear in both tiles.
|
||||
|
||||
## 1.7.0
|
||||
|
||||
* Parallel processing of input with -P works with streamed input too
|
||||
|
@ -194,8 +194,8 @@ void handle(std::string message, int z, unsigned x, unsigned y, int describe) {
|
||||
g += 2;
|
||||
|
||||
long long scale = 1LL << (32 - z);
|
||||
long long wx = scale * x + (scale / extent) * (px + .5);
|
||||
long long wy = scale * y + (scale / extent) * (py + .5);
|
||||
long long wx = scale * x + (scale / extent) * px;
|
||||
long long wy = scale * y + (scale / extent) * py;
|
||||
|
||||
double lat, lon;
|
||||
tile2latlon(wx, wy, 32, &lat, &lon);
|
||||
|
6
tile.cc
6
tile.cc
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user