Skip to content

Commit 8744ab2

Browse files
committed
Fix flat nodes explanation
1 parent 31bf2d7 commit 8744ab2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,22 @@ docker run \
109109

110110
### Flat nodes
111111

112-
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:
112+
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:
113+
114+
```
115+
docker run -it -v openstreetmap-nodes:/nodes --entrypoint=bash overv/openstreetmap-tile-server
116+
$ chown renderer:renderer -R /nodes
117+
$ exit
118+
```
119+
120+
You can then use it during the import process as follows:
113121

114122
```
115123
docker run \
116124
-v /absolute/path/to/luxembourg.osm.pbf:/data.osm.pbf \
125+
-v openstreetmap-nodes:/nodes \
117126
-v openstreetmap-data:/var/lib/postgresql/10/main \
118-
-e OSM2PGSQL_EXTRA_ARGS=--flat-nodes \
127+
-e "OSM2PGSQL_EXTRA_ARGS=--flat-nodes /nodes/flat_nodes.bin" \
119128
overv/openstreetmap-tile-server \
120129
import
121130
```

0 commit comments

Comments
 (0)