An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School...

80
An Introduction to Linked Geospatial Data Manolis Koubarakis http://www.di.uoa.gr/~koubarak Web Intelligence Summer School 2015 Dept. of Informatics and Telecommunications National and Kapodistrian University of Athens

Transcript of An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School...

Page 1: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

An Introduction to Linked Geospatial Data

Manolis Koubarakishttp://www.di.uoa.gr/~koubarak

Web Intelligence Summer School 2015

Dept. of Informatics and TelecommunicationsNational and Kapodistrian University of Athens

Page 2: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 2

Outline

• Why geospatial data?• Geospatial data in the linked data cloud• Representation and querying of linked

geospatial data:• GeoSPARQL• stRDF/stSPARQL

• Implemented RDF stores with geospatial functionality

• Comparison• Open research problems

Page 3: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 3

Why Geospatial Information?

• Geospatial, and in general geographical, information is very

important in reality: everything that happens, happens

somewhere (location).

• Decision making can be substantially improved if we know

where things take place.

Page 4: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 4

Geospatial data on the Web

Page 5: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 5

Open Government Data

Page 6: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 6

Linked geospatial data – Ordnance Survey

Page 7: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 7

Linked geospatial data – Open Street Map

Page 8: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 8

http://www.linkedopendata.gr

Page 9: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 9

LOD Cloud

Page 10: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 10

Representation and Querying of Linked Geospatial Data

• Early papers:• Kollas (2007)• Perry’s Ph.D. dissertation (2008)• Koubarakis and Kyzirakos (2010)

• We concentrate on two recent proposals:• GeoSPARQL (2012)• stRDF/stSPARQL (2012)

Page 11: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 11

Common Approach

• The two proposals offer constructs for:o Developing ontologies for spatial

and temporal data.o Encoding spatial and temporal

data that use these ontologies in RDF.

o Extending SPARQL to query spatial and temporal data.

• Temporal data are covered only by stRDF/stSPARQL

Page 12: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 12

GeoSPARQL

GeoSPARQL is an OGC standard.

Main functionalities:

Representing geospatial information is done using high level ontologies inspired from GIS terminology.

Geometries are represented using literals of spatial datatypes.

Literals are serialized using OGC standards WKT and GML.

Families of functions are offered for querying geometries.

[Perry and Herring, 2012]

Page 13: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

GeoSPARQL Components

Core

Topology VocabularyExtension

- relation family

Geometry Extension - serialization - version

Geometry TopologyExtension

- serialization - version - relation family

Query RewriteExtension

- serialization - version - relation family

RDFS Entailment Extension

- serialization - version - relation family

Parameters• Serialization

• WKT• GML

• Relation Family• Simple

Features• RCC-8• Egenhofer

Page 14: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 14

GeoSPARQL Core

Defines two top level classes that can be used to organize geospatial data.

Page 15: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 15

Geographic Feature

• Geographic feature or geographic object: a domain entity

that can have various attributes that describe spatial and non-

spatial characteristics.

• Example: the country Greece with attributes

• Population

• Flag

• Capital

• Geographical area

• Coastline

• Bordering countries

Page 16: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 16

Geographic Feature (cont’d)

• Geographic features can be atomic or complex.

• Example: According to the Kallikratis administrative reform of

2010, Greece consists of:

• 13 regions (e.g., Crete)

• Each region consists of regional units (e.g., Heraklion)

• Each regional unit consists of municipalities (e.g.,

Dimos Chersonisou)

• …

Page 17: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 17

Geographic Feature (cont’d)

• The spatial characteristics of a feature can involve:

• Geometric information (location in the underlying

geographic space, shape etc.)

• Topological information (containment, adjacency etc.).

Municipalities of the regional unit of Heraklion:1. Dimos Irakliou2. Dimos Archanon-Asterousion3. Dimos Viannou4. Dimos Gortynas5. Dimos Maleviziou6. Dimos Minoa Pediadas7. Dimos Festou8. Dimos Chersonisou

Page 18: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 18

GeoSPARQL Geometry Extension

Provides vocabulary for asserting and querying data about the geometric attributes of a feature.

Page 19: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 19

Well-Known Text (WKT)

• WKT is an OGC and ISO standard for representing geometries,

coordinate reference systems, and transformations

between coordinate reference systems.

• WKT is specified in OpenGIS Simple Feature Access - Part 1:

Common Architecture standard which is the same as the ISO 19125-1

standard. Download from

http://portal.opengeospatial.org/files/?artifact_id=25355 .

• This standard concentrates on simple features: features with

all spatial attributes described piecewise by a straight line or a

planar interpolation between sets of points.

Page 20: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 20

WKT Class Hierarchy

Page 21: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 21

Example

WKT representation:

GeometryCollection( Point(5 35), LineString(3 10,5 25,15 35,20 37,30 40), Polygon((5 5,28 7,44 14,47 35,40 40,20 30,5 5), (28 29,14.5 11,26.5 12,37.5 20,28 29)) )

Page 22: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 22

Geography Markup Language (GML)

• GML is an XML-based encoding standard for the

representation of geospatial data.

• GML provides XML schemas for defining a variety of concepts:

geographic features, geometry, coordinate reference

systems, topology, time and units of measurement.

• GML profiles are subsets of GML that target particular

applications.

• Examples: Point Profile, GML Simple Features Profile etc.

Page 23: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 23

GML Simple Features: Class Hierarchy

Page 24: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 24

Example

GML representation:

<gml:Polygon gml:id="p3" srsName="urn:ogc:def:crs:EPSG:6.6:4326”>

<gml:exterior><gml:LinearRing>

<gml:coordinates>5,5 28,7 44,14 47,35 40,40 20,30 5,5

</gml:coordinates></gml:LinearRing>

</gml:exterior></gml:Polygon>

Page 25: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 25

Example: Greek Administrative Geography

Page 26: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 26

Domain Ontology

Page 27: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 27

Greek Administrative Geography

Page 28: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 28

Greek Administrative Geography

Page 29: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

ESWC 2015 Tutorial 29

Example Data

gag:Olympia

rdf:type gag:MunicipalCommunity;

gag:name "Ancient Olympia";

gag:population "184"^^xsd:int;

geo:hasGeometry ex:polygon1.

ex:polygon1

rdf:type geo:Geometry;

geo:asWKT "http://www.opengis.net/def/crs/OGC/1.3/CRS84

POLYGON((21.5 18.5,23.5 18.5, 23.5

21,21.5 21,21.5 18.5))" ^^sf:wktLiteral.

Datatype from Geometry extension

CoordinateReference

System

Property from Geometry extension

Property from Geometry extension

Class from Geometry extension

Geometry literal

Page 30: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 30

Non-Topological Query Functions of the Geometry Extension

The following non-topological query functions are also offered: geof:distance geof:buffer geof:convexHull geof:intersection geof:union geof:difference geof:symDifference geof:envelope geof:boundary

The Egenhofer relations e.g., geo:ehMeet

The RCC-8 relations e.g., geo:rcc8ec

Page 31: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 31

GeoSPARQL: An example

SELECT ?r ?cWHERE {

?r rdf:type clc:Region; geo:hasGeometry ?rGeom;clc:hasCorineLandCover ?f.?f rdfs:subClassOf clc:Forest.?c rdf:type gag:MunicipalCommunity; geo:hasGeometry ?cGeom.

FILTER(geof:distance(?rGeom,?cGeom,uom:metre) < 1000)}

Non-topological query functionfrom Geometry

extension

Find forests near municipal communities

Page 32: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 32

GeoSPARQL Topology Vocabulary Extension• The extension is used for representing topological information about features.

• Topological information is inherently qualitative and it is expressed in terms of

topological relations (e.g., containment, adjacency, overlap etc.).

• Topological information can be derived from geometric information or it might

be captured by asserting explicitly the topological relations between

features.

Page 33: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 33

Topological Relations

• The study of topological relations has produced

a lot of interesting results by researchers in:

• GIS

• Spatial databases

• Artificial Intelligence (qualitative reasoning

and knowledge representation)

Page 34: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 34

DE-9IM

• The dimensionally extended 9-intersection model

(DE-9IM) of Clementini and Felice.

• It is based on the point-set topology of R2.

• It deals with simple, closed and connected

geometries (areas, lines, points).

• It is an extension of earlier approaches: the 4-

intersection (4IM) and 9-intersection (9IM) models

by Egenhofer and colleagues.

Page 35: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 35

Topological Relations in DE-9IM

• It captures topological relationships between two

geometries a and b in R2 by considering the

dimensions of the intersections of the

boundaries, interiors and exteriors of the two

geometries:

• The dimension can be 2, 1, 0 and -1 (dimension of the

empty set).

Page 36: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 36

Example

I(C) B(C) E(C)

I(A) -1 -1 2

B(A) -1 -1 1

E(A) 2 1 2

A

C

Page 37: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 37

Topological Relations in DE-9IM

• The following five named relationships between two different

geometries can be distinguished: disjoint, touches, crosses,

within and overlaps.

• The named relationships have a reasonably intuitive meaning

for users. They are jointly exclusive and pairwise disjoint

(JEPD).

• The model can also be defined using an appropriate calculus of

geometries that uses these 5 binary relations and boundary

operators.

Page 38: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 38

Example: A disjoint C

I(C) B(C) E(C)

I(A) F F *

B(A) F F *

E(A) * * *

A

C

Notation: • T = { 0, 1, 2 }• F = -1 • * = don’t care = { -1, 0, 1, 2 }

Page 39: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 39

Example: A within C

I(C) B(C) E(C)

I(A) T * F

B(A) * * F

E(A) * * *

C

A

Notation equivalent to 3x3 matrix:

• String of 9 characters representing the above matrix in row major order.

• In this case: T*F**F***

Page 40: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 40

DE-9IM Relation Definitions

Page 41: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 41

Simple Features Relation Definitions

• A equals B can be defined by the pattern TFFFTFFFT.

• A intersects B is the negation of A disjoint B

• A contains B is equivalent to B within A

Page 42: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 42

The Region Connection Calculus (RCC)

• The primitives of the calculus are spatial regions. These are

non-empty, regular closed subsets of a topological space.

• The calculus is based on a single binary predicate C that

formalizes the “connectedness” relation.

• C(a,b) is true when the closure of a is connected to the

closure of b i.e., they have at least one point in common.

• It is axiomatized using first order logic.

Page 43: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 43

RCC-8

• This is a set of eight JEPD binary relations that can

be defined in terms of predicate C.

Page 44: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 44

RCC-5

• The RCC-5 subset has also been studied. The

granularity here is coarser. The boundary of a region is

not taken into consideration:

• No distinction among DC and EC, called just DR.

• No distinction among TPP and NTPP, called just PP.

• RCC-8 and RCC-5 relations can also be defined

using point-set topology, and there are very close

connections to the models of Egenhofer and others.

Page 45: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 45

GeoSPARQL Topology Vocabulary Extension

The extension is parameterized by the family of topological relations supported:

Topological relations for simple features

The Egenhofer relations e.g., geo:ehMeet

The RCC-8 relations e.g., geo:rcc8ec

Page 46: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

gag:Olympiardf:type gag:MunicipalCommunity;gag:name "Ancient Olympia".

gag:OlympiaMUnitrdf:type gag:MunicipalityUnit;gag:name "Municipality Unit of Ancient Olympia".

gag:OlympiaMunicipalityrdf:type gag:Municipality;gag:name "Municipality of Ancient Olympia".

gag:Olympia geo:sfWithin gag:OlympiaMUnit .

gag:OlympiaMUnit geo:sfWithin gag:OlympiaMunicipality.

46

Greek Administrative Geography

Simple Features topological

relation

Page 47: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 47

GeoSPARQL: An example

SELECT ?m

WHERE {

?m rdf:type gag:MunicipalityUnit.

?m geo:sfContains gag:Olympia.

}

Find the municipality unit that contains the community of Ancient Olympia

Simple Featurestopological relation

Answer: ?m = gag:OlympiaMUnit

Page 48: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 48

GeoSPARQL: An example

SELECT ?m

WHERE {

?m rdf:type gag:Municipality.

?m geo:sfContains gag:Olympia.

}

Find the municipality that contains the community of Ancient Olympia

Answer: ?m = gag:OlympiaMunicipality

Page 49: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

ESWC 2015 Tutorial 49

Example (cont’d)

The answer to the previous query can be computed by reasoning about the transitivity of relation geo:sfContains.

Implementation options: • Use rules• Use constraint-based techniques

Page 50: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

ESWC 2015 Tutorial 50

GeoSPARQL Geometry Topology Extension• Offers vocabulary for querying topological

properties of geometry literals.

• Simple Features• geof:relate• geof:sfEquals • geof:sfDisjoint• geof:sfIntersects • geof:sfTouches• geof:sfCrosses• geof:sfWithin• geof:sfContains• geof:sfOverlaps

• Egenhofer (e.g., geof:ehDisjoint)• RCC-8 (e.g., geof:rcc8dc)

Page 51: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 51

Example Query

SELECT ?nameWHERE {

?comm rdf:type gag:LocalCommunity;gag:name ?name;geo:hasGeometry ?

commGeo .?ba rdf:type noa:BurntArea;

geo:hasGeometry ?baGeo .

FILTER(geof:sfOverlaps(?commGeo,?baGeo))}

Geometry Topology Extension Function

Return the names of local communities that have been affected by fires

Geometry Extension Property

Geometry Extension Property

Page 52: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 52

GeoSPARQL Query Rewrite Extension

Provides a collection of RIF rules that use functions of the Geometry Topology extension to establish the existence of predicates of the Topology extension.

Example: given the RIF rule named geor:sfWithin, the serializations of the geometries of gag:Athens and gag:Greece named AthensWKT and GreeceWKT and the fact that

geof:sfWithin(AthensWKT, GreeceWKT)

returns true from the computation of the two geometries, we can derive the triple

gag:Athens geo:sfWithin gag:Greece

One possible implementation is to re-write a given SPARQL query.

Page 53: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 53

RIF Rule

Forall ?f1 ?f2 ?g1 ?g2 ?g1Serial ?g2Serial (?f1[geo:sfWithin->?f2] :- Or( And (?f1[geo:hasDefaultGeometry->?g1] ?f2[geo:hasDefaultGeometry->?g2] ?g1[ogc:asGeomLiteral->?g1Serial] ?g2[ogc:asGeomLiteral->?g2Serial] External(geof:sfWithin (?g1Serial,?g2Serial)))

And (?f1[geo:hasDefaultGeometry->?g1] ?g1[ogc:asGeomLiteral->?g1Serial] ?f2[ogc:asGeomLiteral->?g2Serial] External(geof:sfWithin (?g1Serial,?g2Serial)))

And (?f2[geo:hasDefaultGeometry->?g2] ?f1[ogc:asGeomLiteral->?g1Serial] ?g2[ogc:asGeomLiteral->?g2Serial] External(geof:sfWithin (?g1Serial,?g2Serial)))

And (?f1[ogc:asGeomLiteral->?g1Serial] ?f2[ogc:asGeomLiteral->?g2Serial] External(geof:sfWithin (?g1Serial,?g2Serial)))))

Feature-

Feature

Feature-

Geometry

Geometry-

Feature

Geometry-

Geometry

Page 54: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 54

Example

SELECT ?featureWHERE { ?feature geo:sfWithin

geonames:OlympiaMunicipality.}

Find all features that are inside the municipality of Ancient Olympia

Page 55: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 55

Rewritten Query

SELECT ?featureWHERE { {?feature geo:sfWithin geonames:Olympia } UNION { ?feature geo:hasDefaultGeometry ?featureGeom .

?featureGeom geo:asWKT ?featureSerial . geonames:Olympia geo:hasDefaultGeometry ?olGeom . ?olGeom geo:asWKT ?olSerial . FILTER (geof:sfWithin (?featureSerial, ?olSerial)) } UNION { ?feature geo:hasDefaultGeometry ?featureGeom . ?featureGeom geo:asWKT ?featureSerial . geonames:Olympia geo:asWKT ?olSerial . FILTER (geof:sfWithin (?featureSerial, ?olSerial)) } UNION { ?feature geo:asWKT ?featureSerial . geonames:Olympia geo:hasDefaultGeometry ?olGeom . ?olGeom geo:asWKT ?olSerial . FILTER (geof:sfWithin (?featureSerial, ?olSerial)) } UNION {

?feature geo:asWKT ?featureSerial .geonames:Olympia geo:asWKT ?olSerial .

FILTER (geof:sfWithin (?featureSerial, ?olSerial)) }

Page 56: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

Specifies the RDFS entailments that follow from the class and property hierarchies defined in the other components e.g., the Geometry Extension.

Systems should use an implementation of RDFS entailment to allow the derivation of new triples from those already in a graph.

56

GeoSPARQL RDFS Entailment Extension

Page 57: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 57

Example

Given the triples

ex:f1 geo:hasGeometry ex:g1 .

geo:hasGeometry rdfs:domain geo:Feature.

we can infer the following triples:

ex:f1 rdf:type geo:Feature .

ex:f1 rdf:type geo:SpatialObject .

Page 58: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 58

Representation and Querying of Linked Geospatial Data

• We concentrate on two recent proposals:• GeoSPARQL• stRDF/stSPARQL

Page 59: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 59

The data model stRDF

An extension of RDF for the representation of geospatial information that changes over time.

Geospatial dimension:

Spatial data types are introduced.

Geospatial information is representing using spatial literals of these datatypes.

OGC standards WKT and GML are used for the serialization of spatial literals.

Temporal dimension

Proposed independently and around the same time as GeoSPARQL (starting with an ESWC 2010 paper by Koubarakis and Kyzirakos).

[ Kyzirakos, Karpathiotakis & Koubarakis 2012 ]

Page 60: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 60

The Query Language stSPARQL

It is an extension of SPARQL 1.1

It offers families of functions for querying geometries. The same functions as in the Geometry Extension and Geometry Topology Extension of GeoSPARQL.

In addition the following spatial aggregate functions are offered:

strdf:geometry strdf:union(set of strdf:geometry A) strdf:geometry strdf:intersection(set of strdf:geometry A) strdf:geometry strdf:extent(set of strdf:geometry A)

• No functionality similar to the Topology Extension or Query Rewrite Extension is offered.

• Temporal dimension

Page 61: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

Spatial Function

61

SELECT ?burntArea (strdf:intersection(?baGeom, strdf:union(?fGeom)) AS ?burntForest)WHERE {

?burntArea rdf:type noa:BurntArea;noa:hasGeometry ?

baGeom.?forest rdf:type clc:Region;

clc:hasLandCover clc:ConiferousForest;

clc:hasGeometry ?fGeom.

FILTER(strdf:intersects(?baGeom,?fGeom))}GROUP BY ?burntArea ?baGeom

Compute the parts of burnt areas that lie in coniferous forests.

stSPARQL: An example

Spatial Aggregate

Page 62: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

Time dimensions in Linked Data

User-defined time: A time value (literal) with no special semantics.

Valid time: The time when a fact (represented by a triple) is true in the modeled reality.

Transaction time: The time when the triple is current in the database.

Page 63: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

The time dimension of stRDF: The valid time of triples

The following extensions are introduced in stRDF:• Timeline: the (discrete) value space of the datatype xsd:dateTime of

XML-Schema

• Two kinds of time primitives are supported: time instants and time periods.• A time instant is an element of the time line.• A time period is an expression of the form [B, E) or [B, E] or (B, E] or (B, E) where B and E

are time instants called the beginning and ending time of the period.

• The new datatype strdf:period is introduced.

63

rdfs:Literal

strdf:WKT strdf:GML

strdf:periodstrdf:geometry

Page 64: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

The time dimension of stRDF (cont’d)

• Triples are extended to quads.

• A temporal triple (quad) is an expression of the form s p o t. where s p o. is an RDF triple and t is a time instant or time period called the valid time of the triple.

• The temporal constants NOW and UC (“until changed”) are introduced.

64

Page 65: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

An example with valid time

65

25/0

8/06

25/0

8/07

25/0

8/09Forest

Page 66: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 66

25/0

8/06

25/0

8/07

25/0

8/09Forest

clc:region1 clc:hasLandCover clc:Forest "[2006-08-25T11:00:00+02, "UC")"^^strdf:period .

An example with valid time

Page 67: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

An example with valid time

67

25/0

8/06

25/0

8/07

25/0

8/09Forest

clc:region1 clc:hasLandCover clc:Forest "[2006-08-25T11:00:00+02, "UC")"^^strdf:period .

Burnt area

Page 68: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 68

25/0

8/06

25/0

8/07

25/0

8/09Forest Burnt area

noa:ba1 rdf:type noa:BurntArea "[2007-08-25T11:00:00+02,

"UC")"^^strdf:period .

clc:region1 clc:hasLandCover clc:Forest "[2006-08-25T11:00:00+02, "UC")"^^strdf:period .

An example with valid time

Page 69: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 69

25/0

8/06

25/0

8/07

25/0

8/09Forest Burnt area

noa:ba1 rdf:type noa:BurntArea "[2007-08-25T11:00:00+02,

"UC"))"^^strdf:period .

clc:region1 clc:hasLandCover clc:Forest "[2006-08-25T11:00:00+02,2007-08-25T11:00:00+02)"^^strdf:period .

An example with valid time

Page 70: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015 70

25/0

8/06

25/0

8/07

25/0

8/09Forest Burnt area Agricultural

area

clc:region1 clc:hasLandCover clc:AgriculturalArea "[2009-08-25T11:00:00+02, "UC")"^^strdf:period .

noa:ba1 rdf:type noa:BurntArea "[2007-08-25T11:00:00+02,2009-08-

25T11:00:00+02)"^^strdf:period .

clc:region1 clc:hasLandCover clc:Forest "[2006-08-25T11:00:00+02,2007-08-25T11:00:00+02)"^^strdf:period .

An example with valid time

Page 71: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

The time dimension of stSPARQL

The following extensions are introduced:

• Triple patterns are extended to quad patterns (the last component is a temporal term: variable or constant)

• Temporal extension functions are introduced:• Allen's temporal relations (e.g., strdf:after)• Period constructors (e.g., strdf:period_intersect)• Temporal aggregates (e.g., strdf:maximalPeriod)

71

Page 72: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

• Find the current land cover of all areas in the dataset

SELECT ?clc

WHERE {

?R rdf:type clc:Region .

?R clc:hasLandCover ?clc ?t1 .

FILTER(strdf:during ("NOW", ?t1))

}

Temporal extension functionTemporal constant

Example Query

72

Quad Pattern

Page 73: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

Implemented RDF Stores with Geospatial Functionality

• AllegroGraph• Brodt et al.• Oracle 11c• OWLIM• Parliament• Perry’s Ph.D. thesis• Strabon• uSeekM• Virtuoso

73

Page 74: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

Strabon

• Strabon is a state-of-the-art spatiotemporal RDF store implemented at the University of Athens.

74

Find more about Strabon athttp://strabon.di.uoa.gr/

OPEN SOURCE

Strabon

Repository

SAIL

Query Engine

Parser

Optimizer

Transaction Manager

Storage Manager

RDBMS

Evaluator

stSPARQL to SPARQL Translator

Named Graph Translator PostgreSQL

MonetDB

GeneralDB

PostGIS

PostgreSQL Temporal

stRDFgraphs

stSPARQL/GeoSPARQL

queries

WKT GML

[ISWC2012, ESWC2013]

Page 75: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

System Language Index Geometries CRS support

Relation Families in Geometry Topology

Topology Extension

Strabon stSPARQL/ GeoSPARQL

R-tree-over-GiST

WKT / GML Yes SFEgenhoferRCC-8

No

Parliament GeoSPARQL R-Tree WKT / GML Yes SFEgenhoferRCC-8

Yes

Brodt et al. (RDF-3X)

SPARQL R-Tree WKT No SF No

Perry SPARQL-ST R-Tree GeoRSS GML

Yes RCC8 No

Oracle 11c GeoSPARQL R-Tree WKT / GML Yes SF Yes

uSeekM SPARQL R-tree-over GiST

WKT No SFEgenhoferRCC-8

Yes

Functional Comparison

Page 76: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

System Language Index Geometries CRS support Functions Available

AllegroGraph Extended SPARQL

Distribution sweeping technique

2D point geometries

Partial •Buffer•Bounding Box•Distance

OWLIM Extended SPARQL

Custom 2D point geometries (W3C Basic Geo Vocabulary)

No •Point-in-polygon•Buffer•Distance

Virtuoso SPARQL R-Tree 2D point geometries (in WKT)

Yes SQL/MM (subset)

Functional Comparison (cont’d)

Page 77: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

Performance Evaluation

• Our detailed performance evaluation (with real and simulated data) shows that Strabon is the world's fastest and most functional RDF store.

• The functional and performance benchmark Geographica for geospatial RDF stores has been used to show this.

77

Find more about Geographica athttp://geographica.di.uoa.gr/

[ISWC2013]

Page 78: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

Open Problems

• Query optimization in spatiotemporal RDF stores• Efficient implementation of the reasoning

component needed by the Topology Extension in an RDF store

• Federated geospatial RDF stores• GeoSPARQL query processing on elastic clouds• Keyword query processing in spatiotemporal

RDF stores

78

Page 79: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

Readings

79

• The GeoSPARQL standard found at http://www.opengeospatial.org/standards/geosparql

• The following tutorial paper which introduces to the topic of linked geospatial data: M. Koubarakis, M. Karpathiotakis, K. Kyzirakos, C. Nikolaou and M. Sioutis. Data Models and

Query Languages for Linked Geospatial Data. Reasoning Web Summer School 2012.http://strabon.di.uoa.gr/files/survey.pdf

• The following paper which introduces stSPARQL and Strabon: K. Kyzirakos, M. Karpathiotakis and M. Koubarakis. Strabon: A Semantic Geospatial DBMS.

11th International Semantic Web Conference (ISWC 2012). November 11-15, 2012. Boston, USA.http://iswc2012.semanticweb.org/sites/default/files/76490289.pdf

• The following paper which introduces the temporal features of stSPARQL and Strabon:

K. Bereta, P. Smeros and M. Koubarakis. Representing and Querying the Valid Time of Triples for Linked Geospatial Data. In the 10th Extended Semantic Web Conference (ESWC 2013). Montpellier, France. May 26-30, 2013.http://www.strabon.di.uoa.gr/files/eswc2013.pdf

Page 80: An Introduction to Linked Geospatial Data Manolis Koubarakis koubarak Web Intelligence Summer School 2015 Dept. of Informatics and.

WISS 2015

Readings (cont’d)

80

• The following paper which introduces the RDFi framework which goes beyond GeoSPARQL in the representation of geospatial data:

Charalampos Nikolaou and Manolis Koubarakis. Incomplete Information in RDF. In the 7th International Conference on Web Reasoning and Rule Systems (RR 2013). Mannheim, Germany. July 27-29, 2013.http://cgi.di.uoa.gr/~koubarak/publications/rr2013.pdf

• The following paper which introduces the benchmark Geographica: G. Garbis, K. Kyzirakos and M. Koubarakis. Geographica: A Benchmark for

Geospatial RDF Stores. In the 12th International Semantic Web Conference (ISWC 2013). Sydney, Australia. October 21-25, 2013.

http://cgi.di.uoa.gr/~koubarak/publications/Geographica.pdf

• The work of the W3C/OGC working group on Spatial Data on the Web (http://www.w3.org/2015/spatial/wiki/Main_Page).