Create the output tile directory even if there are no valid features

This commit is contained in:
Eric Fischer 2018-09-24 11:16:13 -07:00
parent 03199a77a5
commit b2999fe9a8
6 changed files with 30 additions and 2 deletions

View File

@ -1,3 +1,7 @@
## 1.31.7
* Create the output tile directory even if there are no valid features
## 1.31.6
* Issue an error message in tile-join if minzoom is greater than maxzoom

View File

@ -137,10 +137,15 @@ parallel-test:
rm tests/parallel/*.mbtiles tests/parallel/*.json
raw-tiles-test:
./tippecanoe -q -f -e tests/raw-tiles/raw-tiles -r1 tests/raw-tiles/hackspots.geojson -pC
./tippecanoe -q -f -e tests/raw-tiles/raw-tiles -r1 -pC tests/raw-tiles/hackspots.geojson
./tippecanoe-decode -x generator tests/raw-tiles/raw-tiles > tests/raw-tiles/raw-tiles.json.check
cmp tests/raw-tiles/raw-tiles.json.check tests/raw-tiles/raw-tiles.json
rm -rf tests/raw-tiles/raw-tiles tests/raw-tiles/compare.json.check
# Test that metadata.json is created even if all features are clipped away
./tippecanoe -q -f -e tests/raw-tiles/nothing tests/raw-tiles/nothing.geojson
./tippecanoe-decode -x generator tests/raw-tiles/nothing > tests/raw-tiles/nothing.json.check
cmp tests/raw-tiles/nothing.json.check tests/raw-tiles/nothing.json
rm -r tests/raw-tiles/nothing tests/raw-tiles/nothing.json.check
decode-test:
mkdir -p tests/muni/decode

View File

@ -65,6 +65,7 @@ static bool pbfname(const char *s) {
void check_dir(const char *dir, bool force, bool forcetable) {
struct stat st;
mkdir(dir, S_IRWXU | S_IRWXG | S_IRWXO);
std::string meta = std::string(dir) + "/" + "metadata.json";
if (force) {
unlink(meta.c_str()); // error OK since it may not exist;

View File

@ -0,0 +1,5 @@
{
"type": "FeatureCollection",
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 999,999 ]} }
] }

View File

@ -0,0 +1,13 @@
{ "type": "FeatureCollection", "properties": {
"bounds": "-180.000000,85.051129,180.000000,85.051129",
"center": "-179.989014,85.051129,14",
"description": "tests/raw-tiles/nothing",
"format": "pbf",
"json": "{\"vector_layers\": [ { \"id\": \"nothing\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 14, \"fields\": {} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"nothing\",\"count\": 1,\"geometry\": \"Point\",\"attributeCount\": 0,\"attributes\": []}]}}",
"maxzoom": "14",
"minzoom": "0",
"name": "tests/raw-tiles/nothing",
"type": "overlay",
"version": "2"
}, "features": [
] }

View File

@ -1,6 +1,6 @@
#ifndef VERSION_HPP
#define VERSION_HPP
#define VERSION "v1.31.6"
#define VERSION "v1.31.7"
#endif