Tile-join had not been compressing its tiles.

This commit is contained in:
Eric Fischer
2017-05-11 12:08:47 -07:00
parent 685e1a4360
commit 30d54ff50d
4 changed files with 17 additions and 6 deletions
+8 -2
View File
@@ -54,9 +54,10 @@ struct lonlat {
void handle(std::string message, int z, unsigned x, unsigned y, int describe, std::set<std::string> const &to_decode) {
int within = 0;
mvt_tile tile;
bool was_compressed;
try {
if (!tile.decode(message)) {
if (!tile.decode(message, was_compressed)) {
fprintf(stderr, "Couldn't parse tile %d/%u/%u\n", z, x, y);
exit(EXIT_FAILURE);
}
@@ -68,7 +69,12 @@ void handle(std::string message, int z, unsigned x, unsigned y, int describe, st
printf("{ \"type\": \"FeatureCollection\"");
if (describe) {
printf(", \"properties\": { \"zoom\": %d, \"x\": %d, \"y\": %d }", z, x, y);
printf(", \"properties\": { \"zoom\": %d, \"x\": %d, \"y\": %d", z, x, y);
if (!was_compressed) {
printf(", \"compressed\": false");
}
printf(" }");
if (projection != projections) {
printf(", \"crs\": { \"type\": \"name\", \"properties\": { \"name\": ");