diff --git a/Makefile b/Makefile index 386eefc..638a372 100644 --- a/Makefile +++ b/Makefile @@ -402,8 +402,12 @@ import-data: start-db .PHONY: import-borders import-borders: start-db-nowait +ifeq (,$(wildcard $(BORDERS_CSV_FILE))) @$(assert_area_is_given) - # If CSV borders file already exists, use it without re-parsing + @echo "Generating borders out of $(PBF_FILE)" +else + @echo "Borders already exists. Useing $(BORDERS_CSV_FILE) to import borders" +endif $(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools sh -c \ 'pgwait && import-borders $$([ -f "$(BORDERS_CSV_FILE)" ] && echo load $(BORDERS_CSV_FILE) || echo import $(PBF_FILE))' @@ -414,7 +418,6 @@ 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)" @@ -425,7 +428,6 @@ 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) using PostGIS ST_MVT()..." @rm -rf "$(MBTILES_LOCAL_FILE)" $(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools generate-tiles