Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Commit

Permalink
Add "getworld" that is using the online Overpass variant.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehrenfeu committed Jan 20, 2015
1 parent c158403 commit a3014f3
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions sports/getworld.remoteoverpass
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

# should need around 30 minutes per run (20141131)
while true; do
# twice a day extract types and
cat types.txt | while read type; do
touch sort.osm
while [ -e sort.osm ]; do
# get all matching nodes from Overpass
wget -O xapi.osm http://overpass.osm.rambler.ru/cgi/xapi?*[$type][@meta]
# put found nodes into sort.osm
if ~/bin/osmosis -q --rx file=xapi.osm --s --wx file=sort.osm 2> /dev/null; then
rm xapi.osm
if [ -e merge.osm ]; then
# check for differences to supress doubles and append them
~/bin/osmosis -q --rx file=merge.osm --rx file=sort.osm --m --wx file=tmp.osm 2> /dev/null
mv tmp.osm merge.osm
rm sort.osm
else
# create new
mv sort.osm merge.osm
fi
else
touch sort.osm
fi
done
done
mv merge.osm next.osm
done

# send the next.osm to the rendering server (i.e. echo as of 20141131)
#rsync push to echo
# rsync -rvz -e 'ssh -i ../Access/alexej-openssh-priv.txt -p 22001' next.osm [email protected]:sports-renderer/
# sleep for half a day
# sleep 43200

0 comments on commit a3014f3

Please sign in to comment.