Merge branch 'master' of ssh://gitea.typename.fr:2222/INSA/be-graphes-map-generator
This commit is contained in:
commit
9cc05c42b6
40
README.md
40
README.md
@ -45,7 +45,7 @@ Doing so will avoid having a messy `inputs` folder due to region-specific files
|
|||||||
|
|
||||||
### Generating maps
|
### Generating maps
|
||||||
|
|
||||||
Only manual generation is supported as of now:
|
Only manual generation using `osmosis` is supported currently.
|
||||||
|
|
||||||
#### Mapsforge file:
|
#### Mapsforge file:
|
||||||
|
|
||||||
@ -68,6 +68,44 @@ bin/osmosis --rb inputs/bretagne/bretagne-latest.osm.pbf \
|
|||||||
--osm2graph file=outputs/rennes.mapgr writer=insa2018 map-id=0x235
|
--osm2graph file=outputs/rennes.mapgr writer=insa2018 map-id=0x235
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Combining generations
|
||||||
|
|
||||||
|
You can combine both generation using the `--tee` option of `osmosis`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# The order is important! You do not want to use osmosis filters/bounding-box before mapfile-writer.
|
||||||
|
bin/osmosis --rb inputs/bretagne/bretagne_merge.pbf --tee \
|
||||||
|
--mapfile-writer file=outputs/morbihan.mapfg bbox=$(cat inputs/bbox/morbihan.bbox) threads=2 \
|
||||||
|
--bounding-box $(cat inputs/bbox/morbihan.bbox | tr "," " " | xargs printf "bottom=%f left=%f top=%f right=%f") completeWays=yes
|
||||||
|
--used-node --tf reject-relations --tf accept-ways highway=(cat inputs/highway-filter.cmd) natural=coastline
|
||||||
|
--osm2graph file=ouputs/morbihan.mapgr writer=insa2018 map-id=0x400
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note**: You can add logging by specifying `--lp` between `osmosis` tasks.
|
||||||
|
|
||||||
|
|
||||||
|
### Bounding box
|
||||||
|
|
||||||
|
Bounding box files should contain a single line with comma-separated (**without spaces**) values:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
minLat,minLon,maxLat,maxLon
|
||||||
|
```
|
||||||
|
|
||||||
|
To use it with `osmosis`:
|
||||||
|
|
||||||
|
- for `mapfile-writer`, simply `cat` the file to set the `bbox` argument:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bbox=$(cat inputs/bbox/morbihan.bbox)
|
||||||
|
```
|
||||||
|
|
||||||
|
- for `osm2graph`, it is a bit more complicated:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
--bounding-box $(cat inputs/bbox/morbihan.bbox | tr "," " " | xargs printf "bottom=%f left=%f top=%f right=%f") completeWays=yes
|
||||||
|
```
|
||||||
|
|
||||||
### Fixing coastline
|
### Fixing coastline
|
||||||
|
|
||||||
When generating mapsforge file that contains sea, you will need to fix the PBF file prior to running osmosis.
|
When generating mapsforge file that contains sea, you will need to fix the PBF file prior to running osmosis.
|
||||||
|
Loading…
Reference in New Issue
Block a user