diff options
-rw-r--r-- | README | 1 | ||||
-rw-r--r-- | sources/db/README | 5 | ||||
-rwxr-xr-x | sources/db/osmium_tagstats | bin | 128430 -> 0 bytes | |||
-rwxr-xr-x | sources/db/tagstats | bin | 0 -> 299559 bytes | |||
-rwxr-xr-x | sources/db/update.sh | 15 | ||||
-rw-r--r-- | tagstats/Makefile | 7 | ||||
-rw-r--r-- | tagstats/README | 10 |
7 files changed, 31 insertions, 7 deletions
@@ -14,6 +14,7 @@ FILES * sources - import scripts * web - Web User Interface and API * examples - script to use the API +* tagstats - C++ program to create database statistics PREREQUISITES diff --git a/sources/db/README b/sources/db/README new file mode 100644 index 0000000..a9e2929 --- /dev/null +++ b/sources/db/README @@ -0,0 +1,5 @@ + +The tagstats binary in this directory is build for Ubuntu Maverick (10.10). It +might not work on your system. If not, you have to go to the ../../tagstats +directory and build your own version. + diff --git a/sources/db/osmium_tagstats b/sources/db/osmium_tagstats Binary files differdeleted file mode 100755 index ab5e21e..0000000 --- a/sources/db/osmium_tagstats +++ /dev/null diff --git a/sources/db/tagstats b/sources/db/tagstats Binary files differnew file mode 100755 index 0000000..756e9e2 --- /dev/null +++ b/sources/db/tagstats diff --git a/sources/db/update.sh b/sources/db/update.sh index 56a7652..5adf383 100755 --- a/sources/db/update.sh +++ b/sources/db/update.sh @@ -2,20 +2,28 @@ # # Taginfo source: DB # -# update.sh DIR +# update.sh DIR [PLANETFILE] # set -e +# uncomment this if you want to get a core file in case tagstats crashes +#ulimit -c 1000000000 + DIR=$1 +PLANETFILE=$2 DATECMD='date +%Y-%m-%dT%H:%M:%S' if [ "x" = "x$DIR" ]; then - echo "Usage: update.sh DIR" + echo "Usage: update.sh DIR [PLANETFILE]" exit 1 fi +if [ "x" = "x$PLANETFILE" ]; then + PLANETFILE=/osm/planet/var/current-planet.osm.pbf +fi + echo "`$DATECMD` Start db..." DATABASE=$DIR/taginfo-db.db @@ -32,7 +40,8 @@ sqlite3 $DATABASE <pre.sql echo "`$DATECMD` Running count... " HERE=`pwd` cd $DIR -bzcat $DIR/planet.osm.bz2 | $HERE/osmium_tagstats - +#valgrind --leak-check=full --show-reachable=yes $HERE/tagstats $PLANETFILE >valgrind.log 2>&1 +$HERE/tagstats $PLANETFILE cd $HERE echo "`$DATECMD` Running update_characters... " diff --git a/tagstats/Makefile b/tagstats/Makefile index 4570de7..ddcab35 100644 --- a/tagstats/Makefile +++ b/tagstats/Makefile @@ -6,8 +6,8 @@ CXX = g++ -CXXFLAGS = -g -#CXXFLAGS = -O3 +#CXXFLAGS = -g +CXXFLAGS = -O3 CXXFLAGS += -std=c++0x -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic #CXXFLAGS += -Wpadded -Winline @@ -36,8 +36,7 @@ check: cppcheck --enable=all tagstats.cpp install: - install -m 755 -g root -o root -d $(DESTDIR)/usr/bin - install -m 755 -g root -o root tagstats $(DESTDIR)/usr/bin/tagstats + install -m 755 tagstats ../sources/db/tagstats clean: rm -f *.o core tagstats diff --git a/tagstats/README b/tagstats/README new file mode 100644 index 0000000..c894663 --- /dev/null +++ b/tagstats/README @@ -0,0 +1,10 @@ + +Tagstats +======== + +Tagstats is a C++ program to create all the database statistics from a planet +or other OSM file. You probably must compile this yourself and copy it in the +../sources/db directory. Tagstats uses the Osmium framework +(wiki.osm.org/wiki/Osmium) which must be installed on your system before +you try building tagstats. + |