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

Commit

Permalink
Merge pull request #5 from ehrenfeu/master
Browse files Browse the repository at this point in the history
Linux Makefiles + some minor stuff.
  • Loading branch information
ehrenfeu committed Jan 20, 2015
2 parents 91ef9e1 + a3014f3 commit daaec4b
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# vim swap files
.*.sw?

*.o
searender/searender
searender/s57toosm

# all osm files
*.osm
27 changes: 27 additions & 0 deletions searender/Makefile.linux
Original file line number Diff line number Diff line change
@@ -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

5 changes: 5 additions & 0 deletions searender/Makefile → searender/Makefile.macos
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion searender/render.c
Original file line number Diff line number Diff line change
Expand Up @@ -1354,4 +1354,4 @@ char *charString(Item_t *item, char *type, int idx) {
default: break;
}
return string1;
}
}
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 daaec4b

Please sign in to comment.