Added sql to validate geometry and other make commands to run them manually

pull/82/head
admire 2019-06-05 11:31:16 +02:00
rodzic fcfd44dff7
commit d2de10eaad
3 zmienionych plików z 36 dodań i 5 usunięć

Wyświetl plik

@ -112,12 +112,41 @@ timestamp:
@echo "------------------------------------------------------------------" @echo "------------------------------------------------------------------"
@docker exec -t -i $(PROJECT_ID)_imposm cat /home/settings/timestamp.txt @docker exec -t -i $(PROJECT_ID)_imposm cat /home/settings/timestamp.txt
###
# SQL FILES
###
import_sql: import_sql
@echo
@echo "------------------------------------------------------------------"
@echo "Importing SQL files"
@echo "------------------------------------------------------------------"
@docker exec -i $(PROJECT_ID)_db su - postgres -c "psql -f /home/settings/clip/clip.sql gis"
validate_geom: validate_geom
@echo
@echo "------------------------------------------------------------------"
@echo "Validating geom for all tables"
@echo "------------------------------------------------------------------"
@docker exec -t -i $(PROJECT_ID)_db /bin/su - postgres -c "psql gis -c 'Select validate_geom();'"
clip_tables: clip_tables
@echo
@echo "------------------------------------------------------------------"
@echo "Clip tables using the clip layer"
@echo "------------------------------------------------------------------"
@docker exec -t -i $(PROJECT_ID)_db /bin/su - postgres -c "psql gis -c 'Select clean_tables();'"
### ###
# STYLES # STYLES
### ###
import_styles: remove_styles import_styles: import_styles
@echo @echo
@echo "------------------------------------------------------------------" @echo "------------------------------------------------------------------"
@echo "Importing QGIS styles" @echo "Importing QGIS styles"

Wyświetl plik

@ -19,7 +19,8 @@ services:
# Uncomment to expose the postgis database on the network # Uncomment to expose the postgis database on the network
# - ALLOW_IP_RANGE= 0.0.0.0/0 # - ALLOW_IP_RANGE= 0.0.0.0/0
volumes: volumes:
- 'osm-postgis-data:/var/lib/postgresql' - osm-postgis-data:/var/lib/postgresql
- ./settings:/home/settings
# Uncomment to use the postgis database from outside the docker network # Uncomment to use the postgis database from outside the docker network
# ports: # ports:
# - "35432:5432" # - "35432:5432"
@ -68,8 +69,8 @@ services:
- DBSCHEMA_BACKUP=backup - DBSCHEMA_BACKUP=backup
# Install some styles if you are using the default mapping. It can be 'yes' or 'no' # Install some styles if you are using the default mapping. It can be 'yes' or 'no'
- QGIS_STYLE=yes - QGIS_STYLE=yes
# Use clip in the database # Use clip in the database - To use this you should have run make import_clip to add your clip to the DB
- CLIP=no - CLIP=yes
osmupdate: osmupdate:
build: docker-osmupdate build: docker-osmupdate

Wyświetl plik

@ -106,7 +106,8 @@ make backup_styles
### SQL Trigger ### SQL Trigger
You can add PostGIS functions, triggers, materialized views in the SQL file. You can add PostGIS functions, triggers, materialized views in the clip SQL file. You need to run
`make import_sql` to run the clip SQL file
### Build and run ### Build and run