diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f2647cf3..01565a584 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.34.7 + +* Limit the length of the generator_options in the tileset metadata + ## 1.34.6 * Fix crash when there are null entries in the metadata table diff --git a/tests/join-population/concat.mbtiles.json b/tests/join-population/concat.mbtiles.json index 91741cb53..7ac54b0bc 100644 --- a/tests/join-population/concat.mbtiles.json +++ b/tests/join-population/concat.mbtiles.json @@ -3,7 +3,7 @@ "center": "-122.104097,37.695438,0", "description": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", "format": "pbf", -"generator_options": "./tippecanoe -q -f -z0 -n abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -o tests/join-population/macarthur.mbtiles tests/join-population/macarthur.json; ./tippecanoe -q -f -z0 -n abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -o tests/join-population/macarthur.mbtiles tests/join-population/macarthur.json; ./tippecanoe -q -f -z0 -n abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -o tests/join-population/macarthur.mbtiles tests/join-population/macarthur.json; ./tippecanoe -q -f -z0 -n abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -o tests/join-population/macarthur.mbtiles tests/join-population/macarthur.json; ./tippecanoe -q -f -z0 -n abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -o tests/join-population/macarthur.mbtiles tests/join-population/macarthur.json; ./tippecanoe -q -f -z0 -n abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -o tests/join-population/macarthur.mbtiles tests/join-population/macarthur.json; ./tile-join -f -o tests/join-population/concat.mbtiles tests/join-population/macarthur.mbtiles tests/join-population/macarthur.mbtiles tests/join-population/macarthur.mbtiles tests/join-population/macarthur.mbtiles tests/join-population/macarthur.mbtiles tests/join-population/macarthur.mbtiles", +"generator_options": "...; ./tippecanoe -q -f -z0 -n abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -o tests/join-population/macarthur.mbtiles tests/join-population/macarthur.json; ./tippecanoe -q -f -z0 -n abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -o tests/join-population/macarthur.mbtiles tests/join-population/macarthur.json; ./tippecanoe -q -f -z0 -n abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -o tests/join-population/macarthur.mbtiles tests/join-population/macarthur.json; ./tile-join -f -o tests/join-population/concat.mbtiles tests/join-population/macarthur.mbtiles tests/join-population/macarthur.mbtiles tests/join-population/macarthur.mbtiles tests/join-population/macarthur.mbtiles tests/join-population/macarthur.mbtiles tests/join-population/macarthur.mbtiles", "json": "{\"vector_layers\": [ { \"id\": \"macarthur\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 0, \"fields\": {\"FULLNAME\": \"String\", \"LINEARID\": \"String\", \"MTFCC\": \"String\", \"RTTYP\": \"String\"} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"macarthur\",\"count\": 24,\"geometry\": \"LineString\",\"attributeCount\": 4,\"attributes\": [{\"attribute\": \"FULLNAME\",\"count\": 3,\"type\": \"string\",\"values\": [\"Macarthur\",\"Macarthur Fwy\",\"W Macarthur\"]},{\"attribute\": \"LINEARID\",\"count\": 4,\"type\": \"string\",\"values\": [\"1102954918511\",\"1104474748623\",\"1104486090991\",\"1104486392881\"]},{\"attribute\": \"MTFCC\",\"count\": 2,\"type\": \"string\",\"values\": [\"S1100\",\"S1400\"]},{\"attribute\": \"RTTYP\",\"count\": 1,\"type\": \"string\",\"values\": [\"M\"]}]}]}}", "maxzoom": "0", "minzoom": "0", diff --git a/tile-join.cpp b/tile-join.cpp index 25e63ef7f..ba4786806 100644 --- a/tile-join.cpp +++ b/tile-join.cpp @@ -830,8 +830,13 @@ void decode(struct reader *readers, std::map &layer const unsigned char *s = sqlite3_column_text(r->stmt, 0); if (s != NULL) { if (generator_options.size() != 0) { - generator_options.append("; "); - generator_options.append((const char *) s); + if (generator_options.size() + strlen((const char *) s) > 500) { + generator_options = "...; "; + generator_options.append((const char *) s); + } else { + generator_options.append("; "); + generator_options.append((const char *) s); + } } else { generator_options = (const char *) s; } diff --git a/version.hpp b/version.hpp index a1f8a5265..018dd6e23 100644 --- a/version.hpp +++ b/version.hpp @@ -1,6 +1,6 @@ #ifndef VERSION_HPP #define VERSION_HPP -#define VERSION "v1.34.6" +#define VERSION "v1.34.7" #endif