summaryrefslogtreecommitdiff
path: root/tagstats/test_tagstats.sh
blob: 886459877e81b3b0a2f69cd1044fe77f2406bc92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
#
#  test_tagstats.sh OSMFILE
#
#  This is a little helper program to test the function of tagstats.
#  Its not supposed to be used in production.
#

set -e
set -x

DATABASE=taginfo-db.db
OSMFILE=$1
SELECTION_DB=selection.db
#IMAGE_OPTIONS="--left=5.5 --bottom=47 --right=15 --top=55 --width=200 --height=320"

rm -f $DATABASE

sqlite3 $DATABASE <../sources/init.sql
sqlite3 $DATABASE <../sources/db/pre.sql

#ulimit -c unlimited
rm -f core.*

if [ -f $SELECTION_DB ]; then
    selection_option="--selection-db=$SELECTION_DB"
else
    selection_option=""
fi

#valgrind --leak-check=full --show-reachable=yes
./tagstats $selection_option --min-tag-combination-count=100 $IMAGE_OPTIONS $OSMFILE $DATABASE