Fix flat nodes explanation
This commit is contained in:
parent
31bf2d718b
commit
8744ab2792
13
README.md
13
README.md
@ -109,13 +109,22 @@ docker run \
|
|||||||
|
|
||||||
### Flat nodes
|
### Flat nodes
|
||||||
|
|
||||||
If you are planning to import the entire planet or you are running into memory errors then you may want to enable the `--flat-nodes` option for osm2pgsql as follows:
|
If you are planning to import the entire planet or you are running into memory errors then you may want to enable the `--flat-nodes` option for osm2pgsql. This option takes a path to a file that must be persisted so we should first set up a volume with the right permissions:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -it -v openstreetmap-nodes:/nodes --entrypoint=bash overv/openstreetmap-tile-server
|
||||||
|
$ chown renderer:renderer -R /nodes
|
||||||
|
$ exit
|
||||||
|
```
|
||||||
|
|
||||||
|
You can then use it during the import process as follows:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run \
|
docker run \
|
||||||
-v /absolute/path/to/luxembourg.osm.pbf:/data.osm.pbf \
|
-v /absolute/path/to/luxembourg.osm.pbf:/data.osm.pbf \
|
||||||
|
-v openstreetmap-nodes:/nodes \
|
||||||
-v openstreetmap-data:/var/lib/postgresql/10/main \
|
-v openstreetmap-data:/var/lib/postgresql/10/main \
|
||||||
-e OSM2PGSQL_EXTRA_ARGS=--flat-nodes \
|
-e "OSM2PGSQL_EXTRA_ARGS=--flat-nodes /nodes/flat_nodes.bin" \
|
||||||
overv/openstreetmap-tile-server \
|
overv/openstreetmap-tile-server \
|
||||||
import
|
import
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user