mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 09:55:41 +02:00
Fix accidental inclusion of the top left of the tile in the bbox
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{ "type": "FeatureCollection", "properties": {
|
{ "type": "FeatureCollection", "properties": {
|
||||||
"antimeridian_adjusted_bounds": "-180.000000,0.000000,0.966797,85.051129",
|
"antimeridian_adjusted_bounds": "-100.019531,0.000000,0.966797,0.966751",
|
||||||
"bounds": "-180.000000,0.000000,0.966797,85.051129",
|
"bounds": "-100.019531,0.000000,0.966797,0.966751",
|
||||||
"center": "0.000000,0.000000,0",
|
"center": "0.000000,0.000000,0",
|
||||||
"description": "tests/feature-filter/out/all.mbtiles",
|
"description": "tests/feature-filter/out/all.mbtiles",
|
||||||
"format": "pbf",
|
"format": "pbf",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ "type": "FeatureCollection", "properties": {
|
{ "type": "FeatureCollection", "properties": {
|
||||||
"antimeridian_adjusted_bounds": "-135.000000,37.881357,-122.280579,40.979898",
|
"antimeridian_adjusted_bounds": "-122.309418,37.881357,-122.280579,37.900865",
|
||||||
"bounds": "-135.000000,37.881357,-122.280579,40.979898",
|
"bounds": "-122.309418,37.881357,-122.280579,37.900865",
|
||||||
"center": "-122.299805,37.892187,12",
|
"center": "-122.299805,37.892187,12",
|
||||||
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
||||||
"format": "pbf",
|
"format": "pbf",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ "type": "FeatureCollection", "properties": {
|
{ "type": "FeatureCollection", "properties": {
|
||||||
"antimeridian_adjusted_bounds": "-135.000000,37.874853,-122.280579,40.979898",
|
"antimeridian_adjusted_bounds": "-122.343750,37.874853,-122.280579,37.900865",
|
||||||
"bounds": "-135.000000,37.874853,-122.280579,40.979898",
|
"bounds": "-122.343750,37.874853,-122.280579,37.900865",
|
||||||
"center": "-122.299805,37.892187,12",
|
"center": "-122.299805,37.892187,12",
|
||||||
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
||||||
"format": "pbf",
|
"format": "pbf",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ "type": "FeatureCollection", "properties": {
|
{ "type": "FeatureCollection", "properties": {
|
||||||
"antimeridian_adjusted_bounds": "-135.000000,37.874853,-122.280579,40.979898",
|
"antimeridian_adjusted_bounds": "-122.343750,37.874853,-122.280579,37.900865",
|
||||||
"bounds": "-135.000000,37.874853,-122.280579,40.979898",
|
"bounds": "-122.343750,37.874853,-122.280579,37.900865",
|
||||||
"center": "-122.299805,37.892187,12",
|
"center": "-122.299805,37.892187,12",
|
||||||
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
||||||
"format": "pbf",
|
"format": "pbf",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ "type": "FeatureCollection", "properties": {
|
{ "type": "FeatureCollection", "properties": {
|
||||||
"antimeridian_adjusted_bounds": "-135.000000,37.874853,-122.280579,40.979898",
|
"antimeridian_adjusted_bounds": "-122.343750,37.874853,-122.280579,37.900865",
|
||||||
"bounds": "-135.000000,37.874853,-122.280579,40.979898",
|
"bounds": "-122.343750,37.874853,-122.280579,37.900865",
|
||||||
"center": "-122.299805,37.892187,12",
|
"center": "-122.299805,37.892187,12",
|
||||||
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
||||||
"format": "pbf",
|
"format": "pbf",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ "type": "FeatureCollection", "properties": {
|
{ "type": "FeatureCollection", "properties": {
|
||||||
"antimeridian_adjusted_bounds": "-135.000000,37.874853,-122.280579,40.979898",
|
"antimeridian_adjusted_bounds": "-122.343750,37.874853,-122.280579,37.900865",
|
||||||
"bounds": "-135.000000,37.874853,-122.280579,40.979898",
|
"bounds": "-122.343750,37.874853,-122.280579,37.900865",
|
||||||
"center": "-122.299805,37.892187,12",
|
"center": "-122.299805,37.892187,12",
|
||||||
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
||||||
"format": "pbf",
|
"format": "pbf",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ "type": "FeatureCollection", "properties": {
|
{ "type": "FeatureCollection", "properties": {
|
||||||
"antimeridian_adjusted_bounds": "-135.000000,37.874853,-122.280579,40.979898",
|
"antimeridian_adjusted_bounds": "-122.343750,37.874853,-122.280579,37.900865",
|
||||||
"bounds": "-135.000000,37.874853,-122.280579,40.979898",
|
"bounds": "-122.343750,37.874853,-122.280579,37.900865",
|
||||||
"center": "-122.299805,37.892187,12",
|
"center": "-122.299805,37.892187,12",
|
||||||
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
||||||
"format": "pbf",
|
"format": "pbf",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ "type": "FeatureCollection", "properties": {
|
{ "type": "FeatureCollection", "properties": {
|
||||||
"antimeridian_adjusted_bounds": "-135.000000,37.874853,-122.280579,40.979898",
|
"antimeridian_adjusted_bounds": "-122.343750,37.874853,-122.280579,37.900865",
|
||||||
"bounds": "-135.000000,37.874853,-122.280579,40.979898",
|
"bounds": "-122.343750,37.874853,-122.280579,37.900865",
|
||||||
"center": "-122.299805,37.892187,12",
|
"center": "-122.299805,37.892187,12",
|
||||||
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
||||||
"format": "pbf",
|
"format": "pbf",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ "type": "FeatureCollection", "properties": {
|
{ "type": "FeatureCollection", "properties": {
|
||||||
"antimeridian_adjusted_bounds": "-135.000000,37.694688,-122.103424,40.979898",
|
"antimeridian_adjusted_bounds": "-122.343750,37.694688,-122.103424,37.900865",
|
||||||
"bounds": "-135.000000,37.694688,-122.103424,40.979898",
|
"bounds": "-122.343750,37.694688,-122.103424,37.900865",
|
||||||
"center": "-122.299805,37.892187,12",
|
"center": "-122.299805,37.892187,12",
|
||||||
"description": "tests/join-population/tabblock_06001420-folder",
|
"description": "tests/join-population/tabblock_06001420-folder",
|
||||||
"format": "pbf",
|
"format": "pbf",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ "type": "FeatureCollection", "properties": {
|
{ "type": "FeatureCollection", "properties": {
|
||||||
"antimeridian_adjusted_bounds": "-135.000000,37.694688,-122.103424,40.979898",
|
"antimeridian_adjusted_bounds": "-122.343750,37.694688,-122.103424,37.900865",
|
||||||
"bounds": "-135.000000,37.694688,-122.103424,40.979898",
|
"bounds": "-122.343750,37.694688,-122.103424,37.900865",
|
||||||
"center": "-122.299805,37.892187,12",
|
"center": "-122.299805,37.892187,12",
|
||||||
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
||||||
"format": "pbf",
|
"format": "pbf",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ "type": "FeatureCollection", "properties": {
|
{ "type": "FeatureCollection", "properties": {
|
||||||
"antimeridian_adjusted_bounds": "-135.000000,37.874853,-122.280579,40.979898",
|
"antimeridian_adjusted_bounds": "-122.343750,37.874853,-122.280579,37.900865",
|
||||||
"bounds": "-135.000000,37.874853,-122.280579,40.979898",
|
"bounds": "-122.343750,37.874853,-122.280579,37.900865",
|
||||||
"center": "-122.299805,37.892187,12",
|
"center": "-122.299805,37.892187,12",
|
||||||
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
||||||
"format": "pbf",
|
"format": "pbf",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ "type": "FeatureCollection", "properties": {
|
{ "type": "FeatureCollection", "properties": {
|
||||||
"antimeridian_adjusted_bounds": "-135.000000,37.694688,-122.103424,40.979898",
|
"antimeridian_adjusted_bounds": "-122.343750,37.694688,-122.103424,37.900865",
|
||||||
"bounds": "-135.000000,37.694688,-122.103424,40.979898",
|
"bounds": "-122.343750,37.694688,-122.103424,37.900865",
|
||||||
"center": "-122.299805,37.892187,12",
|
"center": "-122.299805,37.892187,12",
|
||||||
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
"description": "tests/join-population/tabblock_06001420.mbtiles",
|
||||||
"format": "pbf",
|
"format": "pbf",
|
||||||
|
|||||||
+10
-8
@@ -411,15 +411,17 @@ void append_tile(std::string message, int z, unsigned x, unsigned y, std::map<st
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (auto const &g : outfeature.geometry) {
|
for (auto const &g : outfeature.geometry) {
|
||||||
// pin to the tile extent, since we don't want bounds bigger than the earth
|
if (g.op == mvt_moveto || g.op == mvt_lineto) {
|
||||||
long long gx = std::min((long long) outlayer.extent, std::max(0LL, g.x));
|
// pin to the tile extent, since we don't want bounds bigger than the earth
|
||||||
long long gy = std::min((long long) outlayer.extent, std::max(0LL, g.y));
|
long long gx = std::min((long long) outlayer.extent, std::max(0LL, g.x));
|
||||||
|
long long gy = std::min((long long) outlayer.extent, std::max(0LL, g.y));
|
||||||
|
|
||||||
// initially keep bounds in tile coordinates
|
// initially keep bounds in tile coordinates
|
||||||
minx = std::min(minx, gx);
|
minx = std::min(minx, gx);
|
||||||
miny = std::min(miny, gy);
|
miny = std::min(miny, gy);
|
||||||
maxx = std::max(maxx, gx);
|
maxx = std::max(maxx, gx);
|
||||||
maxy = std::max(maxy, gy);
|
maxy = std::max(maxy, gy);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
features_added++;
|
features_added++;
|
||||||
|
|||||||
Reference in New Issue
Block a user