-
Notifications
You must be signed in to change notification settings - Fork 494
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a way to enable options like --flat-nodes (fixes #53)
- Loading branch information
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,6 +94,7 @@ docker run \ | |
-d overv/openstreetmap-tile-server \ | ||
run | ||
``` | ||
|
||
### AUTOVACUUM | ||
|
||
The database use the autovacuum feature by default. This behavior can be changed with `AUTOVACUUM` environment variable. For example: | ||
|
@@ -105,6 +106,20 @@ docker run \ | |
-d overv/openstreetmap-tile-server \ | ||
run | ||
``` | ||
|
||
### 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: | ||
|
||
``` | ||
docker run \ | ||
-v /absolute/path/to/luxembourg.osm.pbf:/data.osm.pbf \ | ||
-v openstreetmap-data:/var/lib/postgresql/10/main \ | ||
-e OSM2PGSQL_EXTRA_ARGS=--flat-nodes \ | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Overv
Author
Owner
|
||
overv/openstreetmap-tile-server \ | ||
import | ||
``` | ||
|
||
### Benchmarks | ||
|
||
You can find an example of the import performance to expect with this image on the [OpenStreetMap wiki](https://wiki.openstreetmap.org/wiki/Osm2pgsql/benchmarks#debian_9_.2F_openstreetmap-tile-server). | ||
|
@@ -129,6 +144,10 @@ docker run \ | |
``` | ||
For too high values you may notice excessive CPU load and memory usage. It might be that you will have to experimentally find the best values for yourself. | ||
|
||
### The import process unexpectedly exits | ||
|
||
You may be running into problems with memory usage during the import. Have a look at the "Flat nodes" section in this README. | ||
|
||
## License | ||
|
||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The
--flat-nodes
option is requiring a file path where to store the flat nodes file.The file should be mounted as an additional volume, so that it isn't lost when recreating the container.