Use osmium to update planet file instead of osmosis, it is much faster.
authorJochen Topf <jochen@topf.org>
Sun, 22 Nov 2015 17:38:13 +0000 (18:38 +0100)
committerJochen Topf <jochen@topf.org>
Sun, 22 Nov 2015 17:38:13 +0000 (18:38 +0100)
cookbooks/taginfo/templates/default/update-planet.erb

index 371369b..2eaf6fb 100644 (file)
@@ -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