Minor fixes.
This commit is contained in:
parent
68a82ccbc8
commit
7440596f69
36
README.md
36
README.md
@ -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,9 +29,10 @@ 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`.
|
||||
|
||||
- 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`.
|
||||
|
||||
- `outputs` is the default folder for generated output.
|
||||
|
||||
@ -39,9 +41,9 @@ The two main folders are `inputs` and `outputs`:
|
||||
This project can be used to generate two types of files:
|
||||
|
||||
- Graph file (`.mapgr`) containing graph information (see
|
||||
[OSM2Graph](https://github.com/Holt59/OSM2Graph));
|
||||
[OSM2Graph](https://github.com/Holt59/OSM2Graph));
|
||||
- Mapsforge file (`.mapfg`) containing [mapsforge](https://github.com/mapsforge/mapsforge)
|
||||
data to display graph in a more visual way.
|
||||
data to display graph in a more visual way.
|
||||
|
||||
The process to generate the Mapsforge file is more complex than the one to generate graph file,
|
||||
and it will often take much more time. Fortunately, it is often **not necessary** to generate
|
||||
@ -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,8 +94,11 @@ 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
|
||||
sudo apt install gdal python-gdal
|
||||
|
||||
# CentOS
|
||||
sudo yum install gdal gdal-python
|
||||
@ -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
|
||||
@ -113,10 +118,9 @@ same directory as the PBF or in the `inputs/bbox` directory (recommended).
|
||||
This script will generate multiple intermediate files, but only two are importants:
|
||||
|
||||
- `inputs/europe/france/bretagne/morbihan.bbox`, actual bounding-box of the PBF file —
|
||||
This will overwrite the old bounding-box if there was one.
|
||||
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.
|
||||
|
||||
for mapsforge.
|
||||
|
||||
#### Step 2 - Generate graph & Mapsforge files
|
||||
|
||||
@ -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
|
Loading…
Reference in New Issue
Block a user