Remove area checks in Makefile for import-borders & generate-tiles-pg (#1200)
While importing multiple .pbf files into postgres I was confronted with some unnecessary problems: 1. I wanted to use the borders of the planet which I had already generated. But `make import-borders` needs a .pbf file which is not necessary if the line.csv file is already existing -> So I added a check if the line.csv is **not** existing it checks for the `area parameter` / .pbf file 2. `make generate-tiles-pg` is only possible with a specified `area parameter` BUT the area is not used / needed for generation -> So I removed the area check
This commit is contained in:
parent
3818979143
commit
910db7f60c
8
Makefile
8
Makefile
@ -402,8 +402,12 @@ import-data: start-db
|
|||||||
|
|
||||||
.PHONY: import-borders
|
.PHONY: import-borders
|
||||||
import-borders: start-db-nowait
|
import-borders: start-db-nowait
|
||||||
|
ifeq (,$(wildcard $(BORDERS_CSV_FILE)))
|
||||||
@$(assert_area_is_given)
|
@$(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 \
|
$(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))'
|
'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
|
.PHONY: generate-tiles
|
||||||
generate-tiles: all start-db
|
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 "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)..."
|
@echo "Generating tiles into $(MBTILES_LOCAL_FILE) (will delete if already exists)..."
|
||||||
@rm -rf "$(MBTILES_LOCAL_FILE)"
|
@rm -rf "$(MBTILES_LOCAL_FILE)"
|
||||||
@ -425,7 +428,6 @@ generate-tiles: all start-db
|
|||||||
|
|
||||||
.PHONY: generate-tiles-pg
|
.PHONY: generate-tiles-pg
|
||||||
generate-tiles-pg: all start-db
|
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()..."
|
@echo "Generating tiles into $(MBTILES_LOCAL_FILE) (will delete if already exists) using PostGIS ST_MVT()..."
|
||||||
@rm -rf "$(MBTILES_LOCAL_FILE)"
|
@rm -rf "$(MBTILES_LOCAL_FILE)"
|
||||||
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools generate-tiles
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools generate-tiles
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user