diff --git a/CHANGELOG.md b/CHANGELOG.md index c5137251..26bb202a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 2.47.0 + +* Stabilize feature order in tippecanoe-overzoom when --preserve-feature-order is specified but the sequence attribute is not present + # 2.46.0 * Polygon dust returns to having the attributes of the contributing feature nearest the placeholder instead of the contributing feature with the largest area. diff --git a/Makefile b/Makefile index 99d330bd..1384daad 100644 --- a/Makefile +++ b/Makefile @@ -278,6 +278,12 @@ overzoom-test: tippecanoe-overzoom ./tippecanoe-decode tests/pbf/13-1310-3166.pbf 13 1310 3166 > tests/pbf/13-1310-3166.pbf.json.check cmp tests/pbf/13-1310-3166.pbf.json.check tests/pbf/13-1310-3166.pbf.json rm tests/pbf/13-1310-3166.pbf tests/pbf/13-1310-3166.pbf.json.check + # Make sure feature order is stable + ./tippecanoe-overzoom --preserve-input-order -o tests/pbf/11-327-791-out.pbf tests/pbf/11-327-791.pbf 11/327/791 11/327/791 + ./tippecanoe-decode tests/pbf/11-327-791.pbf 11 327 791 > tests/pbf/11-327-791.json + ./tippecanoe-decode tests/pbf/11-327-791-out.pbf 11 327 791 > tests/pbf/11-327-791-out.json + cmp tests/pbf/11-327-791.json tests/pbf/11-327-791-out.json + rm tests/pbf/11-327-791.json tests/pbf/11-327-791-out.json tests/pbf/11-327-791-out.pbf # Different detail and buffer, and attribute stripping ./tippecanoe-overzoom -d8 -b30 -y NAME -y name -y scalerank -o tests/pbf/13-1310-3166-8-30.pbf tests/pbf/11-327-791.pbf 11/327/791 13/1310/3166 ./tippecanoe-decode tests/pbf/13-1310-3166-8-30.pbf 13 1310 3166 > tests/pbf/13-1310-3166-8-30.pbf.json.check diff --git a/clip.cpp b/clip.cpp index 4972afa2..72f447e4 100644 --- a/clip.cpp +++ b/clip.cpp @@ -895,6 +895,7 @@ std::string overzoom(const mvt_tile &tile, int oz, int ox, int oy, int nz, int n static const std::string retain_points_multiplier_sequence = "tippecanoe:retain_points_multiplier_sequence"; for (auto feature : layer.features) { + feature.seq = 0; bool flush_multiplier_cluster = false; if (demultiply) { for (ssize_t i = feature.tags.size() - 2; i >= 0; i -= 2) { diff --git a/version.hpp b/version.hpp index f091e508..8f804096 100644 --- a/version.hpp +++ b/version.hpp @@ -1,6 +1,6 @@ #ifndef VERSION_HPP #define VERSION_HPP -#define VERSION "v2.46.0" +#define VERSION "v2.47.0" #endif