Update README.

This commit is contained in:
Mikaël Capelle 2020-07-15 14:24:59 +00:00
parent c2ade638ef
commit 1b71531b5e

View File

@ -72,9 +72,9 @@ bin/osmosis --rb inputs/europe/france/bretagne/bretagne.osm.pbf \ # Specify your
*Using a polygon:* *Using a polygon:*
```bash ```bash
osmosis --rb inputs/europe/france/bretagne/bretagne.osm.pbf \ # Specify your input PBF bin/osmosis --rb inputs/europe/france/bretagne/bretagne.osm.pbf \ # Specify your input PBF
--bounding-polygon file=inputs/bbox/morbihan.poly completeWays=yes \ # Specify your bounding polygon --bounding-polygon file=inputs/europe/france/bretagne/morbihan.poly completeWays=yes \ # Specify your bounding polygon
--write-pbf file=inputs/europe/france/bretagne/morbihan.pbf # Specify your output file --write-pbf file=inputs/europe/france/bretagne/morbihan.pbf # Specify your output file
``` ```
The `inputs` directory contains bounding-box (`.bbox`) and bounding polygon (`.poly`) for some The `inputs` directory contains bounding-box (`.bbox`) and bounding polygon (`.poly`) for some
@ -88,11 +88,23 @@ regions. You can find polygon for a lots of region here:
**Important**: You can skip this step if your region does not contain sea or big inner **Important**: You can skip this step if your region does not contain sea or big inner
lakes, or if you do not want to generate the corresponding Mapsforge file. lakes, or if you do not want to generate the corresponding Mapsforge file.
You will need GDAL for this section, and the python bindings, you can usually install them
using a package manager:
```bash
# Debian
sudo apt install gdal python-gdal
# CentOS
sudo yum install gdal gdal-python
```
We need to add sea information to the PBF file to generate a correct mapsforge map. To do so, We need to add sea information to the PBF file to generate a correct mapsforge map. To do so,
a script `coastline-fix.sh` is provided. Run it simply: a script `coastline-fix.sh` is provided. Run it simply:
```bash ```bash
./coastline-fix.sh bretagne/morbihan.pbf cd inputs
./coastline-fix.sh inputs/europe/france/bretagne/morbihan.pbf
``` ```
To apply the fix, you need a polygon file (`morbihan.poly` — not another name), in the To apply the fix, you need a polygon file (`morbihan.poly` — not another name), in the