diff --git a/CHANGELOG.md b/CHANGELOG.md index d7c08508e..8ccf0a700 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 2.37.0 + +* Speed up tile-join overzooming and make it use less memory, by not including empty child tiles in the enumeration + # 2.36.0 * Make tile-join distrust the source tilesets' metadata maxzoom and minzoom diff --git a/clip.cpp b/clip.cpp index c6793af50..512ab2fd5 100644 --- a/clip.cpp +++ b/clip.cpp @@ -754,7 +754,7 @@ static std::vector> clip_poly1(std::vector const &keep, bool do_compress, - std::vector> *child_tiles) { + std::vector> *next_overzoomed_tiles) { mvt_tile tile; try { @@ -768,12 +768,12 @@ std::string overzoom(std::string s, int oz, int ox, int oy, int nz, int nx, int exit(EXIT_PROTOBUF); } - return overzoom(tile, oz, ox, oy, nz, nx, ny, detail, buffer, keep, do_compress, child_tiles); + return overzoom(tile, oz, ox, oy, nz, nx, ny, detail, buffer, keep, do_compress, next_overzoomed_tiles); } std::string overzoom(mvt_tile tile, int oz, int ox, int oy, int nz, int nx, int ny, int detail, int buffer, std::set const &keep, bool do_compress, - std::vector> *child_tiles) { + std::vector> *next_overzoomed_tiles) { mvt_tile outtile; for (auto const &layer : tile.layers) { @@ -892,7 +892,7 @@ std::string overzoom(mvt_tile tile, int oz, int ox, int oy, int nz, int nx, int } } - if (child_tiles != NULL) { + if (next_overzoomed_tiles != NULL) { // will any child tiles have features in them? // find out recursively from the tile we just made. // @@ -907,7 +907,7 @@ std::string overzoom(mvt_tile tile, int oz, int ox, int oy, int nz, int nx, int nz + 1, nx * 2 + x, ny * 2 + y, detail, buffer, keep, false, NULL); if (child.size() > 0) { - child_tiles->emplace_back(nx * 2 + x, ny * 2 + y); + next_overzoomed_tiles->emplace_back(nx * 2 + x, ny * 2 + y); } } } diff --git a/geometry.hpp b/geometry.hpp index 8bb713064..1cbaa8ef1 100644 --- a/geometry.hpp +++ b/geometry.hpp @@ -100,10 +100,10 @@ double distance_from_line(long long point_x, long long point_y, long long segA_x std::string overzoom(mvt_tile tile, int oz, int ox, int oy, int nz, int nx, int ny, int detail, int buffer, std::set const &keep, bool do_compress, - std::vector> *child_tiles); + std::vector> *next_overzoomed_tiles); std::string overzoom(std::string s, int oz, int ox, int oy, int nz, int nx, int ny, int detail, int buffer, std::set const &keep, bool do_compress, - std::vector> *child_tiles); + std::vector> *next_overzoomed_tiles); #endif diff --git a/tile-join.cpp b/tile-join.cpp index 61e56bee5..6e2f93199 100644 --- a/tile-join.cpp +++ b/tile-join.cpp @@ -659,7 +659,7 @@ struct tileset_reader { } } } else { - overzoomed_tiles = next_overzoomed_tiles; + overzoomed_tiles = std::move(next_overzoomed_tiles); next_overzoomed_tiles.clear(); } diff --git a/version.hpp b/version.hpp index 922d5ce74..5cd56cb78 100644 --- a/version.hpp +++ b/version.hpp @@ -1,6 +1,6 @@ #ifndef VERSION_HPP #define VERSION_HPP -#define VERSION "v2.36.0" +#define VERSION "v2.37.0" #endif