switch from osmosis to osmconvert in import scripts; it's SO much faster

This commit is contained in:
Dustin Carlino 2019-10-26 09:52:36 -07:00
parent 9a3e7dc758
commit 06ebf3cb2c
3 changed files with 7 additions and 7 deletions

View File

@ -47,7 +47,7 @@ Things to try:
## For developers: Compiling from source
To build, you need a Linux-like environment with `bash`, `wget`, `unzip`, etc.
You also `osmosis` for the import script. At runtime if you want to use the
You also `osmconvert` for the import script. At runtime if you want to use the
screen-capture plugin, you need `scrot`.
1. Install Rust, at least 1.38. https://www.rust-lang.org/tools/install

View File

@ -6,6 +6,6 @@ set -e
wget http://download.geofabrik.de/north-america/us/washington-latest.osm.pbf
osmupdate -v washington-latest.osm.pbf updated_wa.osm.pbf
rm -fv washington-latest.osm.pbf data/input/*.osm
osmosis --read-pbf updated_wa.osm.pbf --bounding-polygon file=data/polygons/huge_seattle.poly completeWays=true --write-xml data/input/Seattle.osm
osmconvert updated_wa.osm.pbf -B=data/polygons/huge_seattle.poly --complete-ways -o=data/input/Seattle.osm
rm -fv updated_wa.osm.pbf
# Then run import.sh
# Then delete the individual .osm's desired and run import.sh

View File

@ -55,10 +55,10 @@ fi
for poly in `ls data/polygons/`; do
name=`basename -s .poly $poly`;
if [ ! -f data/input/$name.osm ]; then
osmosis \
--read-xml enableDateParsing=no file=data/input/Seattle.osm \
--bounding-polygon file=data/polygons/$name.poly completeWays=true \
--write-xml data/input/$name.osm
osmconvert data/input/Seattle.osm \
-B=data/polygons/$name.poly \
--complete-ways \
-o=data/input/$name.osm
fi
done