diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f1f232cb..11d885c90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.18.1 + +* Only warn once about invalid polygons in tippecanoe-decode + ## 1.18.0 * Fix compression of tiles in tile-join diff --git a/decode.cpp b/decode.cpp index dca817ae9..e90a4bcdb 100644 --- a/decode.cpp +++ b/decode.cpp @@ -271,9 +271,15 @@ void handle(std::string message, int z, unsigned x, unsigned y, int describe, st if (i + 1 >= ops.size() || ops[i + 1].op == VT_MOVETO) { if (ops[i].op != VT_CLOSEPATH) { - fprintf(stderr, "Ring does not end with closepath (ends with %d)\n", ops[i].op); - if (!force) { - exit(EXIT_FAILURE); + static bool warned = false; + + if (!warned) { + fprintf(stderr, "Ring does not end with closepath (ends with %d)\n", ops[i].op); + if (!force) { + exit(EXIT_FAILURE); + } + + warned = true; } } } @@ -307,9 +313,15 @@ void handle(std::string message, int z, unsigned x, unsigned y, int describe, st int state = 0; for (size_t i = 0; i < rings.size(); i++) { if (i == 0 && areas[i] < 0) { - fprintf(stderr, "Polygon begins with an inner ring\n"); - if (!force) { - exit(EXIT_FAILURE); + static bool warned = false; + + if (!warned) { + fprintf(stderr, "Polygon begins with an inner ring\n"); + if (!force) { + exit(EXIT_FAILURE); + } + + warned = true; } } diff --git a/version.hpp b/version.hpp index babfe73fe..74600d902 100644 --- a/version.hpp +++ b/version.hpp @@ -1 +1 @@ -#define VERSION "tippecanoe v1.18.0\n" +#define VERSION "tippecanoe v1.18.1\n"