Add support for pmtiles output format (#55)

* add pmtiles.hpp from github.com/protomaps/PMTiles [#10]

* tippecanoe main writes pmtiles output. [#10]

* detect output format using suffix
* after mbtiles is done writing, replace with pmtiles based on map/image tables.
* add method to write_json for writing json sub-object.

* tippecanoe-decode reads pmtiles input. [#10]

* tile-join reads and writes pmtiles. [#10]

* pmtiles test suite for decode and tile-join [#10]

* add base GitHub CI action for compiling and test suite.

* update pmtiles.hpp with z>15 fix

* Fix some ordering problems with pmtiles decode

* Pmtiles should also pass the raw tiles tests

* Eradicate spaces from tileset metadata JSON fields

* Eradicate spaces from more test fixtures

* Update more tests

* Pmtiles tests pass now too

* Remove unnecessary sort (and make indent)

* Update changelog

* The allow-existing test for pmtiles needs -o, not -e

* Declare --allow-existing to be unsupported for pmtiles.

It was always a bad idea even for mbtiles.

Co-authored-by: Brandon Liu <bdon@bdon.org>
This commit is contained in:
Erica Fischer
2022-12-29 12:00:13 -08:00
committed by GitHub
co-authored by Brandon Liu
parent a374263466
commit 3b2599f587
197 changed files with 2517 additions and 325 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
"description": "tests/knox/out/-zg.json.check.mbtiles",
"format": "pbf",
"generator_options": "./tippecanoe -q -a@ -f -o tests/knox/out/-zg.json.check.mbtiles -zg tests/knox/in.json",
"json": "{\"vector_layers\": [ { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 10, \"fields\": {\"FULLNAME\": \"String\", \"LINEARID\": \"String\", \"MTFCC\": \"String\", \"RTTYP\": \"String\"} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"in\",\"count\": 53,\"geometry\": \"LineString\",\"attributeCount\": 4,\"attributes\": [{\"attribute\": \"FULLNAME\",\"count\": 9,\"type\": \"string\",\"values\": [\"E Old US Hwy 150\",\"E US Hwy 50\",\"E US Hwy 50-150\",\"N US Hwy 41\",\"Old US Hwy 41\",\"US Hwy 150\",\"US Hwy 41\",\"US Hwy 41 S\",\"US Hwy 50\"]},{\"attribute\": \"LINEARID\",\"count\": 53,\"type\": \"string\",\"values\": [\"110170070259\",\"110170070260\",\"110170070261\",\"110170070271\",\"110170070272\",\"110170070276\",\"110170070277\",\"110170070318\",\"110170070320\",\"110170071138\",\"110170072467\",\"1104257570399\",\"1104257599171\",\"1104257610285\",\"1104257610358\",\"1104257616296\",\"1104257622329\",\"1104257624305\",\"1104257624535\",\"1104257624536\",\"1104257624538\",\"1104257624700\",\"1104257627422\",\"1104257627423\",\"1104257640853\",\"1104257690581\",\"1104469553886\",\"1104469613150\",\"1104469613492\",\"1104471568916\",\"1104471680885\",\"1104471685645\",\"1104471685646\",\"1104471685675\",\"1104471685676\",\"1104471686635\",\"1104471686636\",\"1104472002543\",\"1104485818173\",\"1104485818174\",\"1104485838817\",\"1104485841551\",\"1104485841552\",\"1104485841553\",\"1104485841554\",\"1104485841555\",\"1104485841556\",\"1104485841662\",\"1104485841663\",\"1104485841664\",\"1104485841665\",\"1104485841666\",\"1104485841667\"]},{\"attribute\": \"MTFCC\",\"count\": 2,\"type\": \"string\",\"values\": [\"S1200\",\"S1400\"]},{\"attribute\": \"RTTYP\",\"count\": 2,\"type\": \"string\",\"values\": [\"M\",\"U\"]}]}]}}",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":10,\"fields\":{\"FULLNAME\":\"String\",\"LINEARID\":\"String\",\"MTFCC\":\"String\",\"RTTYP\":\"String\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":53,\"geometry\":\"LineString\",\"attributeCount\":4,\"attributes\":[{\"attribute\":\"FULLNAME\",\"count\":9,\"type\":\"string\",\"values\":[\"E Old US Hwy 150\",\"E US Hwy 50\",\"E US Hwy 50-150\",\"N US Hwy 41\",\"Old US Hwy 41\",\"US Hwy 150\",\"US Hwy 41\",\"US Hwy 41 S\",\"US Hwy 50\"]},{\"attribute\":\"LINEARID\",\"count\":53,\"type\":\"string\",\"values\":[\"110170070259\",\"110170070260\",\"110170070261\",\"110170070271\",\"110170070272\",\"110170070276\",\"110170070277\",\"110170070318\",\"110170070320\",\"110170071138\",\"110170072467\",\"1104257570399\",\"1104257599171\",\"1104257610285\",\"1104257610358\",\"1104257616296\",\"1104257622329\",\"1104257624305\",\"1104257624535\",\"1104257624536\",\"1104257624538\",\"1104257624700\",\"1104257627422\",\"1104257627423\",\"1104257640853\",\"1104257690581\",\"1104469553886\",\"1104469613150\",\"1104469613492\",\"1104471568916\",\"1104471680885\",\"1104471685645\",\"1104471685646\",\"1104471685675\",\"1104471685676\",\"1104471686635\",\"1104471686636\",\"1104472002543\",\"1104485818173\",\"1104485818174\",\"1104485838817\",\"1104485841551\",\"1104485841552\",\"1104485841553\",\"1104485841554\",\"1104485841555\",\"1104485841556\",\"1104485841662\",\"1104485841663\",\"1104485841664\",\"1104485841665\",\"1104485841666\",\"1104485841667\"]},{\"attribute\":\"MTFCC\",\"count\":2,\"type\":\"string\",\"values\":[\"S1200\",\"S1400\"]},{\"attribute\":\"RTTYP\",\"count\":2,\"type\":\"string\",\"values\":[\"M\",\"U\"]}]}]}}",
"maxzoom": "10",
"minzoom": "0",
"name": "tests/knox/out/-zg.json.check.mbtiles",