diff --git a/CHANGELOG.md b/CHANGELOG.md index d08dfcb..5ecea67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +## 1.32.0 + +* Fix a bug that allowed coalescing of features with mismatched attributes + if they had been passed through a shell prefilter + +## 1.31.7 + +* Create the output tile directory even if there are no valid features + +## 1.31.6 + +* Issue an error message in tile-join if minzoom is greater than maxzoom + ## 1.31.5 * Add options to change the tilestats limits diff --git a/Makefile b/Makefile index 6e670f0..ad6225c 100644 --- a/Makefile +++ b/Makefile @@ -140,10 +140,15 @@ parallel-test: rm tests/parallel/*.mbtiles tests/parallel/*.json raw-tiles-test: - ./tippecanoe -q -f -e tests/raw-tiles/raw-tiles -r1 tests/raw-tiles/hackspots.geojson -pC + ./tippecanoe -q -f -e tests/raw-tiles/raw-tiles -r1 -pC tests/raw-tiles/hackspots.geojson ./tippecanoe-decode -x generator tests/raw-tiles/raw-tiles > tests/raw-tiles/raw-tiles.json.check cmp tests/raw-tiles/raw-tiles.json.check tests/raw-tiles/raw-tiles.json rm -rf tests/raw-tiles/raw-tiles tests/raw-tiles/compare.json.check + # Test that metadata.json is created even if all features are clipped away + ./tippecanoe -q -f -e tests/raw-tiles/nothing tests/raw-tiles/nothing.geojson + ./tippecanoe-decode -x generator tests/raw-tiles/nothing > tests/raw-tiles/nothing.json.check + cmp tests/raw-tiles/nothing.json.check tests/raw-tiles/nothing.json + rm -r tests/raw-tiles/nothing tests/raw-tiles/nothing.json.check decode-test: mkdir -p tests/muni/decode diff --git a/dirtiles.cpp b/dirtiles.cpp index 3104caf..51773c7 100644 --- a/dirtiles.cpp +++ b/dirtiles.cpp @@ -65,6 +65,7 @@ static bool pbfname(const char *s) { void check_dir(const char *dir, bool force, bool forcetable) { struct stat st; + mkdir(dir, S_IRWXU | S_IRWXG | S_IRWXO); std::string meta = std::string(dir) + "/" + "metadata.json"; if (force) { unlink(meta.c_str()); // error OK since it may not exist; diff --git a/main.cpp b/main.cpp index bec8fa7..e2ee27b 100644 --- a/main.cpp +++ b/main.cpp @@ -3060,7 +3060,7 @@ int main(int argc, char **argv) { } if (minzoom > maxzoom) { - fprintf(stderr, "minimum zoom -Z cannot be greater than maxzoom -z\n"); + fprintf(stderr, "%s: Minimum zoom -Z%d cannot be greater than maxzoom -z%d\n", argv[0], minzoom, maxzoom); exit(EXIT_FAILURE); } diff --git a/tests/raw-tiles/nothing.geojson b/tests/raw-tiles/nothing.geojson new file mode 100644 index 0000000..bfbf441 --- /dev/null +++ b/tests/raw-tiles/nothing.geojson @@ -0,0 +1,5 @@ +{ +"type": "FeatureCollection", +"features": [ +{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 999,999 ]} } +] } diff --git a/tests/raw-tiles/nothing.json b/tests/raw-tiles/nothing.json new file mode 100644 index 0000000..8c91ef8 --- /dev/null +++ b/tests/raw-tiles/nothing.json @@ -0,0 +1,13 @@ +{ "type": "FeatureCollection", "properties": { +"bounds": "-180.000000,85.051129,180.000000,85.051129", +"center": "-179.989014,85.051129,14", +"description": "tests/raw-tiles/nothing", +"format": "pbf", +"json": "{\"vector_layers\": [ { \"id\": \"nothing\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 14, \"fields\": {} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"nothing\",\"count\": 1,\"geometry\": \"Point\",\"attributeCount\": 0,\"attributes\": []}]}}", +"maxzoom": "14", +"minzoom": "0", +"name": "tests/raw-tiles/nothing", +"type": "overlay", +"version": "2" +}, "features": [ +] } diff --git a/tile-join.cpp b/tile-join.cpp index ea75012..594e56f 100644 --- a/tile-join.cpp +++ b/tile-join.cpp @@ -1137,6 +1137,11 @@ int main(int argc, char **argv) { usage(argv); } + if (minzoom > maxzoom) { + fprintf(stderr, "%s: Minimum zoom -Z%d cannot be greater than maxzoom -z%d\n", argv[0], minzoom, maxzoom); + exit(EXIT_FAILURE); + } + if (out_mbtiles != NULL) { if (force) { unlink(out_mbtiles); diff --git a/version.hpp b/version.hpp index 2829d01..5589f67 100644 --- a/version.hpp +++ b/version.hpp @@ -1,6 +1,6 @@ #ifndef VERSION_HPP #define VERSION_HPP -#define VERSION "v1.31.5" +#define VERSION "v1.32.0" #endif