Make tile-join and tippecanoe-decode more flexible about directories:

* Accept .mvt as well as .pbf in directories of tiles
* Allow tippecanoe-decode and tile-join of directories with no metadata
This commit is contained in:
Eric Fischer
2019-02-20 12:04:10 -08:00
parent b1ae63ab86
commit 8df0455230
5 changed files with 49 additions and 24 deletions
+3 -1
View File
@@ -1,5 +1,6 @@
#include <string>
#include <vector>
#include <sys/stat.h>
#ifndef DIRTILES_HPP
#define DIRTILES_HPP
@@ -12,6 +13,7 @@ struct zxy {
long long z;
long long x;
long long y;
std::string extension = ".pbf";
zxy(int _z, int _x, int _y)
: z(_z), x(_x), y(_y) {
@@ -36,7 +38,7 @@ struct zxy {
}
std::string path() {
return std::to_string(z) + "/" + std::to_string(x) + "/" + std::to_string(y) + ".pbf";
return std::to_string(z) + "/" + std::to_string(x) + "/" + std::to_string(y) + extension;
}
};