From b87d3de5d13ae5c861103532eeedf58f27feea6a Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Fri, 19 Feb 2016 16:33:48 -0800 Subject: [PATCH 1/2] Increase maximum tile size for decoding --- decode.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/decode.cc b/decode.cc index 51d8f3c..2fc6eae 100644 --- a/decode.cc +++ b/decode.cc @@ -5,6 +5,8 @@ #include #include #include +#include +#include #include "vector_tile.pb.h" #include "tile.h" @@ -88,7 +90,10 @@ void handle(std::string message, int z, unsigned x, unsigned y, int describe) { if (is_compressed(message)) { std::string uncompressed; decompress(message, uncompressed); - if (!tile.ParseFromString(uncompressed)) { + google::protobuf::io::ArrayInputStream stream(uncompressed.c_str(), uncompressed.length()); + google::protobuf::io::CodedInputStream codedstream(&stream); + codedstream.SetTotalBytesLimit(10 * 67108864, 5 * 67108864); + if (!tile.ParseFromCodedStream(&codedstream)) { fprintf(stderr, "Couldn't decompress tile %d/%u/%u\n", z, x, y); exit(EXIT_FAILURE); } From 1549328e4e7a66904183ba9b3fa8bdce463d3b7a Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Fri, 19 Feb 2016 16:50:40 -0800 Subject: [PATCH 2/2] Bump version number --- CHANGELOG.md | 4 ++++ version.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d99e822..dbe76d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.9.2 + +* Increase maximum tile size for tippecanoe-decode + ## 1.9.1 * Incorporate Mapnik's Clipper upgrades for consistent results between Mac and Linux diff --git a/version.h b/version.h index 691564b..a1d639e 100644 --- a/version.h +++ b/version.h @@ -1 +1 @@ -#define VERSION "tippecanoe v1.9.1\n" +#define VERSION "tippecanoe v1.9.2\n"