prepare
cd openmaptiles
vim .env # DIFF_MODE -> true
tuning postgresql
vim my_postgres.conf
# see my_postgres.conf
vim docker-compose.yml
# see below diff file
diff --git a/docker-compose.yml b/docker-compose.yml
index f064f58..5576326 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -7,11 +7,13 @@ services:
image: "openmaptiles/postgis:2.9"
volumes:
- pgdata:/var/lib/postgresql/data
+ - ./my-postgres.conf:/etc/postgresql/postgresql.conf
networks:
- postgres_conn
ports:
- "5432"
env_file: .env
+ command: postgres -c 'config_file=/etc/postgresql/postgresql.conf'
import-natural-earth:
image: "openmaptiles/import-natural-earth:1.4"
env_file: .env
install generate-tm2source
docker-compose run --rm openmaptiles-tools make clean
docker-compose run --rm openmaptiles-tools make
download osm data
mkdir data
cd data
wget http://free.nchc.org.tw/osm.planet/pbf/planet-180430.osm.pbf
cd ..
start postgis
docker-compose up -d postgres
import data
docker-compose run --rm import-water
docker-compose run --rm import-natural-earth
docker-compose run --rm import-lakelines
docker-compose run --rm import-osmborder
import osm
docker-compose run --rm import-osm
import wikidata(run import-wikidata only)
docker-compose run --rm import-wikidata
import sql and analyze it
docker-compose run --rm import-sql
docker-compose run --rm import-osm /usr/src/app/psql.sh -P pager=off -c 'ANALYZE VERBOSE;'
fix last.state.txt
mv last.state.txt last.state.txt.orig
wget https://planet.openstreetmap.org/replication/day/000/002/056.state.txt
mv 056.state.txt last.state.txt
run update osm
docker-compose run --rm update-osm
watching
watch docker-compose top