SlideShare uma empresa Scribd logo
1 de 10
Baixar para ler offline
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.

Mais conteúdo relacionado

Semelhante a Reusable SHACL Constraint Components for Validating Geospatial Linked Data

Devoxx Belgium 2015
Devoxx Belgium 2015Devoxx Belgium 2015
Devoxx Belgium 2015
GiedriusTS
 

Semelhante a Reusable SHACL Constraint Components for Validating Geospatial Linked Data (20)

SPARQL 1.1 Status
SPARQL 1.1 StatusSPARQL 1.1 Status
SPARQL 1.1 Status
 
JSON-LD update DC 2017
JSON-LD update DC 2017JSON-LD update DC 2017
JSON-LD update DC 2017
 
What's new in the Java API for JSON Binding
What's new in the Java API for JSON BindingWhat's new in the Java API for JSON Binding
What's new in the Java API for JSON Binding
 
Java9to19Final.pptx
Java9to19Final.pptxJava9to19Final.pptx
Java9to19Final.pptx
 
Modularization in java 8
Modularization in java 8Modularization in java 8
Modularization in java 8
 
GraphQL Fundamentals
GraphQL FundamentalsGraphQL Fundamentals
GraphQL Fundamentals
 
Going for GOLD - Adventures in Open Linked Geospatial Metadata
Going for GOLD - Adventures in Open Linked Geospatial MetadataGoing for GOLD - Adventures in Open Linked Geospatial Metadata
Going for GOLD - Adventures in Open Linked Geospatial Metadata
 
Big linked geospatial data tools in ExtremeEarth-phiweek19
Big linked geospatial data tools in ExtremeEarth-phiweek19Big linked geospatial data tools in ExtremeEarth-phiweek19
Big linked geospatial data tools in ExtremeEarth-phiweek19
 
Devoxx Belgium 2015
Devoxx Belgium 2015Devoxx Belgium 2015
Devoxx Belgium 2015
 
From Simple Features to Moving Features and Beyond? at OGC Member Meeting, Se...
From Simple Features to Moving Features and Beyond? at OGC Member Meeting, Se...From Simple Features to Moving Features and Beyond? at OGC Member Meeting, Se...
From Simple Features to Moving Features and Beyond? at OGC Member Meeting, Se...
 
Falcon-AO: Results for OAEI 2007
Falcon-AO: Results for OAEI 2007Falcon-AO: Results for OAEI 2007
Falcon-AO: Results for OAEI 2007
 
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language Tutorial on SPARQL: SPARQL Protocol and RDF Query Language
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language
 
Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)
 
Strabon: A Semantic Geospatial Database System
Strabon: A Semantic Geospatial Database SystemStrabon: A Semantic Geospatial Database System
Strabon: A Semantic Geospatial Database System
 
Spark
SparkSpark
Spark
 
Comparing Vocabularies for Representing Geographical Features and Their Geometry
Comparing Vocabularies for Representing Geographical Features and Their GeometryComparing Vocabularies for Representing Geographical Features and Their Geometry
Comparing Vocabularies for Representing Geographical Features and Their Geometry
 
A spatial data model for moving object databases
A spatial data model for moving object databasesA spatial data model for moving object databases
A spatial data model for moving object databases
 
How can your applications benefit from Java 9?
How can your applications benefit from Java 9?How can your applications benefit from Java 9?
How can your applications benefit from Java 9?
 
Codemotion 2015 spock_workshop
Codemotion 2015 spock_workshopCodemotion 2015 spock_workshop
Codemotion 2015 spock_workshop
 
Towards a More Efficient Paradigm of Storing and Querying Spatial Data on the...
Towards a More Efficient Paradigm of Storing and Querying Spatial Data on the...Towards a More Efficient Paradigm of Storing and Querying Spatial Data on the...
Towards a More Efficient Paradigm of Storing and Querying Spatial Data on the...
 

Mais de Christophe Debruyne

Generating Executable Mappings from RDF Data Cube Data Structure Definitions
Generating Executable Mappings from RDF Data Cube Data Structure DefinitionsGenerating Executable Mappings from RDF Data Cube Data Structure Definitions
Generating Executable Mappings from RDF Data Cube Data Structure Definitions
Christophe Debruyne
 

Mais de Christophe Debruyne (20)

One year of DALIDA Data Literacy Workshops for Adults: a Report
One year of DALIDA Data Literacy Workshops for Adults: a ReportOne year of DALIDA Data Literacy Workshops for Adults: a Report
One year of DALIDA Data Literacy Workshops for Adults: a Report
 
Projet TOXIN : Des graphes de connaissances pour la recherche en toxicologie
Projet TOXIN : Des graphes de connaissances pour la recherche en toxicologieProjet TOXIN : Des graphes de connaissances pour la recherche en toxicologie
Projet TOXIN : Des graphes de connaissances pour la recherche en toxicologie
 
Knowledge Graphs: Concept, mogelijkheden en aandachtspunten
Knowledge Graphs: Concept, mogelijkheden en aandachtspuntenKnowledge Graphs: Concept, mogelijkheden en aandachtspunten
Knowledge Graphs: Concept, mogelijkheden en aandachtspunten
 
Hidden Amongst the Data: the Beyond 2022 Knowledge Graph
Hidden Amongst the Data: the Beyond 2022 Knowledge GraphHidden Amongst the Data: the Beyond 2022 Knowledge Graph
Hidden Amongst the Data: the Beyond 2022 Knowledge Graph
 
Facilitating Data Curation: a Solution Developed in the Toxicology Domain
Facilitating Data Curation: a Solution Developed in the Toxicology DomainFacilitating Data Curation: a Solution Developed in the Toxicology Domain
Facilitating Data Curation: a Solution Developed in the Toxicology Domain
 
Using Maps for Interlinking Geospatial Linked Data
Using Maps for Interlinking Geospatial Linked DataUsing Maps for Interlinking Geospatial Linked Data
Using Maps for Interlinking Geospatial Linked Data
 
Linked Data Publication and Interlinking Research within the SFI funded ADAPT...
Linked Data Publication and Interlinking Research within the SFI funded ADAPT...Linked Data Publication and Interlinking Research within the SFI funded ADAPT...
Linked Data Publication and Interlinking Research within the SFI funded ADAPT...
 
Towards Generating Policy-compliant Datasets (poster)
Towards GeneratingPolicy-compliant Datasets (poster)Towards GeneratingPolicy-compliant Datasets (poster)
Towards Generating Policy-compliant Datasets (poster)
 
Towards Generating Policy-compliant Datasets
Towards Generating Policy-compliant DatasetsTowards Generating Policy-compliant Datasets
Towards Generating Policy-compliant Datasets
 
Generating Executable Mappings from RDF Data Cube Data Structure Definitions
Generating Executable Mappings from RDF Data Cube Data Structure DefinitionsGenerating Executable Mappings from RDF Data Cube Data Structure Definitions
Generating Executable Mappings from RDF Data Cube Data Structure Definitions
 
Uplift – Generating RDF datasets from non-RDF data with R2RML
Uplift – Generating RDF datasets from non-RDF data with R2RMLUplift – Generating RDF datasets from non-RDF data with R2RML
Uplift – Generating RDF datasets from non-RDF data with R2RML
 
A Lightweight Approach to Explore, Enrich and Use Data with a Geospatial Dime...
A Lightweight Approach to Explore, Enrich and Use Data with a Geospatial Dime...A Lightweight Approach to Explore, Enrich and Use Data with a Geospatial Dime...
A Lightweight Approach to Explore, Enrich and Use Data with a Geospatial Dime...
 
Client-side Processing of GeoSPARQL Functions with Triple Pattern Fragments
Client-side Processing of GeoSPARQL Functions with Triple Pattern FragmentsClient-side Processing of GeoSPARQL Functions with Triple Pattern Fragments
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 DataServing Ireland's Geospatial Information as Linked Data
Serving Ireland's Geospatial Information as Linked Data
 
Serving Ireland's Geospatial Information as Linked Data (ISWC 2016 Poster)
Serving Ireland's Geospatial Information as Linked Data (ISWC 2016 Poster)Serving Ireland's Geospatial Information as Linked Data (ISWC 2016 Poster)
Serving Ireland's Geospatial Information as Linked Data (ISWC 2016 Poster)
 
R2RML-F: Towards Sharing and Executing Domain Logic in R2RML Mappings
R2RML-F: Towards Sharing and Executing Domain Logic in R2RML MappingsR2RML-F: Towards Sharing and Executing Domain Logic in R2RML Mappings
R2RML-F: Towards Sharing and Executing Domain Logic in R2RML Mappings
 
Towards a Project Centric Metadata Model and Lifecycle for Ontology Mapping G...
Towards a Project Centric Metadata Model and Lifecycle for Ontology Mapping G...Towards a Project Centric Metadata Model and Lifecycle for Ontology Mapping G...
Towards a Project Centric Metadata Model and Lifecycle for Ontology Mapping G...
 
Creating and Consuming Metadata from Transcribed Historical Vital Records for...
Creating and Consuming Metadata from Transcribed Historical Vital Records for...Creating and Consuming Metadata from Transcribed Historical Vital Records for...
Creating and Consuming Metadata from Transcribed Historical Vital Records for...
 
What is Linked Data?
What is Linked Data?What is Linked Data?
What is Linked Data?
 
Using Semantic Technologies to Create Virtual Families from Historical Vital ...
Using Semantic Technologies to Create Virtual Families from Historical Vital ...Using Semantic Technologies to Create Virtual Families from Historical Vital ...
Using Semantic Technologies to Create Virtual Families from Historical Vital ...
 

Último

LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.
Silpa
 
Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.
Silpa
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Sérgio Sacani
 
Human genetics..........................pptx
Human genetics..........................pptxHuman genetics..........................pptx
Human genetics..........................pptx
Silpa
 
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptxTHE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
ANSARKHAN96
 
Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
MohamedFarag457087
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
levieagacer
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
NazaninKarimi6
 

Último (20)

module for grade 9 for distance learning
module for grade 9 for distance learningmodule for grade 9 for distance learning
module for grade 9 for distance learning
 
LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.
 
Zoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdfZoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdf
 
Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
 
GBSN - Biochemistry (Unit 2) Basic concept of organic chemistry
GBSN - Biochemistry (Unit 2) Basic concept of organic chemistry GBSN - Biochemistry (Unit 2) Basic concept of organic chemistry
GBSN - Biochemistry (Unit 2) Basic concept of organic chemistry
 
Grade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its FunctionsGrade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its Functions
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .
 
Human genetics..........................pptx
Human genetics..........................pptxHuman genetics..........................pptx
Human genetics..........................pptx
 
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptxTHE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
 
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate ProfessorThyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
 
Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
 
Atp synthase , Atp synthase complex 1 to 4.
Atp synthase , Atp synthase complex 1 to 4.Atp synthase , Atp synthase complex 1 to 4.
Atp synthase , Atp synthase complex 1 to 4.
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
 
Role of AI in seed science Predictive modelling and Beyond.pptx
Role of AI in seed science  Predictive modelling and  Beyond.pptxRole of AI in seed science  Predictive modelling and  Beyond.pptx
Role of AI in seed science Predictive modelling and Beyond.pptx
 
FAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical ScienceFAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical Science
 
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort ServiceCall Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
 
Genome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptxGenome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptx
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
 
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
 

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.