FOSS4G 2023

Luís M. de Sousa

  • OSGeo charter member since 2016.
  • Founder of the PyWPS Project Steering Committee.
  • Founder of OSGeo-Europe.
  • Board member of OSGeo-Portugal.
  • Web page: https://ldesousa.codeberg.page/

Sessions

06-28
11:30
30min
Geo-Spatial meets Linked Data: open source solutions for semantic spatial data exchange
Luís M. de Sousa

The Ontology discipline made its way into the Computer Science domain in the
1990s, filling a gap in the architecture aspect of a still infant engineering
domain. Its most visible impact happened around the industry consortium Object
Management Group (OMG), leading first to the Unified Modelling Language (UML)
and later to the Model Driven Architecture (MDA). MDA became the base
infrastructure of data architectures and exchange mechanisms specified by
institutions such as the Open Geo-spatial Consortium (OGC) or the European
Commission (through the INPIRE directive).

However, a parallel path has been treaded by the World Wide Web Consortium
(W3C). First with the specification of the Resource Description Framework (RDF),
a new paradigm for data encoding leveraged on the WWW, and later with the Web
Ontology Language (OWL), a pragmatic approach to ontology encoding, building on
RDF. This infrastructure developed by the W3C became known as the Semantic Web,
and also as Linked Data, for the innovative paradigm through which it connects
disparate data sources and data domains.

The OGC would eventually approach the semantic web, specifying GeoSPARQL in
2013, an ontology and query language for linked geo-spatial data. However,
technologies supporting this new standard were slow in materialising.

More recently, the specification by the OGC of a new set of data standards based
on the OpenAPI technology set out a clear path for the convergence of
geo-spatial data with the Semantic Web. New software is emerging, opening
an entirely new world to geo-spatial data provision, a clear step forwards in
practically, usability and semantics.

This address starts by reviewing the core concepts of the Semantic Web and
then reviews state-of-the-art software for the management, publication
and exploration of linked geo-spatial data. This addressed is targeted at SDI
professionals and data scientists wishing to upgrade the semantics of the data
they create and use.

Open Data
UBT D / N112 - Second Floor
06-28
15:00
30min
The template for a Semantic SensorThings API with the GloSIS use case
Luís M. de Sousa

Motivation:
Spatial Data Infrastructures (SDI) developed for the exchange of environmental
has heretofore been greatly shaped by the standards issued by the Open
Geospatial Consortium (OGC). Based on the Simple Object Access Protocol (SOAP),
services like WMS, WFS, WCS, CSW became digital staples for researchers and
administrative bodies alike.

In 2017 the Spatial Data on the Web Working Group (SDWWG) questioned the overall
approach of the OGC, based on the ageing SOAP technology
[@SDWWG2017]. The main issues identified by the SDWWG can be summarised as:

  • Spatial resources are not identified with URIs.
  • Modern API frameworks, e.g. OpenAPI, are not being used.
  • Spatial data are still shared in silos, without links to other resources.
  • Content indexing by search engines is not facilitated.
  • Catalogue services only provide access to metadata, not the data.
  • Data difficult to understand by non-domain-experts.

To address these issues the SDWWG proposed a five point strategy inspired on the
Five Star Scheme [@BernersLee2006]:

  • Linkable: use stable and discoverable global identifiers.
  • Parseable: use standardised data meta-models such as CSV, XML, RDF, or JSON.
  • Understandable: use well-known, well-documented, vocabularies/schemas.
  • Linked: link to other resources whenever possible.
  • Usable: label data resources with a licence.

The work of the SDWWG triggered a transformational shift at the OGC towards
specifications based on the OpenAPI. But while convenience of use has been the
focus, semantics has been largely unheeded. A Linked Data agenda has not
been pursued.

However, the OpenAPI opens the door to an informal coupling of OGC services with
the Semantic Web, considering the possibility of adopting JSON-LD as
syntax to OGC API responses. The introduction of a semantic layer to digital
environmental data shared through state-of-the-art OGC APIs is becoming a
reality, with great benefits to researchers using or sharing data.

This communication lays down a simple SDI set up to serve semantic environmental
data through a SensorThings API created with the glrc software. A use case is
presented with soil data services compliant with the GloSIS web ontology.

SensorThings API:

SensorThings API is an OGC standard specifying a unified framework to
interconnect Internet of Things resources over the Web [@liang2016ogc].
SensorThings API aims to address both the semantic, as well as syntactic,
interoperability. It follows ReST principles [@fielding2002principled],
promotes data encoding with JSON, the OASIS OData protocol
[@chappell2011introducing] and URL conventions.

The SensorThings API is underpinned on a domain model aligned with the ISO/OGC
standard Observations & Measurements (O&M) [@Cox2011], targeted at the
interchange of observation data of natural phenomena. O&M puts forth the
concept of Observation has an action performed on a Feature of Interest
with the goal of measuring a certain Property through a specific Procedure.
SensorThings API mirrors these concepts with Observation, Thing,
ObservedProperty and Sensor. This character makes of SensorThings API a
vehicle for the interoperability of heterogeneous sources of environmental
data.

glrc:

grlc (pronounced "garlic") is a lightweight server that translates SPARQL
queries into Linked Data web APIs [@merono2016grlc] compliant with the OpenAPI
specification. Its purpose is to enable universal access to Linked
Data sources through modern web-based mechanisms, dispensing the use of the
SPARQL query language. While losing the flexibility and federative capacities
of SPARQL, web APIs present developers with an approachable interface that can
be used for the automatic generation of source code.

A glrc API is constructed from a SPARQL query to which a meta-data section is
prepended. This section is declared with a simplified YAML syntax, within a
SPARQL comment block, so the query remains valid SPARQL. The meta-data provide
basic information for the API set up and most importantly, the SPARQL end-point
on which to apply the query. The listing shows an example.

#+ endpoint: http://dbpedia.org/sparql

PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT ?band_label { 
    ?band rdf:type dbo:Band ;
          dbo:genre dbr:Hard_Rock ;
          rdfs:label ?band_label .
} ORDER BY ?band_label

A special SPARQL variable formulation is used to map into API parameters. By
adding an underscore (_) between the question mark and the variable name,
glrc is instructed to create a new API parameter. A prefix separated again
with an underscore informs glrc of the parameter type. The ?band_label
variable in [Listing @lst:1] can be expanded to ?_band_label_iri to create a
new API parameter of the type IRI.

Use case: GloSIS:

The Global Soil Partnership (GSP) is a network of stakeholders in the soil
domain established by members of the United Nations Food and Agriculture
Organisation (FAO). Its broad goals are to raise awareness to the importance of
soils and to promote good practices in land management towards a sustainable
agriculture.

Acknowledging difficulties in exchanging harmonised soil data as an important
obstacle to its goals, the GSP launched in 2019 an international consultancy to
assess the state-of-the-art and propose a path towards a Global Soil Information
System (GloSIS) based on a unified exchange. A domain model resulted, based
on the ISO 28258 standard for soil quality [@SchleidtReznik2020], augmented with
code-lists compiled from the FAO Guidelines for Soil Description [@Jahn2006].
This domain model was then transformed to a Web Ontology, relying on the Sensor,
Observation, Sample, and Actuator ontology (SOSA) [@Janowicz2019], and other
Semantic Web standards such as GeoSPARQL, QUTD and SKOS. The GloSIS web ontology
has been successfully demonstrated as a vehicle to exchange soil information as
Linked Data [@GloSIS].

A prototype API for the GloSIS ontology, formulated in compliance with the
SensorThings API specification, will be presented in this communication. It
demonstrates how the same set of SPARQL queries can be used to query through a
ReST API any end-point available over the internet, sharing linked soil data in
accordance with the GloSIS ontology. Thus providing a clear step towards the
federated and harmonised system envisioned by the GSP.

Use cases & applications
UBT C / N109 - Second Floor