Tools for computing various statistics related to Geocaching/Opencaching.
 
 
 
Go to file
Tomasz Golinski f262101468 Might as well use M_PI instead of defining our own 2021-01-03 05:51:33 +01:00
geojson
maps
.clang-format
.gitignore
README.md Update README.md 2020-11-14 18:30:16 +01:00
api.h
cache.cpp
cache.h Might as well use M_PI instead of defining our own 2021-01-03 05:51:33 +01:00
common.cpp Make sure we don't crash on empty lists and we don't divide by zero 2021-01-03 04:51:54 +01:00
common.h
config_user_example.h
debug.cpp
debug.h
geo.css CSS fixup to make gif centered again 2020-11-13 20:52:41 +01:00
geodb.cpp Support in geodb for ocde and ocus 2020-11-14 18:46:03 +01:00
geofriends.cpp Add some consts to make cppcheck happy 2020-12-04 18:51:00 +01:00
geostat.cpp Might as well use M_PI instead of defining our own 2021-01-03 05:51:33 +01:00
geostat_cli.cpp Fix previous commits by using correct database file for OCde 2021-01-03 04:05:48 +01:00
gpx.cpp
gpx.h
heat.cpp Fix another Imagemagick problem 2020-11-02 21:41:14 +01:00
heat.h Initial support for animated GIFs instead of heatmaps 2020-11-02 21:01:27 +01:00
maps.h
meson.build
ocdb.cpp Fix ocdb to correctly read German cache names as well 2021-01-03 03:56:09 +01:00
ocdb.h SQL: change log type to integer using enum 2021-01-03 03:00:42 +01:00
okapi.cpp Apparently database dump can contain cache codes with no data. Don't crash in that case 2021-01-03 04:52:34 +01:00
okapi.h
rating-star.png
region.cpp
region.h

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
	-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)
	-O		compute stats only for owned 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
	-a		draw animated map 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