mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-02 01:08:14 +00:00
Merge pull request #645 from mapbox/empty-tileset-dir
Create the output tile directory even if there are no valid features
This commit is contained in:
commit
b7fb576544
@ -1,3 +1,7 @@
|
|||||||
|
## 1.31.7
|
||||||
|
|
||||||
|
* Create the output tile directory even if there are no valid features
|
||||||
|
|
||||||
## 1.31.6
|
## 1.31.6
|
||||||
|
|
||||||
* Issue an error message in tile-join if minzoom is greater than maxzoom
|
* Issue an error message in tile-join if minzoom is greater than maxzoom
|
||||||
|
7
Makefile
7
Makefile
@ -137,10 +137,15 @@ parallel-test:
|
|||||||
rm tests/parallel/*.mbtiles tests/parallel/*.json
|
rm tests/parallel/*.mbtiles tests/parallel/*.json
|
||||||
|
|
||||||
raw-tiles-test:
|
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
|
./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
|
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
|
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:
|
decode-test:
|
||||||
mkdir -p tests/muni/decode
|
mkdir -p tests/muni/decode
|
||||||
|
@ -65,6 +65,7 @@ static bool pbfname(const char *s) {
|
|||||||
void check_dir(const char *dir, bool force, bool forcetable) {
|
void check_dir(const char *dir, bool force, bool forcetable) {
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
|
mkdir(dir, S_IRWXU | S_IRWXG | S_IRWXO);
|
||||||
std::string meta = std::string(dir) + "/" + "metadata.json";
|
std::string meta = std::string(dir) + "/" + "metadata.json";
|
||||||
if (force) {
|
if (force) {
|
||||||
unlink(meta.c_str()); // error OK since it may not exist;
|
unlink(meta.c_str()); // error OK since it may not exist;
|
||||||
|
5
tests/raw-tiles/nothing.geojson
Normal file
5
tests/raw-tiles/nothing.geojson
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"type": "FeatureCollection",
|
||||||
|
"features": [
|
||||||
|
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 999,999 ]} }
|
||||||
|
] }
|
13
tests/raw-tiles/nothing.json
Normal file
13
tests/raw-tiles/nothing.json
Normal 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": [
|
||||||
|
] }
|
@ -1,6 +1,6 @@
|
|||||||
#ifndef VERSION_HPP
|
#ifndef VERSION_HPP
|
||||||
#define VERSION_HPP
|
#define VERSION_HPP
|
||||||
|
|
||||||
#define VERSION "v1.31.6"
|
#define VERSION "v1.31.7"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user