|
1 | | -# Mapping before & after |
| 1 | +# Mapping party before–after |
2 | 2 |
|
3 | | -Make a image of data of an area in OSM with data from 2 dates, showing what was changed before & after |
| 3 | +Make a image of OSM data of an area from 2 dates, showing what was changed. |
4 | 4 |
|
5 | 5 | ## Installation |
6 | 6 |
|
7 | | -This script uses [`nik4`](https://github.com/Zverik/Nik4) to generate an image with the [`openstreetmap-carto` map style](https://github.com/gravitystorm/openstreetmap-carto/) |
8 | | - |
9 | | -Follow the [`openstreetmap-carto` installation instructions](https://github.com/gravitystorm/openstreetmap-carto/blob/master/INSTALL.md), first. |
10 | | - |
11 | | -Install `nik4`. |
12 | | - |
| 7 | +1. *On macOS:* [install Homebrew](https://brew.sh/#:~:text=Install%20Homebrew) |
| 8 | +1. [Install `pipx`](https://pipx.pypa.io/stable/installation/#installing-pipx) |
| 9 | +1. [Install `openstreetmap-carto`](https://github.com/gravitystorm/openstreetmap-carto/blob/4ec2dc9391c411e124c78b3ba1aad9173fea20cb/INSTALL.md) |
| 10 | +1. Install [`osmium-tool`](https://github.com/osmcode/osmium-tool) |
| 11 | +1. [Install Mapnik](https://github.com/mapnik/mapnik/blob/master/INSTALL.md#source-build) |
| 12 | +1. [Install `python-mapnik`](https://github.com/mapnik/python-mapnik#building-from-source) |
| 13 | +1. Install [`nik4`](https://github.com/Zverik/Nik4) (used to generate an image with the [`openstreetmap-carto` map style](https://github.com/gravitystorm/openstreetmap-carto/)): |
| 14 | + ```bash |
| 15 | + pipx install nik4 |
| 16 | + ``` |
| 17 | +1. [Install GraphicsMagick](http://www.graphicsmagick.org/README.html#id4) |
| 18 | +1. *On macOS:* replace built-in `coreutils` commands with the GNU ones: |
| 19 | + ```bash |
| 20 | + brew install coreutils |
| 21 | + export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH |
| 22 | + ``` |
| 23 | +1. Clone this repo: |
| 24 | + ```bash |
| 25 | + git clone --recurse-submodules https://github.com/amandasaurus/osm-mapping-party-before-after |
| 26 | + cd osm-mapping-party-before-after |
| 27 | + ``` |
13 | 28 |
|
14 | 29 | ## Usage |
15 | 30 |
|
16 | | -First download an OSM history from, e.g. from [Geofabrik's Download service](https://osm-internal.download.geofabrik.de/). You will need to log in with an OSM account. |
17 | | - |
18 | | -A `BBOX` can be can be calculated with [BBoxFinder.com](http://bboxfinder.com/). |
19 | | - |
20 | | -The `BEFORE_TIME` & `AFTER_TIME` are ISO timestamps. |
21 | | - |
22 | | -``` |
23 | | -./make.sh OSM_HISTORY_FILE.osh.pbf BEFORE_TIME AFTER_TIME BBOX MIN_ZOOM MAX_ZOOM |
24 | | -``` |
25 | | - |
26 | | -## Example |
| 31 | +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. |
| 32 | +1. Calculate the `BBOX` with [BBoxFinder.com](http://bboxfinder.com/). |
| 33 | + 1. *Draw a rectangle* |
| 34 | + 1. Copy the *Box* value |
| 35 | +1. Run the following command: |
| 36 | + ```bash |
| 37 | + ./make.sh OSM_HISTORY_FILE.osh.pbf BEFORE_TIME AFTER_TIME BBOX MIN_ZOOM MAX_ZOOM |
| 38 | + ``` |
| 39 | + The `BEFORE_TIME` & `AFTER_TIME` are ISO 8601 timestamps. |
| 40 | +
|
| 41 | +## Example output |
27 | 42 |
|
28 | 43 |  |
29 | 44 |
|
|
0 commit comments