From 3bb5a9c3810574cd2790aaa018ed41e98f85f157 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Wed, 28 Aug 2019 15:22:25 -0700 Subject: [PATCH] Add a test for tar output format --- Makefile | 8 +++++++- tests/raw-tiles/raw-tiles.json | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ae542a1..856f20f 100644 --- a/Makefile +++ b/Makefile @@ -140,7 +140,7 @@ parallel-test: raw-tiles-test: ./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_options -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 # Test that -z and -Z work in tippecanoe-decode ./tippecanoe-decode -x generator -Z6 -z7 tests/raw-tiles/raw-tiles > tests/raw-tiles/raw-tiles-z67.json.check @@ -149,6 +149,12 @@ raw-tiles-test: ./tile-join -q -f -Z6 -z7 -e tests/raw-tiles/raw-tiles-z67 tests/raw-tiles/raw-tiles ./tippecanoe-decode -x generator tests/raw-tiles/raw-tiles-z67 > tests/raw-tiles/raw-tiles-z67-join.json.check cmp tests/raw-tiles/raw-tiles-z67-join.json.check tests/raw-tiles/raw-tiles-z67-join.json + # Test that writing to tar does basically the same thing as -e + rm -r tests/raw-tiles/raw-tiles + mkdir -p tests/raw-tiles/raw-tiles + ./tippecanoe -q --output-to-tar -r1 -pC --name tests/raw-tiles/raw-tiles --description tests/raw-tiles/raw-tiles tests/raw-tiles/hackspots.geojson | (cd tests/raw-tiles/raw-tiles && tar xf -) + ./tippecanoe-decode -x generator_options -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/raw-tiles-z67 tests/raw-tiles/raw-tiles.json.check raw-tiles-z67.json.check tests/raw-tiles/raw-tiles-z67-join.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 diff --git a/tests/raw-tiles/raw-tiles.json b/tests/raw-tiles/raw-tiles.json index 76c8f7c..a685c64 100644 --- a/tests/raw-tiles/raw-tiles.json +++ b/tests/raw-tiles/raw-tiles.json @@ -3,7 +3,6 @@ "center": "-122.662354,45.514045,14", "description": "tests/raw-tiles/raw-tiles", "format": "pbf", -"generator_options": "./tippecanoe -q -f -e tests/raw-tiles/raw-tiles -r1 -pC tests/raw-tiles/hackspots.geojson", "json": "{\"vector_layers\": [ { \"id\": \"hackspots\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 14, \"fields\": {\"Address\": \"String\", \"Name\": \"String\", \"Notes\": \"String\"} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"hackspots\",\"count\": 4,\"geometry\": \"Point\",\"attributeCount\": 3,\"attributes\": [{\"attribute\": \"Address\",\"count\": 4,\"type\": \"string\",\"values\": [\"1507 N Rosa Parks Way Portland, OR 97217\",\"201 SE 12th Ave, Portland, OR 97214\",\"4637 N Albina Ave Portland, OR 97217\",\"915 SE Hawthorne Blvd. Portland, OR 97214\"]},{\"attribute\": \"Name\",\"count\": 4,\"type\": \"string\",\"values\": [\"Albina Press\",\"Arbor Lodge\",\"Lucky Labrador Brew Pub\",\"Three Friends Coffeehouse\"]},{\"attribute\": \"Notes\",\"count\": 3,\"type\": \"string\",\"values\": [\"\",\"Dog friendly\",\"usually busy, outlets on side wall only\"]}]}]}}", "maxzoom": "14", "minzoom": "0",