Tools for computing various statistics related to Geocaching/Opencaching.
 
 
 
Go to file
Tomasz Golinski 272816f640 Add icon for recommended caches 2020-02-29 02:46:35 +01:00
maps Unclutter src directory by moving maps to a separate directory 2020-01-28 06:35:14 +01:00
.clang-format Initial commit 2019-09-08 19:13:06 +02:00
.gitignore Initial commit 2019-09-08 19:13:06 +02:00
README.md Add info about time range to html, update README.md 2020-02-23 02:42:25 +01:00
api.h CPPCHECK: Change arguments to references, add some consts 2020-02-11 17:34:23 +01:00
cache.cpp Add a class to links of recommended caches, show a star via CSS 2020-02-29 02:39:50 +01:00
cache.h Extract snippet for writing a HTML version of cache name with link to separate function 2020-02-29 02:26:43 +01:00
common.cpp Split out simple function to check and convert a c-string to a number 2020-02-23 01:41:15 +01:00
common.h Split out simple function to check and convert a c-string to a number 2020-02-23 01:41:15 +01:00
config_user_example.h Try to support other OC servers 2020-01-02 00:37:28 +01:00
debug.cpp Commented out code to print timestamp in debug msg 2020-02-17 01:18:13 +01:00
debug.h CPPCHECK: Add "explicit" to some constructors 2020-02-11 16:55:49 +01:00
geo.css Add a class to links of recommended caches, show a star via CSS 2020-02-29 02:39:50 +01:00
geodb.cpp Update README.md and usage outputs 2019-11-18 16:06:20 +01:00
geostat.cpp Change doctype to html5 2020-02-29 02:45:35 +01:00
geostat_cli.cpp Change containers used to store caches. std::set didn't allow to change elements inside and it was the easiest way to deal with extra data from the logs. 2020-02-29 02:04:55 +01:00
gpx.cpp Change containers used to store caches. std::set didn't allow to change elements inside and it was the easiest way to deal with extra data from the logs. 2020-02-29 02:04:55 +01:00
gpx.h CPPCHECK: Add override specifiers 2020-02-11 17:37:01 +01:00
heat.cpp Change containers used to store caches. std::set didn't allow to change elements inside and it was the easiest way to deal with extra data from the logs. 2020-02-29 02:04:55 +01:00
heat.h Change containers used to store caches. std::set didn't allow to change elements inside and it was the easiest way to deal with extra data from the logs. 2020-02-29 02:04:55 +01:00
maps.h CPPCHECK: Change arguments to references, add some consts 2020-02-11 17:34:23 +01:00
meson.build Add a class to links of recommended caches, show a star via CSS 2020-02-29 02:39:50 +01:00
ocdb.cpp Change containers used to store caches. std::set didn't allow to change elements inside and it was the easiest way to deal with extra data from the logs. 2020-02-29 02:04:55 +01:00
ocdb.h CPPCHECK: Add override specifiers 2020-02-11 17:37:01 +01:00
okapi.cpp Get rid of explicit values of 500 and 1000 as max number of items per request in Okapi 2020-02-29 02:18:01 +01:00
okapi.h Get rid of explicit values of 500 and 1000 as max number of items per request in Okapi 2020-02-29 02:18:01 +01:00
rating-star.png Add icon for recommended caches 2020-02-29 02:46:35 +01:00

README.md

GEOSTAT

Sample web interface

A sample web interface to play with the tool is available at http://tomaszg.pl/geo/.

Usage

The main tool is called geostat. It is able to access opencaching.pl via OKAPI or from local database dump maintained by geodb. It can also partially read GPX files, e.g. exported from c:geo. It produces various statistics (either as text output with geostat_cli, or in a HTML form with geostat) and renders a heat map of found/not found caches in a selected region. HTML output requires a style sheet. Sample one is included as geo.css.

Usage: geostat [options]
Generate HTML stats from Opencaching data or GPX files.

 * Data sources:
	-o[user]	use Opencaching; if specified user will be a user name used for all OC instances
	-p user		user for opencaching.pl
	-d user		user for opencaching.de
	-u user		user for opencaching.us
	-n user		user for opencaching.nl
	-r user		user for opencaching.ro
	-k user		user for opencaching.uk
	-g file		use specified gpx file
	-q		use local SQLite file with dump of OC database
	-i timestamp	start date
	-f timestamp	finish date

 * Output:
	-N		compute stats only for unfound caches (works only with SQLite)
	-Q		exclude quiz caches from unfound caches
	-H file		render a heat map to a file
	-s n		stamp size for a heat map (default = 15)
	-e		use exponential to flatten the heat map
	-t		draw trail instead of heat map
	-m map		chosen map: Poland, Poland_relief, Poland_big, Europe, World or a name of voivodeship (default = Poland)
	-h		display this help screen

There is a helper program geodb which manages local SQLite database. It can initialize the database from full data dump or update it according to changelogs grabbed from OKAPI.

Usage: geodb [-i path] [-uh]
Manage local Opencaching database.
	-i folder	initialize database from dump located in given folder
	-u	update database with changelogs grabbed via OKAPI
	-h	display this help screen

Installation

To compile it requires:

To build the project copy config_user_example.h to config_user.h and fill it out (at least API key is needed). Then run meson build; cd build; ninja. You might need to set CXX variable to point to a correct compiler.

Credits