From: Jochen Topf Date: Sun, 22 Nov 2015 17:38:13 +0000 (+0100) Subject: Use osmium to update planet file instead of osmosis, it is much faster. X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/ceca7e797914afd20ce466420f5896338e7144c2 Use osmium to update planet file instead of osmosis, it is much faster. --- diff --git a/cookbooks/taginfo/templates/default/update-planet.erb b/cookbooks/taginfo/templates/default/update-planet.erb index 371369b07..2eaf6fbb3 100644 --- a/cookbooks/taginfo/templates/default/update-planet.erb +++ b/cookbooks/taginfo/templates/default/update-planet.erb @@ -17,6 +17,8 @@ STATEDIR="${PLANETDIR}/replication" OSCFILE="${PLANETDIR}/$(date +%Y%m%d-%H%M).osc" OSCFILEPREV="${PLANETDIR}/previous.osc" +OSMIUM=<%= @directory %>/osmium-tool/build/src/osmium + # start logging exec > "${LOGDIR}/$(date +%Y%m%d-%H%M).log" 2>&1 @@ -33,7 +35,8 @@ fi # osc file is ready, create new planet file -osmosis --read-xml-change "$OSCFILE" --read-bin "$PLANETCURR" --buffer bufferCapacity=12000 --apply-change --buffer bufferCapacity=12000 --write-pbf file="$PLANETNEW" +#osmosis --read-xml-change "$OSCFILE" --read-bin "$PLANETCURR" --buffer bufferCapacity=12000 --apply-change --buffer bufferCapacity=12000 --write-pbf file="$PLANETNEW" +$OSMIUM apply-changes --verbose --remove-deleted --simplify --fsync --output=$PLANETNEW $PLANETCURR $OSCFILE # cleanup