Tools for computing various statistics related to Geocaching/Opencaching.
 
 
 
Go to file
Tomasz Golinski d673bdd7b9 cppcheck partial cleanup 2022-07-13 18:37:55 +02:00
geojson Fix installation paths for subfolders 2020-05-24 14:14:57 +02:00
maps Fix installation paths for subfolders 2020-05-24 14:14:57 +02: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 Update README.md 2021-04-20 16:41:56 +02:00
api.h Cppcheck: remove get_lat_lon function in Api class and morph it into a constructor of Position class 2020-07-06 17:15:28 +02:00
cache.cpp Owned caches: average finds per cache per day 2020-09-06 19:44:34 +02:00
cache.h Change some int to uint and thus silence warnings 2022-07-13 18:30:26 +02:00
common.cpp Change some int to uint and thus silence warnings 2022-07-13 18:30:26 +02:00
common.h Change some int to uint and thus silence warnings 2022-07-13 18:30:26 +02:00
config_user_example.h Try to support other OC servers 2020-01-02 00:37:28 +01:00
debug.cpp Fix debug so that multithreaded output doesn't overlap (not needed here, just for consistency with other projects) 2021-10-07 14:58:52 +02:00
debug.h Fix debug so that multithreaded output doesn't overlap (not needed here, just for consistency with other projects) 2021-10-07 14:58:52 +02:00
geo.css Minor style updates 2022-07-12 12:55:11 +02:00
geodb.cpp geodb now reports current revision after update/init 2021-04-04 00:09:29 +02:00
geofriends.cpp Remove some unnecessary includes 2021-04-20 17:23:46 +02:00
geolist.cpp Include owner in geolist 2021-05-05 23:13:04 +02:00
geostat.cpp Change some int to uint and thus silence warnings 2022-07-13 18:30:26 +02:00
geostat_cli.cpp cppcheck partial cleanup 2022-07-13 18:37:55 +02:00
gpx.cpp Add cache status code for gpx and ocdb 2020-03-20 01:49:06 +01:00
gpx.h CPPCHECK: Add override specifiers 2020-02-11 17:37:01 +01:00
heat.cpp Fix for heatmap powiaty making output colored 2021-07-27 23:47:06 +02:00
heat.h Initial support for animated GIFs instead of heatmaps 2020-11-02 21:01:27 +01:00
maps.h Add Poland_powiaty map 2020-04-01 02:47:14 +02:00
meson.build Rudimentary power trail support 2022-07-12 12:54:56 +02:00
ocdb.cpp Add countries histogram 2021-09-05 19:44:44 +02:00
ocdb.h SQL: change log type to integer using enum 2021-01-03 03:00:42 +01:00
okapi.cpp cppcheck partial cleanup 2022-07-13 18:37:55 +02:00
okapi.h cppcheck partial cleanup 2022-07-13 18:37:55 +02:00
powertrail.cpp Rudimentary power trail support 2022-07-12 12:54:56 +02:00
powertrail.h Change some int to uint and thus silence warnings 2022-07-13 18:30:26 +02:00
rating-star.png Add icon for recommended caches 2020-02-29 02:46:35 +01:00
region.cpp cppcheck partial cleanup 2022-07-13 18:37:55 +02:00
region.h cppcheck partial cleanup 2022-07-13 18:37:55 +02:00
traildb.cpp Rudimentary power trail support 2022-07-12 12:54:56 +02: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
	-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

Other tools

geodb

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

geofriends

Another tools is geofriends. It generates stats for a pair of users regarding their common caching activities.

Usage: geofriends nick1 nick2
Generate HTML stats for user caching intersection from Opencaching data.

geolist

Another tools is geolist. It generates HTML list of caches from a list of cache codes.

Usage: geolist list_of_caches
Produce a HTML list of caches given their OC codes.

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
ninja install

You might need to set CXX variable to point to a correct compiler.

Credits