diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f4f35ee --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +# vim swap files +.*.sw? + +*.o +searender/searender +searender/s57toosm + +# all osm files +*.osm diff --git a/searender/Makefile.linux b/searender/Makefile.linux new file mode 100644 index 0000000..994c79d --- /dev/null +++ b/searender/Makefile.linux @@ -0,0 +1,27 @@ +.PHONY: clean + +CFLAGS=-std=gnu99 + +all: s57toosm searender + +clean: + rm -vf *.o s57toosm searender + +s57toosm: s57toosm.o s57obj.o s57att.o s57val.o + cc -o s57toosm s57toosm.o s57obj.o s57att.o s57val.o + +# ATTENTION: the "-lm" flag for gcc IS ABSOLUTELY REQUIRED to be placed AFTER +# the code/object files, see http://wiki.debian.org/ToolChain/DSOLinking +searender: searender.o map.o render.o rules.o s57obj.o s57att.o s57val.o + cc -o searender searender.o map.o render.o rules.o s57obj.o s57att.o s57val.o -lm + +s57toosm.o: s57toosm.c map.h s57obj.h s57att.h s57val.h +searender.o: searender.c map.h render.h rules.h s57obj.h s57att.h s57val.h + +map.o: map.c map.h s57val.h +render.o: render.c render.h map.h render.h s57val.h +rules.o: rules.c rules.h map.h render.h s57obj.h s57att.h s57val.h +s57obj.o: s57obj.c s57obj.h +s57att.o: s57att.c s57obj.h s57att.h +s57val.o: s57val.c s57obj.h s57att.h s57val.h + diff --git a/searender/Makefile b/searender/Makefile.macos similarity index 92% rename from searender/Makefile rename to searender/Makefile.macos index b4e0024..322ada7 100644 --- a/searender/Makefile +++ b/searender/Makefile.macos @@ -1,7 +1,12 @@ +.PHONY: clean + CFLAGS=-std=c99 all: s57toosm searender +clean: + rm -vf *.o s57toosm searender + s57toosm: s57toosm.o s57obj.o s57att.o s57val.o cc -o s57toosm s57toosm.o s57obj.o s57att.o s57val.o -liconv diff --git a/searender/render.c b/searender/render.c index 3ed176d..8d18517 100644 --- a/searender/render.c +++ b/searender/render.c @@ -1354,4 +1354,4 @@ char *charString(Item_t *item, char *type, int idx) { default: break; } return string1; -} \ No newline at end of file +} diff --git a/sports/getworld.remoteoverpass b/sports/getworld.remoteoverpass new file mode 100755 index 0000000..269fd5b --- /dev/null +++ b/sports/getworld.remoteoverpass @@ -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 alexej@213.95.21.157:sports-renderer/ +# sleep for half a day +# sleep 43200