From 1cea73cb7caa19adeb2ec61b502922e4f51ea23e Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Wed, 25 Aug 2021 21:35:06 -0400 Subject: [PATCH] Use st-asmvt pg tilegen in quickstart (#1193) * Use generate-tiles-pg target in quickstart * update makefile documentation --- Makefile | 6 ++++-- quickstart.sh | 13 +++---------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index ba85fe3b..386eefc7 100644 --- a/Makefile +++ b/Makefile @@ -181,7 +181,8 @@ Hints for developers: make generate-bbox-file # compute bounding box of a data file and store it in a file make generate-devdoc # generate devdoc including graphs for all layers [./layers/...] make generate-qa # statistics for a given layer's field - make generate-tiles # generate vector tiles based on .env settings + make generate-tiles-pg # generate vector tiles based on .env settings using PostGIS ST_MVT() + make generate-tiles # generate vector tiles based on .env settings using Mapnik (obsolete) cat .env # list PG database and MIN_ZOOM and MAX_ZOOM information cat quickstart.log # transcript of the last ./quickstart.sh run make help # help about available commands @@ -414,6 +415,7 @@ import-sql: all start-db-nowait .PHONY: generate-tiles generate-tiles: all start-db @$(assert_area_is_given) + @echo "WARNING: This Mapnik-based method of tile generation is obsolete. Use generate-tiles-pg instead." @echo "Generating tiles into $(MBTILES_LOCAL_FILE) (will delete if already exists)..." @rm -rf "$(MBTILES_LOCAL_FILE)" $(DOCKER_COMPOSE) run $(DC_OPTS) generate-vectortiles @@ -424,7 +426,7 @@ generate-tiles: all start-db .PHONY: generate-tiles-pg generate-tiles-pg: all start-db @$(assert_area_is_given) - @echo "Generating tiles into $(MBTILES_LOCAL_FILE) (will delete if already exists)..." + @echo "Generating tiles into $(MBTILES_LOCAL_FILE) (will delete if already exists) using PostGIS ST_MVT()..." @rm -rf "$(MBTILES_LOCAL_FILE)" $(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools generate-tiles @echo "Updating generated tile metadata ..." diff --git a/quickstart.sh b/quickstart.sh index 192cac2c..6133bcde 100755 --- a/quickstart.sh +++ b/quickstart.sh @@ -278,17 +278,10 @@ fi echo " " echo "-------------------------------------------------------------------------------------" -echo "====> : Start generating MBTiles (containing gzipped MVT PBF) from a TM2Source project. " -echo " : TM2Source project definitions : ./build/openmaptiles.tm2source/data.yml " +echo "====> : Start generating MBTiles (containing gzipped MVT PBF) using PostGIS. " echo " : Output MBTiles: ./data/${area}.mbtiles " -echo " : Source code: https://github.com/openmaptiles/openmaptiles-tools/tree/master/docker/generate-vectortiles " -echo " : We are using a lot of Mapbox Open Source tools! : https://github.com/mapbox " -echo " : Thank you https://www.mapbox.com !" -echo " : See other MVT tools : https://github.com/mapbox/awesome-vector-tiles " -echo " : " -echo " : You will see a lot of deprecated warning in the log! This is normal! " -echo " : like : Mapnik LOG> ... is deprecated and will be removed in Mapnik 4.x ... " -make generate-tiles +echo " : Source code: https://github.com/openmaptiles/openmaptiles-tools/blob/master/bin/generate-tiles " +make generate-tiles-pg echo " " echo "-------------------------------------------------------------------------------------"