Add some documentation

This commit is contained in:
Pieter Vander Vennet 2024-03-05 02:24:25 +01:00
parent 62c6e20a37
commit cc1b190f9e

View file

@ -26,8 +26,12 @@ Use `vite-node ./scripts/osm2pgsql/generateBuildDbScript.ts`
## Importing data ## Importing data
Install osm2pgsql (hint: compile from source is painless) Install osm2pgsql (hint: compile from source is painless)
To seed the database:
Download the latest with:
`nohup transmission-cli https://planet.osm.org/pbf/planet-latest.osm.pbf.torrent &>nohup_transmission.log &`
which will download the data to `~/Downloads`
To seed the database:
```` ````
osm2pgsql -O flex -S build_db.lua -s --flat-nodes=import-help-file -d postgresql://user:password@localhost:5444/osm-poi <file>.osm.pbf osm2pgsql -O flex -S build_db.lua -s --flat-nodes=import-help-file -d postgresql://user:password@localhost:5444/osm-poi <file>.osm.pbf
```` ````
@ -49,6 +53,7 @@ HP ProLiant DL360 G7 (1U): 2Rx4 DDR3-memory (PC3)
## Updating data ## Updating data
`osm2pgsql-replication update -d postgresql://user:password@localhost:5444/osm-poi -- -O flex -S build_db.lua -s --flat-nodes=import-help-file` `osm2pgsql-replication update -d postgresql://user:password@localhost:5444/osm-poi -- -O flex -S build_db.lua -s --flat-nodes=import-help-file`