From 2814f1ccf22b953707925607db50ae7efaaa5522 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Fri, 21 Aug 2015 14:37:55 -0700 Subject: [PATCH] Check for tiles that are too large to upload. --- tile-join.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tile-join.cc b/tile-join.cc index 43ce2a6..447c67e 100644 --- a/tile-join.cc +++ b/tile-join.cc @@ -292,6 +292,11 @@ void handle(std::string message, int z, unsigned x, unsigned y, struct pool **fi outtile.SerializeToString(&s); compress(s, compressed); + if (compressed.size() > 500000) { + fprintf(stderr, "Tile %d/%u/%u size is %lld, >500000. Skipping this tile\n.", z, x, y, (long long) compressed.size()); + return; + } + mbtiles_write_tile(outdb, z, x, y, compressed.data(), compressed.size()); }