This repository has been archived by the owner on Feb 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from ehrenfeu/master
Linux Makefiles + some minor stuff.
- Loading branch information
Showing
5 changed files
with
77 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1354,4 +1354,4 @@ char *charString(Item_t *item, char *type, int idx) { | |
default: break; | ||
} | ||
return string1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |