Minor fixes.

This commit is contained in:
Mikael Capelle 2021-10-07 14:39:06 +02:00
parent 68a82ccbc8
commit 7440596f69
2 changed files with 21 additions and 17 deletions

View File

@ -19,6 +19,7 @@ bash init.sh
If you do not plan on generating maps with coastline for mapsforge (see below), you can use the `--no-shapefile` option
to avoid the download:
```bash
bash init.sh --no-shapefile
```
@ -28,6 +29,7 @@ bash init.sh --no-shapefile
The two main folders are `inputs` and `outputs`:
- `inputs` mainly contains:
- a script `coastline-fix.sh` to merge land/sea polygon (see below) and PBF files;
- multiple polygon (`.poly`) and bounding-box (`.bbox`) files for specific regions;
- PBF files downloaded organized in folder `$REGION/$REGION.pbf`.
@ -61,7 +63,7 @@ The first step is to a PBF files containining the region you want:
- Download a complete region from Geofabrik: [http://download.geofabrik.de/](http://download.geofabrik.de/)
- If necessary, chop a region previously downloaded:
*Using a bounding box:*
_Using a bounding box:_
```bash
bin/osmosis --rb inputs/europe/france/bretagne/bretagne.osm.pbf \ # Specify your input PBF
@ -69,7 +71,7 @@ bin/osmosis --rb inputs/europe/france/bretagne/bretagne.osm.pbf \ # Specify your
--write-pbf inputs/europe/france/bretagne/morbihan.pbf # Specify the output file
```
*Using a polygon:*
_Using a polygon:_
```bash
bin/osmosis --rb inputs/europe/france/bretagne/bretagne.osm.pbf \ # Specify your input PBF
@ -92,6 +94,9 @@ You will need GDAL for this section, and the python bindings, you can usually in
using a package manager:
```bash
# pip (better with a venv!)
pip install GDAL>=3
# Debian
sudo apt install gdal python-gdal
@ -104,7 +109,7 @@ a script `coastline-fix.sh` is provided. Run it simply:
```bash
cd inputs
./coastline-fix.sh inputs/europe/france/bretagne/morbihan.pbf
./coastline-fix.sh europe/france/bretagne/morbihan.pbf
```
To apply the fix, you need a polygon file (`morbihan.poly` — not another name), in the
@ -117,7 +122,6 @@ This will overwrite the old bounding-box if there was one.
- `inputs/europe/france/bretagne/morbihan_merge.pbf`, merged file that you should use as input
for mapsforge.
#### Step 2 - Generate graph & Mapsforge files
To generate both the graph file and the Mapsforge file corresponding to your input PBF,
@ -144,8 +148,8 @@ bounding-box:
```bash
bash generate.sh inputs/europe/france/bretagne/morbihan_merge.pbf \
--bounding-box inputs/europe/france/bretagne/morbihan.bbox \
--id FR-E --name "Bretagne" \
--output outputs/bretagne
--id FR-56 --name "Morbihan" \
--output outputs/morbihan
```
The script will automatically find the original file (`morbihan.pbf`) and use it to generate
@ -158,8 +162,8 @@ the polygon or bounding-box used for the generation of the PBF:
bash generate.sh inputs/europe/france/bretagne/morbihan_merge.pbf \
--bounding-box inputs/europe/france/bretagne/morbihan.bbox \
--bounding-polygon inputs/europe/france/bretagne/morbihan.poly \
--id FR-E --name "Bretagne" \
--output outputs/bretagne
--id FR-56 --name "Morbihan" \
--output outputs/morbihan
```
If both the `--bounding-box` and `--bounding-polygon` option are specified, the bounding-box

@ -1 +1 @@
Subproject commit c0f669e55a6f2fd9412a39d8d9733f7567b54ea8
Subproject commit 9e36e4e04fb42d999a3bc3966d82d4c2666d0a5c