SlideShare a Scribd company logo
Reusable SHACL Constraint
Components for Validating
Geospatial Linked Data
Christophe Debruyne
Smals Research
Belgium
Kris McGlinn
ADAPT Centre, Trinity College Dublin
Ireland
2021-07-06 @ the 4th International Workshop on Geospatial Linked Data (GeoLD 2021)
2
• SHACL is a W3C Recommendation for validating RDF graphs. While the constructs SHACL
provides may, arguably, be limited, SHACL none the less allows one to create custom
components based on SPARQL. But,…
• Problem: many constraints are applicable to many applications, datasets, etc. Are people
continuously reinventing the wheel when writing SHACL?
• As many Linked Data datasets have a geospatial dimension and GeoSPARQL is an important
standard, we propose GeoSHACL; a set of constraint components for GeoSPARQL published
as per Linked Data best practices.
• To the best of our knowledge, no prior work on SHACL constraints shared per Linked Data
principles.
Problem
3
• An OGC Standard since 2012
• GeoSPARQL provides functions (e.g., geof:sfDisjoint) and
relations (e.g., geo:sfDisjoint)
• GeoSPARQL provides query-transformation rules
E.g,. a triplepattern using geo:sfDisjoint will be rewritten
as that triplepattern and the union of other graph
patterns using the function geof:sfDisjoint.
• Query-transformation rules are part of the specification,
but not all implementation support those (by default)
GeoSPARQL
geo:Feature
geo:Geometry
geo:
wktLiteral
geo:
gmlLiteral
geo:hasGeometry
geo:hasDefaultGeometry
geo:asWKT geo:asGML
4
• Starting from GeoSPARQL's simple feature
relation family providing 8 topological
relations
• equals, disjoint, intersects, touches,
crosses, within, contains, and overlaps
• In GeoSPARQL, points can never be equal (as
they have empty boundaries). We therefore
introduced an "intuitive equals" based on
contains and within.
• The behavior of the constraint components
should resemble those of SHACL core
comparison operators
• Compare the lexical representation of a
geometry (via a path) with either a
constant or the lexical representation of a
geometry via a predicate
• We will not assume that query transformation
rules have been enabled. I.e., the
implementation "depends" on the spatial
functions applied on literals.
GeoSHACL: Design and Implementation
The availability and correctness of the functions are a different
concern. GeoSHACL is not a GeoSPARQL benchmark or test suite.
5
# Are things that Foo contains actually within Foo?
ex:FooShape
a sh:NodeShape ;
sh:targetNode ex:Foo ;
sh:property [
sh:path (geo:sfContains geo:hasGeometry geo:asWKT) ;
geosh:within geo:asWKT ;
] ;
.
GeoSHACL: Design and Implementation
From ex:Foo, we refer to the literals
we want to compare.
Check these values whether they are
within the literal of ex:Foo's geo:asWKT
Note: the domain and range of topological relations is geo:SpatialObject (geo:Feature union geo:Geometry)
6
# Implementation of geof:sfWithin constraints
geosh:withinConstraint
a sh:ConstraintComponent ;
sh:parameter [ sh:path geosh:within ; ] ;
sh:validator [
a sh:SPARQLAskValidator ;
sh:message "Value is not within {$within}." ;
sh:ask """
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
ASK {
{ FILTER( geof:sfWithin($value, $within) ) } # when comparing constants
UNION {
FILTER( isIRI($within) ) # when comparing value of property
$this $within ?otherValue .
FILTER( geof:sfWithin($value, ?otherValue) )
}
}
"""
]
.
7
While not an ontology in the traditional
sense, we have published GeoSHACL
according to best practices in Linked
Data and, as CC BY 4.0, and accessible
via a persistent identifier.
geosh: https://w3id.org/geoshacl#
Published as Linked Data
8
• Little to no prior work (to the best of our knowledge)
• Our approach does not only support WKT. Support for other literals, as is the case with Apache Jena,
depends on the endpoint
• When GeoSPARQL functions are not supported, the constraint components fail "gracefully". See
SPARQL 1.1 Query Language - Expressions and Testing Values.
• Testing whether an endpoint supports GeoSPARQL functions is not and should not be GeoSHACL's
concern.
• Benchmarks do exist (*)
• One can write SHACL constraints to tests the existence / correct implementation of GeoSPARQL, but
then we are creating a test suite or benchmark. This may be useful to be declared separately?
Discussion
(*) Jovanovik, M., Homburg, T., Spasić, M.: Software for the GeoSPARQL compliance
benchmark. Softw. Impacts. 8, 100071 (2021). https://doi.org/10.1016/j.simpa.2021.100071
9
Conclusions
• While SHACL is powerful, one also has to consider sharing and reusing constraint components
that may hold in many domains, applications,…
• We demonstrate how we can tackle this problem (method) for GeoSPARQL (the domain) with
GeoSHACL. GeoSHACL shares SHACL Constraint Components according to Linked Data
principles for GeoSPARQL.
• Our contribution seems simple, but we provide an important first step towards realizing this
Future work
• Incorporate functions beyond the simple features relation family
• Constraints (stored separately) to test an endpoint's GeoSPARQL capabilities
Conclusions and Future Work
10
Smals Research
https://www.smalsresearch.be/
Christophe Debruyne
christophe.debruyne@smals.be
The views and opinions expressed in this paper and
presentation are those of the authors and do not express the
views or opinions of Smals.
Acknowledgements: Kris McGlinn is supported by the ADAPT
Centre for Digital Content Technology, which is funded under
the SFI Research Centres Programme (Grant 13/RC/2106) and
is co-funded under the European Regional Development Fund.

More Related Content

PDF
An Empirical Study of Refactorings and Technical Debt in Machine Learning Sys...
PDF
Geographica: A Benchmark for Geospatial RDF Stores - ISWC 2013
PDF
Jooq java object oriented querying
PPTX
Geographica: A Benchmark for Geospatial RDF Stores
PPTX
group 10 paper 10.pptx
PDF
Big Linked Data Federation - ExtremeEarth Open Workshop
PDF
master_thesis_greciano_v2
PPTX
LocationTech Projects
An Empirical Study of Refactorings and Technical Debt in Machine Learning Sys...
Geographica: A Benchmark for Geospatial RDF Stores - ISWC 2013
Jooq java object oriented querying
Geographica: A Benchmark for Geospatial RDF Stores
group 10 paper 10.pptx
Big Linked Data Federation - ExtremeEarth Open Workshop
master_thesis_greciano_v2
LocationTech Projects

Similar to Reusable SHACL Constraint Components for Validating Geospatial Linked Data (20)

PPTX
SPARQL 1.1 Status
PDF
Balancing Agility and Rigor in Model-Based Systems Engineering Presentation C...
PPTX
JSON-LD update DC 2017
PPTX
What's new in the Java API for JSON Binding
PPTX
Java9to19Final.pptx
KEY
Modularization in java 8
PDF
GraphQL Fundamentals
PPT
Going for GOLD - Adventures in Open Linked Geospatial Metadata
PPTX
Big linked geospatial data tools in ExtremeEarth-phiweek19
PPTX
Devoxx Belgium 2015
PDF
From Simple Features to Moving Features and Beyond? at OGC Member Meeting, Se...
PPT
Falcon-AO: Results for OAEI 2007
PDF
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language
PPTX
Why jakarta ee matters (ConFoo 2021)
PPTX
Strabon: A Semantic Geospatial Database System
PDF
Spark
PDF
Comparing Vocabularies for Representing Geographical Features and Their Geometry
PDF
A spatial data model for moving object databases
PDF
How can your applications benefit from Java 9?
PDF
Codemotion 2015 spock_workshop
SPARQL 1.1 Status
Balancing Agility and Rigor in Model-Based Systems Engineering Presentation C...
JSON-LD update DC 2017
What's new in the Java API for JSON Binding
Java9to19Final.pptx
Modularization in java 8
GraphQL Fundamentals
Going for GOLD - Adventures in Open Linked Geospatial Metadata
Big linked geospatial data tools in ExtremeEarth-phiweek19
Devoxx Belgium 2015
From Simple Features to Moving Features and Beyond? at OGC Member Meeting, Se...
Falcon-AO: Results for OAEI 2007
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language
Why jakarta ee matters (ConFoo 2021)
Strabon: A Semantic Geospatial Database System
Spark
Comparing Vocabularies for Representing Geographical Features and Their Geometry
A spatial data model for moving object databases
How can your applications benefit from Java 9?
Codemotion 2015 spock_workshop
Ad

More from Christophe Debruyne (20)

PPTX
BURPing Through RML Test Cases (presented at KGC Workshop @ ESWC 2024)KG
PPTX
One year of DALIDA Data Literacy Workshops for Adults: a Report
PDF
Projet TOXIN : Des graphes de connaissances pour la recherche en toxicologie
PDF
Knowledge Graphs: Concept, mogelijkheden en aandachtspunten
PDF
Hidden Amongst the Data: the Beyond 2022 Knowledge Graph
PDF
Facilitating Data Curation: a Solution Developed in the Toxicology Domain
PDF
Using Maps for Interlinking Geospatial Linked Data
PDF
Linked Data Publication and Interlinking Research within the SFI funded ADAPT...
PDF
Towards Generating Policy-compliant Datasets (poster)
PDF
Towards Generating Policy-compliant Datasets
PDF
Generating Executable Mappings from RDF Data Cube Data Structure Definitions
PDF
Uplift – Generating RDF datasets from non-RDF data with R2RML
PDF
A Lightweight Approach to Explore, Enrich and Use Data with a Geospatial Dime...
PDF
Client-side Processing of GeoSPARQL Functions with Triple Pattern Fragments
PDF
Serving Ireland's Geospatial Information as Linked Data
PDF
Serving Ireland's Geospatial Information as Linked Data (ISWC 2016 Poster)
PDF
R2RML-F: Towards Sharing and Executing Domain Logic in R2RML Mappings
PDF
Towards a Project Centric Metadata Model and Lifecycle for Ontology Mapping G...
PDF
Creating and Consuming Metadata from Transcribed Historical Vital Records for...
PDF
What is Linked Data?
BURPing Through RML Test Cases (presented at KGC Workshop @ ESWC 2024)KG
One year of DALIDA Data Literacy Workshops for Adults: a Report
Projet TOXIN : Des graphes de connaissances pour la recherche en toxicologie
Knowledge Graphs: Concept, mogelijkheden en aandachtspunten
Hidden Amongst the Data: the Beyond 2022 Knowledge Graph
Facilitating Data Curation: a Solution Developed in the Toxicology Domain
Using Maps for Interlinking Geospatial Linked Data
Linked Data Publication and Interlinking Research within the SFI funded ADAPT...
Towards Generating Policy-compliant Datasets (poster)
Towards Generating Policy-compliant Datasets
Generating Executable Mappings from RDF Data Cube Data Structure Definitions
Uplift – Generating RDF datasets from non-RDF data with R2RML
A Lightweight Approach to Explore, Enrich and Use Data with a Geospatial Dime...
Client-side Processing of GeoSPARQL Functions with Triple Pattern Fragments
Serving Ireland's Geospatial Information as Linked Data
Serving Ireland's Geospatial Information as Linked Data (ISWC 2016 Poster)
R2RML-F: Towards Sharing and Executing Domain Logic in R2RML Mappings
Towards a Project Centric Metadata Model and Lifecycle for Ontology Mapping G...
Creating and Consuming Metadata from Transcribed Historical Vital Records for...
What is Linked Data?
Ad

Recently uploaded (20)

PPTX
TOTAL hIP ARTHROPLASTY Presentation.pptx
PDF
lecture 2026 of Sjogren's syndrome l .pdf
PDF
AlphaEarth Foundations and the Satellite Embedding dataset
PPTX
Derivatives of integument scales, beaks, horns,.pptx
PDF
Placing the Near-Earth Object Impact Probability in Context
PDF
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
PDF
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
PPTX
2. Earth - The Living Planet earth and life
PPTX
Vitamins & Minerals: Complete Guide to Functions, Food Sources, Deficiency Si...
PDF
CAPERS-LRD-z9:AGas-enshroudedLittleRedDotHostingaBroad-lineActive GalacticNuc...
PPTX
Classification Systems_TAXONOMY_SCIENCE8.pptx
PPTX
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
PDF
. Radiology Case Scenariosssssssssssssss
PPT
protein biochemistry.ppt for university classes
PPTX
Taita Taveta Laboratory Technician Workshop Presentation.pptx
PPTX
7. General Toxicologyfor clinical phrmacy.pptx
PPTX
Comparative Structure of Integument in Vertebrates.pptx
PPTX
neck nodes and dissection types and lymph nodes levels
PPT
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
PDF
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
TOTAL hIP ARTHROPLASTY Presentation.pptx
lecture 2026 of Sjogren's syndrome l .pdf
AlphaEarth Foundations and the Satellite Embedding dataset
Derivatives of integument scales, beaks, horns,.pptx
Placing the Near-Earth Object Impact Probability in Context
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
2. Earth - The Living Planet earth and life
Vitamins & Minerals: Complete Guide to Functions, Food Sources, Deficiency Si...
CAPERS-LRD-z9:AGas-enshroudedLittleRedDotHostingaBroad-lineActive GalacticNuc...
Classification Systems_TAXONOMY_SCIENCE8.pptx
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
. Radiology Case Scenariosssssssssssssss
protein biochemistry.ppt for university classes
Taita Taveta Laboratory Technician Workshop Presentation.pptx
7. General Toxicologyfor clinical phrmacy.pptx
Comparative Structure of Integument in Vertebrates.pptx
neck nodes and dissection types and lymph nodes levels
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS

Reusable SHACL Constraint Components for Validating Geospatial Linked Data

  • 1. Reusable SHACL Constraint Components for Validating Geospatial Linked Data Christophe Debruyne Smals Research Belgium Kris McGlinn ADAPT Centre, Trinity College Dublin Ireland 2021-07-06 @ the 4th International Workshop on Geospatial Linked Data (GeoLD 2021)
  • 2. 2 • SHACL is a W3C Recommendation for validating RDF graphs. While the constructs SHACL provides may, arguably, be limited, SHACL none the less allows one to create custom components based on SPARQL. But,… • Problem: many constraints are applicable to many applications, datasets, etc. Are people continuously reinventing the wheel when writing SHACL? • As many Linked Data datasets have a geospatial dimension and GeoSPARQL is an important standard, we propose GeoSHACL; a set of constraint components for GeoSPARQL published as per Linked Data best practices. • To the best of our knowledge, no prior work on SHACL constraints shared per Linked Data principles. Problem
  • 3. 3 • An OGC Standard since 2012 • GeoSPARQL provides functions (e.g., geof:sfDisjoint) and relations (e.g., geo:sfDisjoint) • GeoSPARQL provides query-transformation rules E.g,. a triplepattern using geo:sfDisjoint will be rewritten as that triplepattern and the union of other graph patterns using the function geof:sfDisjoint. • Query-transformation rules are part of the specification, but not all implementation support those (by default) GeoSPARQL geo:Feature geo:Geometry geo: wktLiteral geo: gmlLiteral geo:hasGeometry geo:hasDefaultGeometry geo:asWKT geo:asGML
  • 4. 4 • Starting from GeoSPARQL's simple feature relation family providing 8 topological relations • equals, disjoint, intersects, touches, crosses, within, contains, and overlaps • In GeoSPARQL, points can never be equal (as they have empty boundaries). We therefore introduced an "intuitive equals" based on contains and within. • The behavior of the constraint components should resemble those of SHACL core comparison operators • Compare the lexical representation of a geometry (via a path) with either a constant or the lexical representation of a geometry via a predicate • We will not assume that query transformation rules have been enabled. I.e., the implementation "depends" on the spatial functions applied on literals. GeoSHACL: Design and Implementation The availability and correctness of the functions are a different concern. GeoSHACL is not a GeoSPARQL benchmark or test suite.
  • 5. 5 # Are things that Foo contains actually within Foo? ex:FooShape a sh:NodeShape ; sh:targetNode ex:Foo ; sh:property [ sh:path (geo:sfContains geo:hasGeometry geo:asWKT) ; geosh:within geo:asWKT ; ] ; . GeoSHACL: Design and Implementation From ex:Foo, we refer to the literals we want to compare. Check these values whether they are within the literal of ex:Foo's geo:asWKT Note: the domain and range of topological relations is geo:SpatialObject (geo:Feature union geo:Geometry)
  • 6. 6 # Implementation of geof:sfWithin constraints geosh:withinConstraint a sh:ConstraintComponent ; sh:parameter [ sh:path geosh:within ; ] ; sh:validator [ a sh:SPARQLAskValidator ; sh:message "Value is not within {$within}." ; sh:ask """ PREFIX geo: <http://www.opengis.net/ont/geosparql#> PREFIX geof: <http://www.opengis.net/def/function/geosparql/> ASK { { FILTER( geof:sfWithin($value, $within) ) } # when comparing constants UNION { FILTER( isIRI($within) ) # when comparing value of property $this $within ?otherValue . FILTER( geof:sfWithin($value, ?otherValue) ) } } """ ] .
  • 7. 7 While not an ontology in the traditional sense, we have published GeoSHACL according to best practices in Linked Data and, as CC BY 4.0, and accessible via a persistent identifier. geosh: https://w3id.org/geoshacl# Published as Linked Data
  • 8. 8 • Little to no prior work (to the best of our knowledge) • Our approach does not only support WKT. Support for other literals, as is the case with Apache Jena, depends on the endpoint • When GeoSPARQL functions are not supported, the constraint components fail "gracefully". See SPARQL 1.1 Query Language - Expressions and Testing Values. • Testing whether an endpoint supports GeoSPARQL functions is not and should not be GeoSHACL's concern. • Benchmarks do exist (*) • One can write SHACL constraints to tests the existence / correct implementation of GeoSPARQL, but then we are creating a test suite or benchmark. This may be useful to be declared separately? Discussion (*) Jovanovik, M., Homburg, T., Spasić, M.: Software for the GeoSPARQL compliance benchmark. Softw. Impacts. 8, 100071 (2021). https://doi.org/10.1016/j.simpa.2021.100071
  • 9. 9 Conclusions • While SHACL is powerful, one also has to consider sharing and reusing constraint components that may hold in many domains, applications,… • We demonstrate how we can tackle this problem (method) for GeoSPARQL (the domain) with GeoSHACL. GeoSHACL shares SHACL Constraint Components according to Linked Data principles for GeoSPARQL. • Our contribution seems simple, but we provide an important first step towards realizing this Future work • Incorporate functions beyond the simple features relation family • Constraints (stored separately) to test an endpoint's GeoSPARQL capabilities Conclusions and Future Work
  • 10. 10 Smals Research https://www.smalsresearch.be/ Christophe Debruyne christophe.debruyne@smals.be The views and opinions expressed in this paper and presentation are those of the authors and do not express the views or opinions of Smals. Acknowledgements: Kris McGlinn is supported by the ADAPT Centre for Digital Content Technology, which is funded under the SFI Research Centres Programme (Grant 13/RC/2106) and is co-funded under the European Regional Development Fund.