Skip to content

Commit

Permalink
Taginfo tools are in separate repository now, use FlexMem as default
Browse files Browse the repository at this point in the history
Removes the C++ programs like tagstats. They are in a separate
repository https://github.com/taginfo/taginfo-tools now. See there
for installation instructions.

Use FlexMem as default node location store index. It work with both
small and large OSM files, so it is a good default. You should still use
one of the other ones (depending on your input data) for minimum
memory use.
  • Loading branch information
joto committed Aug 26, 2020
1 parent 8c1f867 commit 9175c52
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 2,637 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ wiki.
* `/sources` - import scripts
* `/web` - web user interface and API
* `/examples` - some misc example stuff
* `/tagstats` - C++ programs to create database statistics etc.


## Prerequisites
Expand Down Expand Up @@ -44,6 +43,11 @@ Depending on your setup you might want to install an application server like
* [uWSGI](https://uwsgi-docs.readthedocs.io/en/latest/) or
* Apache2 `mod_passenger`

If you want to create the taginfo database yourself, you need to have
https://github.com/taginfo/taginfo-tools installed. See there for details.
If you only want to run the UI and get the database from somewhere else,
you do not need this.


## Data Import

Expand Down
14 changes: 9 additions & 5 deletions sources/db/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ run_tagstats() {
local width=$(get_config geodistribution.width)
local height=$(get_config geodistribution.height)
local min_tag_combination_count=$(get_config sources.master.min_tag_combination_count 1000)
local index=$(get_config tagstats.geodistribution)
local tagstats=$(get_bindir)/tagstats
local index=$(get_config tagstats.geodistribution FlexMem)
local tagstats=$(get_bindir)/taginfo-stats

local open_selection_db=""
if [[ -f $SELECTION_DB && -s $SELECTION_DB ]]; then
Expand All @@ -49,13 +49,17 @@ run_tagstats() {
print_message " The next taginfo update should automatically correct this."
fi

if [ $index = 'FlexMem' ]; then
print_message "Using generic 'FlexMem' node location store. You might want to change this to save some memory."
fi

print_message "Running tagstats... "
#tagstats="valgrind --leak-check=full --show-reachable=yes $tagstats"
run_exe $tagstats $open_selection_db --index=$index --min-tag-combination-count=$min_tag_combination_count --left=$left --bottom=$bottom --top=$top --right=$right --width=$width --height=$height $OSM_FILE $DATABASE
}

run_similarity() {
local similarity=$(get_bindir)/similarity
local similarity=$(get_bindir)/taginfo-similarity
if [ -e $similarity ]; then
print_message "Running similarity... "
run_exe $similarity $DATABASE
Expand All @@ -80,8 +84,8 @@ main() {
run_similarity
update_characters

#print_message "Running taginfo_unicode... "
#./taginfo_unicode $DATABASE
#print_message "Running taginfo-unicode... "
#taginfo-unicode $DATABASE

run_sql $DATABASE $SRCDIR/post_grades.sql
run_sql $DATABASE $SRCDIR/post_indexes.sql
Expand Down
10 changes: 5 additions & 5 deletions taginfo-config-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
// These sources will be created from the actual sources.
"create": "db",
"db": {
// Path to binaries (like 'tagstats' and 'similarity').
// Path to binaries (like 'taginfo-stats' and 'taginfo-similarity').
"bindir": "../../tagstats",
// The OSM planet file or extract where we read the OSM data from.
"planetfile": "/osm/planet/var/current-planet.osm.pbf"
Expand Down Expand Up @@ -123,11 +123,11 @@
},
// For compiling tagstats.
"tagstats": {
// Extra compilerflags, for instance to find Libosmium.
"cxxflags": "-I../../../libosmium/include",
// Node location store. For really large OSM files (whole planet or large continent)
// Node location store. The default is "FlexMem" which works for any
// size of OSM file, but may need a bit more memory than other values.
// For really large OSM files (whole planet or large continent)
// this should be "DenseMmapArray" (or "DenseMemArray" on OSX), otherwise "SparseMemArray".
"geodistribution": "SparseMemArray",
"geodistribution": "FlexMem",
// C++ type used for geodistribution
"geodistribution_int": "uint16_t"
}
Expand Down
72 changes: 0 additions & 72 deletions tagstats/Makefile

This file was deleted.

10 changes: 0 additions & 10 deletions tagstats/README

This file was deleted.

Loading

0 comments on commit 9175c52

Please sign in to comment.