You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -26,10 +30,19 @@ Make a image of OSM data of an area from 2 dates, showing what was changed.
26
30
cd osm-mapping-party-before-after
27
31
```
28
32
29
-
### Install & use via Docker image
33
+
## Use via Docker or MyBinder
34
+
35
+
If you do not want to install the whole pipeline yourself, you can run this setup in a Docker container that is ready-to-use and that can also run in the free-to-use open source cloud infrastructure of _MyBinder_.
36
+
37
+
If you want to use the _MyBinder_ version, [click here and wait a bit](https://mybinder.org/v2/gh/gedankenstuecke/osm-mapping-party-before-after/binderrize?labpath=make-images.ipynb). This will launch the version online in a virtual machine and lets you interact with the code through a small Python notebook that will launch automatically and contains all necessary instructions.
38
+
39
+
The MyBinder version has two drawbacks: 1. You will have to upload the OSM history file (_\*.osh.pbf_) into the container. Depending on the region of interest these can be quite large. 2. Creating the maps will take longer, as other external downloads will have to be downloaded on the fly. See [this blog post for more details](https://tzovar.as/map-comparisons/).
40
+
41
+
If you want to run the Docker image on your own computer, you can find the necessary [image is available on Docker Hub under `gedankenstuecke/osm-mapping-party-before-after`](https://hub.docker.com/r/gedankenstuecke/osm-mapping-party-before-after).
30
42
31
-
Alternatively, if you do not want to install the whole pipeline yourself, you can run this setup in a Docker container that is ready to use.
32
-
We start, by cloning this repository:
43
+
### Building the Docker container from scratch
44
+
45
+
Alternatively, you can also build the container locally if you want to make changes to it/improve it: We start by cloning this repository:
This step needs to be run only once, and it can take a few minutes as it will download and build all the dependencies needed.
61
+
62
+
#### Running the container locally
63
+
48
64
Once the step is finished, you can launch the container like so:
49
65
50
66
```bash
@@ -53,26 +69,26 @@ Once the step is finished, you can launch the container like so:
53
69
54
70
The command takes two parameters:
55
71
56
-
1. the name of the container (as specified above)
57
-
2. a full path to a directory you want to use for accessing and writing files to from the container (i.e. Input and output files). Depending on how you installed/run Docker, this folder might need full read/write permissions for other users (e.g. run `chmod 777`).
72
+
1. the name of the container (e.g. as specified during the `docker build` step)
73
+
2. a full path to a directory you want to use for accessing and writing files to from the container (i.e. input and output files). Depending on how you installed/run Docker, this folder might need full read/write permissions for other users (e.g. run `chmod 777`).
58
74
59
-
The `docker_run.sh`command will launch the container itself, including the necessary postgres database etc.
60
-
It will also create two virtual docker volumes (named `pgdata` and `osm_data`).
61
-
These volumes are used to store external data, i.e. the database contents and the `openstreetmap-carto` external files.
75
+
The `docker_run.sh`command will then launch the container itself, including the necessary postgres database and the notebook interface. It will also create two virtual docker volumes (named `pgdata` and `osm_data`). These volumes are used to store external data, i.e. the database contents and the `openstreetmap-carto` external files, so that subsequent launches are faster than the initial one.
62
76
63
-
Once the docker container is running, you can connect into it to get a bash inside to run the commands as outlined below using:
77
+
After running the `./docker_run.sh`command you will see a lot of text running by while the container sets itself up. At the end of this, you should see this:
64
78
65
-
```bash
66
-
docker exec -ti map-before-after bash
79
+
```
80
+
To access the server, open this file in a browser:
The resulting shell puts you into the equivalent of the root of this repository, in a folder called `/workdir`. From there you can use this repository as outlined below.
70
-
71
-
All output files are saved in the `/workdir` by default, you can from there move them into `/workdir/output` inside the container to access files on your host operating system.
87
+
Clicking on the `http://127.0.0.1:8888/tree?…` link will open the notebook interface in your web-browser, where you can open the `make-images.ipynb` notebook, which will have all the necessary instructions to get started.
72
88
73
-
A [ready-built image is available on Docker Hub](https://hub.docker.com/r/gedankenstuecke/osm-mapping-party-before-after).
89
+
## Usage of `make.sh` without the container
74
90
75
-
## Usage
91
+
If you have tile-building setup on your computer, you can run `make.sh` without Docker, following these steps:
76
92
77
93
1. Download an OSM history file (`.osh.pbf`) e.g. from [Geofabrik's internal download server](https://osm-internal.download.geofabrik.de/?landing_page=true). You will need to log in with an OSM account.
78
94
1. Calculate the `BBOX` with [BBoxFinder.com](http://bboxfinder.com/).
0 commit comments