Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/das-g/docker-osm-planet
manage your copy of the OpenStreetMap planet file from within a docker container
https://github.com/das-g/docker-osm-planet
Last synced: 17 days ago
JSON representation
manage your copy of the OpenStreetMap planet file from within a docker container
- Host: GitHub
- URL: https://github.com/das-g/docker-osm-planet
- Owner: das-g
- License: unlicense
- Created: 2015-11-09T16:07:46.000Z (about 9 years ago)
- Default Branch: develop
- Last Pushed: 2015-11-10T15:45:49.000Z (about 9 years ago)
- Last Synced: 2023-04-18T20:26:47.608Z (over 1 year ago)
- Language: Shell
- Size: 0 Bytes
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-osm-planet
manage your copy of the OpenStreetMap planet file from within a docker container## usage
The container will download the latest OSM planet when run to its internal directory `/var/data/osm-planet`. Thus, mount a data-only container or a host directory to that location to receive the file:E.g., if you want the planet file inside `~/tmp/data-osm` on your host:
```shell
mkdir -p ~/tmp/data-osm
docker run --rm -ti -v ~/tmp/data-osm:/var/data/osm-planet geometalab/osm-planet
```The `-ti` in there allows you to abort the download with **Ctrl-c**.
The `--rm` removes the container when finished. (There's no good reason to keep it.)### advanced usage
Pass the following environment variables to `docker run` with `--env =` to override the defaults:
* **`osm_planet_mirror`** — OpenStreetMap planet mirror. See [OSM wiki](http://wiki.openstreetmap.org/wiki/Planet.osm#Planet.osm_mirrors) for available servers.
* **`osm_planet_path_relative_to_mirror`** — the file to download from the mirror. Defaults to `pbf/planet-latest.osm.pbf`
* **`osm_planet_dir`** — where to place the downloaded file inside the container. Defaults to `/var/data/osm-planet`. You'll want to mount a host direcotry or another container's volume to the location you specify here, so that you can retrieve the downloaded file when the osm-planet container has been removed after running.E.g., if you want Switzerland inside `~/tmp/data-osm` on your host (from geofabrik):
```shell
docker run --rm -ti -e osm_planet_mirror='http://download.geofabrik.de/' -e osm_planet_path_relative_to_mirror='europe/switzerland-latest.osm.pbf' -v ~/tmp/data-osm:/var/data/osm-planet geometalab/osm-planet
```