SlideShare ist ein Scribd-Unternehmen logo
1 von 10
Downloaden Sie, um offline zu lesen
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.

Weitere ähnliche Inhalte

Ähnlich wie Reusable SHACL Constraint Components for Validating Geospatial Linked Data

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

Ähnlich wie 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...
 

Mehr von 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
 

Mehr von 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 ...
 

Kürzlich hochgeladen

DIFFERENCE IN BACK CROSS AND TEST CROSS
DIFFERENCE IN  BACK CROSS AND TEST CROSSDIFFERENCE IN  BACK CROSS AND TEST CROSS
DIFFERENCE IN BACK CROSS AND TEST CROSS
LeenakshiTyagi
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
anilsa9823
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Sérgio Sacani
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Sérgio Sacani
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
gindu3009
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
University of Hertfordshire
 

Kürzlich hochgeladen (20)

❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
 
DIFFERENCE IN BACK CROSS AND TEST CROSS
DIFFERENCE IN  BACK CROSS AND TEST CROSSDIFFERENCE IN  BACK CROSS AND TEST CROSS
DIFFERENCE IN BACK CROSS AND TEST CROSS
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
 
Biological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfBiological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdf
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C P
 
Green chemistry and Sustainable development.pptx
Green chemistry  and Sustainable development.pptxGreen chemistry  and Sustainable development.pptx
Green chemistry and Sustainable development.pptx
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdf
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on Io
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticsPulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
 

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.