An XMPP client for geospatial data
Go to file
pukkamustard 493ae97e87 v0.7.0 2022-09-20 15:32:57 +02:00
.reuse initial commit 2021-05-04 21:46:35 +02:00
LICENSES Leaflet: Add reuse license information 2021-11-10 14:22:27 +01:00
doc README: Some overview 2022-09-20 14:56:41 +02:00
src v0.7.0 2022-09-20 15:32:57 +02:00
tools/osm_extractor Add extract of surveillance cameras in Switzerland 2022-06-22 20:01:50 +02:00
vendor v0.7.0 2022-09-20 15:32:57 +02:00
.gitignore initial commit 2021-05-04 21:46:35 +02:00
.ocamlformat Brr_react: First steps... 2021-08-31 14:09:41 +02:00 v0.7.0 2022-09-20 15:32:57 +02:00
Makefile Makefile: use --release flag 2022-04-01 15:24:57 +02:00 README: add note on ERIS 2022-09-20 15:08:33 +02:00
channels.scm v0.7.0 2022-09-20 15:32:57 +02:00
dune-project change to use the separate leaflet lib 2022-06-17 08:40:02 +02:00
geopub.opam change to use the separate leaflet lib 2022-06-17 08:40:02 +02:00
guix.scm GeoPub.Query: Full Datalog programs as queries 2022-09-19 22:42:36 +02:00
indexeddb.opam change to use the separate leaflet lib 2022-06-17 08:40:02 +02:00


GeoPub is an XMPP client for geospatial data and RDF developed within the openEngiadina project.

Open Local Knowledge

GeoPub has been developed to create and manage Open Local Knowledge.

Local knowledge consists of thousand of little pieces of information that describe the social, cultural and natural environment of an area. Examples include geographic information, social, cultural and economic activity or infrastructure status.

The variety of this data is considerable and we need to support them all. To do this GeoPub uses the Resource Description Framework (RDF).

GeoPub is not bound to a fixed set of data types, instead GeoPub works with RDF and any data that can be describes as RDF is supported by GeoPub.

GeoPub contains examples of how to use the ValueFlows vocabulary for simple offers as well, the OpenHospitalityNetwork vocabulary for hospitality requests and offers as well as the MusicOntology for sharing music. Other data types that have been successfully tested include OpenStreetMap data via the osm2rdf project.

Semantic Social Network

We acknowledge the fact that data creation and curation is a social activity. Pieces of information are created, commented on, shared and revised collectively.

To model this we use the ActivityStreams vocabulary. This is the same vocabulary used by the ActivityPub protocol. Previously the openEngiadina project was using the ActivityPub protocol (see openEngiadina: From ActivityPub to XMPP).

ActivityStreams provides types that describe social interactions on small pieces of data - activities. For example there is an activity that describes the creation of a resource.

GeoPub uses the ActivityStreams vocabulary as a core vocabulary. Whenever a user does something in GeoPub this corresponds to an ActivityStreams activity.

Technical Overview

GeoPub is a JavaScript web application. It is written in the OCaml programming language and compiled to JavaScript.

GeoPub works with standard XMPP servers (tested with Prosody and ejabberd). GeoPub does not require any specialized server software apart from the web server where the JavaScript application code as well as other resources are hosted. GeoPub can be hosted from a static site.

GeoPub receives and publishes content via XMPP over WebSocket (see RFC 7395). The RDF/XML serialization is used and content is by default posted to the net.openengiadina.xmpp.activitystreams Personal Eventing Protocol node (see XEP-0163). How RDF data is transported over XMPP is described in more detail in the post ActivityStreams over XMPP.

Data is persistently stored in a local IndexedDB database. GeoPub maintains specialized indices that allows efficient querying for geospatial location, full-text search and usual RDF queries (see also the post GeoPub: A Multi-Model Database).

In order to query data GeoPub uses Datalog, a database query language based on logic programming. See also the post GeoPub: Datalog, RDF and IndexedDB.

Everything created via GeoPub is content-addressed via ERIS. This de-couples content from the network protocol used (i.e. XMPP) and allows content to be made available robustly.


GeoPub was started as a very simple JavaScript demonstrator to show how geographic information can be used over the ActivityPub protocol (see branch initial-js-demonstrator).

A second version was developed in ClojureScript (see branch cljs). The ClojureScript version was abandoned due to licensing and reproducability issues (it is hard to use GPL/AGPL for Clojure(Script) projects and Clojure support in Guix/Nix is not so good).

This (the third version) is implemented in OCaml using js_of_ocaml.


A development environment can be created with Guix:

guix shell -D -f guix.scm

After this you can run dune build @install which will build GeoPub and place all necessary artifacts into _build/install/default/share/geopub/.

You may want to start a small webserver for local development (e.g. python3 -m http.server --directory _build/install/default/share/geopub/). This works very nicely when running dune in watch mode (dune build @install --watch).

Note that this uses dependencies from Guix. You might have to run guix pull to get the lastest dependencies from Guix. To use a version of Guix that has been tested use: guix time-machine -C channels.scm -- shell -D -f guix.scm.

See also some notes on the architecture.


See the openEngiadina project site.


GeoPub is being developed for the openEngiadina project and has been supported by the NLnet Foundation through the NGI0 Discovery Fund.