RDFLib GeoSPARQL-DGGS

61 views
Skip to first unread message

David Habgood

unread,
Sep 29, 2021, 9:39:44 PM9/29/21
to rdflib-dev

Hi all,

I’ve released an RDFLib set of SPARQL function extensions relating to Discrete Global Grid Systems (DGGS) and GeoSPARQL.

A little background:

DGGS differs from conventional geospatial systems in that it divides the earth in to sets of cells which have “global hierarchical tessellation” - akin to a series of chessboards within chessboards. Wikipedia provides a good overview of DGGS. 

GeoSPARQL (https://opengeospatial.github.io/ogc-geosparql/geosparql11/spec.html) is both an RDF ontology and a related set of standard spatial functions which together allow for the representation of, and calculation with, spatial data in RDF.

Why build these functions for RDFLib?

To provide geospatial functionality in RDF/SPARQL without the overheads or dependencies of conventional geospatial packages or extensions.

As the cells in a DGGS are defined in a regular way, spatial operations between them can work using only their identifiers, not complicated geometry mathematics, opening the door to spatial operations through string comparisons. 

This library depends on rhealpix-sf (https://github.com/surroundaustralia/rhealpix-sf), which in turn depends on rhealpix-geo (https://github.com/surroundaustralia/rhealpix-geo). rhealpix-geo provides python classes for DGGS cells and sets of cells, including validation and standardisation of inputs, and basic operations between cells (addition, subtraction, neighbours, borders etc.). rhealpix-sf builds on the basic operations provided by rhealpix-geo to implement the Simple Feature set of geometry relations. The RDFLib geosparql-dggs is a wrapper around the rhealpix-sf library, allowing the Simple Feature relations to be performed on RDFLib graph Literals.

What is the specific functionality implemented?

The Simple Feature set of geometry relations (except Crosses) has been implemented for the Auspix grid (an rHEALPix grid). This is: Equals, Contains, Disjoint, Within, Overlaps, and Intersects.

Additionally, you can utilise the functions outside of a graph context.

The following diagram shows the RDFLib geosparql-dggs library in context with it’s dependencies, the rhealpix-sf and rhealpix-geo libraries.

Links:

https://github.com/RDFLib/geosparql-dggs

https://pypi.org/project/geosparql-dggs/

rHEALPix

How do I convert my existing geospatial dataset to a DGGS?

Surround has developed a converter tool, based on the rHEALPix-py library, to convert conventional geospatial data (for example data in EPSG 4326) to an rHEALPix DGGS. This tool is hosted at https://dggs.surroundaustralia.com/. Please contact us if you would like to use this service.

Happy to receive any feedback or comments.

Thanks,
David Habgood



Reply all
Reply to author
Forward
0 new messages