SlideShare a Scribd company logo
1 of 227
Data Models and Query Languages
for Linked Geospatial Data
Reasoning Web 2012
Dept. of Informatics and Telecommunications
National and Kapodistrian University of Athens
Summer School
Manolis Koubarakis, Kostis Kyzirakos and
Charalampos Nikolaou
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
2
Tutorial Organization
14:30 – 14:45 Introduction
14:45 – 15:15 Background in geospatial data modeling
15:15 – 16:00 Geospatial data in RDF - stSPARQL
16:00 – 16:30 Coffee break
16:30 – 16:45 Geospatial data in RDF - GeoSPARQL
16:45 – 17:00 Implemented RDF Stores with geospatial support
17:00 – 17:50 Geospatial information with description logics, OWL
and rules
17:50 – 18:00 Conclusions, questions, discussion
Introduction
Presenter: Manolis Koubarakis
Reasoning Web 2012
Dept. of Informatics and Telecommunications
National and Kapodistrian University of Athens
Summer School
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
4
Outline
• Why should you be interested in
geospatial information?
• Why should you attend this tutorial?
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
5
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.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
6
Geography
• From http://en.wikipedia.org/wiki/Geography
• Geography is the science that studies the lands,
the features, the inhabitants and the phenomena of
the Earth.
• From the Greek word γεωγραφία (geographia)
which means “describing the Earth”.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
7
Geographical Information Systems
and Science
• A geographical information system (GIS) is a system designed to capture,
store, manipulate, analyze, manage, and present all types of geographical
data.
• GIS science is the field of study for developing and using GIS.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
8
Combining GIS Data for Decision Making
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
9
Why this tutorial?
• Lots of geospatial data is available on the Web
today.
• Lots of public data coming out of open government
initiatives is geospatial.
• Lots of the above data is quickly being transformed
into linked data!
• People have started building applications utilizing
linked data.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
10
Geospatial data on the Web
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
11
Open Government Data
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
12
Linked geospatial data –
Ordnance Survey
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
13
Linked geospatial data –
Research Funding Explorer
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
14
Linked geospatial data – Spain
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
15
Linked geospatial data – Open Street Map
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
16
Conclusions
• Introduction
• Why should you be interested in
geospatial information?
• Why should you attend this tutorial?
• Next topic: Background in geospatial
data modeling
Background in geospatial data
modeling
Presenter: Manolis Koubarakis
Reasoning Web 2012
Dept. of Informatics and Telecommunications
National and Kapodistrian University of Athens
Summer School
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
2
Outline
• Basic GIS concepts and terminology
• Geographic space modeling paradigms
• Geospatial data standards
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
3
Basic GIS Concepts and Terminology
• Theme: the information corresponding to a particular domain
that we want to model. A theme is a set of geographic
features.
• Example: the countries of Europe
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
4
Basic GIS Concepts (cont’d)
• 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
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
5
Basic GIS Concepts (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 perfectures (e.g., Heraklion)
• Each perfecture consists of municipalities (e.g., Dimos
Chersonisou)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
6
Basic GIS Concepts (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 perfecture of
Heraklion:
1. Dimos Irakliou
2. Dimos Archanon-Asterousion
3. Dimos Viannou
4. Dimos Gortynas
5. Dimos Maleviziou
6. Dimos Minoa Pediadas
7. Dimos Festou
8. Dimos Chersonisou
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
7
Geometric Information
• Geometric information can be captured by using geometric primitives
(points, lines, polygons, etc.) to approximate the spatial attributes of
the real world feature that we want to model.
• Geometries are associated with a coordinate reference system which
describes the coordinate space in which the geometry is defined.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
8
Topological Information
• 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.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
9
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)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
10
The 4-intersection model
• The 4-intersection model has been defined by Egenhofer and
Franzosa in 1991 based on previous work by Egenhofer and
colleagues.
• It is based on point-set topology.
• Spatial regions are defined to be non-empty, proper subsets
of a topological space. In addition, they must be closed and
have connected interiors.
• Topological relations are the ones that are invariant under
topological homeomorphisms.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
11
4IM and 9IM
• The 4-intersection model can captures topological relations
between two spatial regions a and b by considering whether the
intersection of their boundaries and interiors is empty or
non-empty.
• The 9-intersection model is an extension of the 4-intersection
model (Egenhofer and Herring, 1991).
• 9IM captures topological relations between two spatial regions a
and b by considering whether the intersection of their boundaries,
interiors and exteriors is empty or non-empty.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
12
DE-9IM
• The dimensionally extended 9-intersection model
has been defined by Clementini and Felice in 1994.
• It is also based on the point-set topology of R2 and
deals with “simple”, closed geometries (areas,
lines, points).
• Like its predecessors (4IM, 9IM), it can also be
extended to more complex geometries (areas with
holes, geometries with multiple components).
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
13
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).
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
14
DE-9IM
• Five jointly exclusive and pairwise disjoint (JEPD)
relationships between two different geometries can be
distinguished (disjoint, touches, crosses, within, overlaps).
• The model can also be defined using an appropriate calculus of
geometries that uses these 5 binary relations and boundary
operators.
• See the paper: E. Clementini and P. Felice. A Comparison of
Methods for Representing Topological Relationships. Information
Sciences 80 (1994), pp. 1-34.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
15
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 }
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
16
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***
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
17
DE-9IM Relation Definitions
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
18
The Region Connection Calculus (RCC)
• The primitives of the calculus are spatial regions. These are
non-empty, regular 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.
• See the original paper by Randell, Cui and Cohn (KR 1991).
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
19
RCC-8
• This is a set of eight JEPD binary relations
that can be defined in terms of predicate C.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
20
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.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
21
More Qualitative Spatial Relations
• Orientation/Cardinal directions (left of, right of,
north of, south of, northeast of etc.)
• Distance (close to, far from etc.). This information
can also be quantitative.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
22
Coordinate Systems
• Coordinate: one of n scalar values that determines the position
of a point in an n-dimensional space.
• Coordinate system: a set of mathematical rules for specifying
how coordinates are to be assigned to points.
• Example: the Cartesian coordinate system
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
23
Coordinate Reference Systems
• Coordinate reference system: a coordinate system
that is related to an object (e.g., the Earth, a planar
projection of the Earth, a three dimensional
mathematical space such as R3) through a datum
which specifies its origin, scale, and orientation.
• The term spatial reference system is also used.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
24
Geographic Coordinate Reference Systems
• These are 3-dimensional coordinate systems that utilize latitude
(φ), longitude (λ) , and optionally geodetic height (i.e.,
elevation), to capture geographic locations on Earth.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
25
The World Geodetic System
• The World Geodetic System (WGS) is the most well-known
geographic coordinate reference system and its latest revision is
WGS84.
• Applications: cartography, geodesy, navigation (GPS), etc.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
26
Projected Coordinate Reference Systems
• Projected coordinate reference system: they transform the 3-
dimensional approximation of the Earth into a 2-dimensional
surface (distortions!)
• Example: the Universal Transverse Mercator (UTM) system
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
27
Coordinate Reference Systems (cont’d)
• There are well-known ways to translate between co-
ordinate reference systems.
• Various authorities maintain lists of coordinate
reference systems. See for example:
• OGC http://www.opengis.net/def/crs/
• European Petroleum Survey Group
http://www.epsg-registry.org/
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
28
Geographic Space Modeling Paradigms
• Abstract geographic space modeling
paradigms: discrete objects vs. continuous
fields
• Concrete representations: tessellation vs.
vectors vs. constraints
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
29
Abstract Modeling Paradigms:
Feature-based
• Feature-based (or entity-based or object-based). This kind of
modeling is based on the concepts we presented already.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
30
Abstract Modeling Paradigms:
Field-based
• Each point (x,y) in geographic space is associated with one or
several attribute values defined as continuous functions in x
and y.
• Examples: elevation, precipitation, humidity, temperature for
each point (x,y) in the Euclidean plane.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
31
From Abstract Modeling to Concrete
Representations
• Question: How do we represent the infinite objects of the
abstract representations (points, lines, fields etc.) by finite
means (in a computer)?
• Answers:
• Approximate the continuous space (e.g., ℝ2) by a discrete
one (ℤ2).
• Use special encodings
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
32
Approximations: Tessellation
• In this case a cellular decomposition of the plane (usually, a
grid) serves as a basis for representing the geometry.
• Example: raster representation (fixed or regular tesselation)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
33
Example
• Cadastral map (irregular tessellation) overlayed on a satellite
image.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
34
Special Encodings:
Vector Representation
• In this case objects in space are represented using points as
primitives as follows:
• A point is represented by a tuple of coordinates.
• A line segment is represented by a pair with its beginning
and ending point.
• More complex objects such as arbitrary lines, curves,
surfaces etc. are built recursively by the basic primitives
using constructs such as lists, sets etc.
• This is the approach used in all GIS and other popular
systems today. It has also been standardized by various
international bodies.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
35
Example
[(1,2) (2,2) (5,3) (3,1) (2,1) (1 2)]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
36
Special Encodings:
Constraint Representation
• In this case objects in space are represented by quantifier free
formulas in a constraint language (e.g., linear constraints).
)
3
4
3
53()124()223( ≤−∧≤∧≥∨≥∧≥∧≤+∨≤∧≤∧≥+
x
yxyyxxyyxxy
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
37
Constraint Databases
• The constraint representation of spatial data was the focus of
much work in databases, logic programming and AI after the
paper by Kanellakis, Kuper and Revesz (PODS, 1991).
• The approach was very fruitful theoretically but was not adopted
in practice.
• See the book by Revesz for a tutorial introduction.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
38
Geospatial Data Standards
• The Open Geospatial Consortium (OGC) and the
International Organization for Standardization (ISO) have
developed many geospatial data standards that are in wide use
today. In this tutorial we will cover:
• Well-Known Text
• Geography Markup Language
• OpenGIS Simple Feature Access
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
39
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.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
40
WKT Class Hierarchy
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
41
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))
)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
42
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.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
43
GML Simple Features:
Class Hierarchy
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
44
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>
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
45
OpenGIS Simple Features Access
(cont’d)
• OGC has also specified a standard for the storage, retrieval,
query and update of sets of simple features using
relational DBMS and SQL.
• This standard is “OpenGIS Simple Feature Access - Part 2: SQL
Option” and it is the same as the ISO 19125-2 standard. Download from
http://portal.opengeospatial.org/files/?artifact_id=25354.
• Related standard: ISO 13249 SQL/MM - Part 3.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
46
OpenGIS Simple Features Access
(cont’d)
• The standard covers two implementations options: (i) using only
the SQL predefined data types and (ii) using SQL with
geometry types.
• SQL with geometry types:
• We use the WKT geometry class hierarchy presented earlier
to define new geometric data types for SQL
• We define new SQL functions on those types.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
47
SQL with Geometry Types -
Functions
• Functions that request or check properties of a geometry:
• ST_Dimension(A:Geometry):Integer
• ST_GeometryType(A:Geometry):Character Varying
• ST_AsText(A:Geometry): Character Large Object
• ST_AsBinary(A:Geometry): Binary Large Object
• ST_SRID(A:Geometry): Integer
• ST_IsEmpty(A:Geometry): Boolean
• ST_IsSimple(A:Geometry): Boolean
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
48
SQL with Geometry Types –
Functions (cont’d)
• Functions that test topological relations between two geometries
using the DE-9IM:
• ST_Equals(A:Geometry, B:Geometry):Boolean
• ST_Disjoint(A:Geometry, B:Geometry):Boolean
• ST_Intersects(A:Geometry, B:Geometry):Boolean
• ST_Touches(A:Geometry, B:Geometry):Boolean
• ST_Crosses(A:Geometry, B:Geometry):Boolean
• ST_Within(A:Geometry, B:Geometry):Boolean
• ST_Contains(A:Geometry, B:Geometry):Boolean
• ST_Overlaps(A:Geometry, B:Geometry):Boolean
• ST_Relate(A:Geometry, B:Geometry, Matrix: Char(9)):Boolean
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
49
DE-9IM Relation Definitions
• A equals B can also 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
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
50
SQL with Geometry Types –
Functions (cont’d)
• Functions for constructing new geometries out of existing
ones:
• ST Boundary(A:Geometry):Geometry
• ST_Envelope(A:Geometry):Geometry
• ST_Intersection(A:Geometry, B:Geometry):Geometry
• ST_Union(A:Geometry, B:Geometry):Geometry
• ST_Difference(A:Geometry, B:Geometry):Geometry
• ST_SymDifference(A:Geometry, B:Geometry):Geometry
• ST_Buffer(A:Geometry, distance:Double):Geometry
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
51
Geospatial Relational DBMS
• The OpenGIS Simple Features Access Standard is today been
used in all relational DBMS with a geospatial extension.
• The abstract data type mechanism of the DBMS allows
the representation of all kinds of geospatial data types
supported by the standard.
• The query language (SQL) offers the functions of the
standard for querying data of these types.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
52
Conclusions
• Background in geospatial data modeling:
• Why geographical information?
• Geographical Information Science and Systems
• Geospatial data on the Web and linked geospatial data
• Abstract geographic space modeling paradigms: discrete
objects vs. continuous fields
• Concrete representations: tessellation vs. vectors vs.
constraints
• Geospatial data standards
• Next topic: Geospatial data in the Semantic Web
Geospatial data in RDF –
stSPARQL
Presenter: Kostis Kyzirakos
Reasoning Web 2012
Dept. of Informatics and Telecommunications
National and Kapodistrian University of Athens
Summer School
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
2
Outline
 Main idea
 Early works
 The data model stRDF
 Examples of publicly available linked
geospatial data
 The query language stSPARQL
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
3
Main idea
How do we represent and query geospatial
information in the Semantic Web?
Extend RDF to take into account the
geospatial dimension.
Extend SPARQL to query the new kinds of
data.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
4
Early works
SPAUK
 Geometric attributes of a resource are represented by:
• introducing a blank node for the geometry
• specifying the geometry using GML vocabulary
• associating the blank node with the resource
using GeoRSS vocabulary
 Queries are expressed in SPARQL utilizing appropriate
geometric vocabularies and ontologies (e.g., the
topological relationships of RCC-8).
 Introduces a new PREMISE clause in SPARQL to specify
spatial geometries to be used in a query
 Use some form of the DESCRIBE query form of SPARQL
for asking queries about geometries
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
5
Early works
SPARQL-ST
 Assumes a particular upper ontology
expressed in RDFS for modeling theme,
space and valid time.
 Spatial geometries in SPARQL-ST are
specified by sets of RDF triples that give
various details of the geometry.
 SPARQL-ST provides a set of built-in spatial
conditions that can be used in SPATIAL
FILTER clauses to constrain the geometries
that are returned as answers to queries.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
6
stRDF and stSPARQL
 Similar approach to SPARQL-ST
(theme, space and valid time
can be represented)
 Linear constraints are used to represent
geometries
 Constraints are represented using literals of
an appropriate datatype
 Formal approach
 New version to be presented today uses OGC
standards to represent and query
geometries
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
7
Example
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
8
Example with simplified geometries
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
9
Example in stRDF
geonames:Olympia
geonames:name "Ancient Olympia";
owl:sameAs dbpedia:Olympia_Greece;
rdf:type dbpedia:Community .
Spatial
data type
geonames:Olympia strdf:hasGeometry
"POLYGON((21.5 18.5, 23.5 18.5,
23.5 21, 21.5 21, 21.5 18.5));
<http://www.opengis.net/def/crs/EPSG/0/4326>"^^
strdf:WKT .
Spatial
literal
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
10
strdf:geometry rdf:type rdfs:Datatype;
rdfs:subClassOf rdfs:Literal.
strdf:WKT rdf:type rdfs:Datatype;
rdfs:subClassOf rdfs:Literal;
rdfs:subClassOf strdf:geometry.
strdf:GML rdf:type rdfs:Datatype;
rdfs:subClassOf rdfs:Literal;
rdfs:subClassOf strdf:geometry.
The stRDF Data Model
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
11
We define the datatypes strdf:WKT and strdf:GML
that can be used to represent spatial objects
using the WKT and GML serializations.
 Lexical space: the finite length sequences of
characters that can be produced from the WKT and
GML specifications.
 Literals of type strdf:WKT consist of an optional URI
identifying the coordinate reference system used.
The stRDF Data Model
e.g., "POINT(21 18);
<http://www.opengis.net/def/crs/EPSG/0/4326>"
^^strdf:WKT
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
12
 Value space: the set of geometry values defined
in the WKT and GML standard that is a subset of
the powerset of ℝ2
and ℝ3
.
 Lexical-to-value mapping: takes into account
that the vector-based model is used for
representing geometries.
 The datatype strdf:geometry is the union of
the datatypes strdf:WKT and strdf:GML.
The stRDF Data Model
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
13
Examples of publicly available
linked geospatial data
 Geonames
 Greek Administrative Geography
 Corine Land Use / Land Cover
 Burnt Area Products
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
14
Geonames
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
15
Geonames
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Geonames
gn:2761333
rdf:type geonames:Feature;
geonames:officialName "Vienna"@en;
geonames:name "Politischer Bezirk Wien (Stadt)";
geonames:countryCode "AT";
wgs84_pos:lat "48.2066";
wgs84_pos:long "16.37341".
geonames:parentCountry gn:2782113;
gn:2782113
geonames:name "Austria";
geonames:altName "Republic of Austria"@en,
"Republik Osterreich"@de,
"Αυστρία"@el.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
17
Greek Administrative Geography
Kallikrates ontology
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
18
Greek Administrative Geography
Kallikrates ontology
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
gag:Olympia
rdf:type gag:Community;
geonames:name "Ancient Olympia";
gag:population "184"^^xsd:int;
strdf:hasGeometry "POLYGON
(((25.37 35.34,…)))"^^strdf:WKT.
gag:OlympiaBorough
rdf:type gag:Borough;
rdfs:label "Borough of
Ancient Olympia".
gag:OlympiaMunicipality
rdf:type gag:Municipality;
rdfs:label "Municipality of
Ancient Olympia".
gag:Olympia gag:isPartOf gag:OlympiaBorough .
gag:OlympiaBorough gag:isPartOf gag:OlympiaMunicipality.
19
Greek Administrative Geography
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
20
Corine Land Use / Land Cover
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
21
Corine Land Use / Land Cover
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
22
Corine Land Use / Land Cover
noa:Area_24015134
rdf:type noa:Area ;
noa:hasCode "312"^^xsd:decimal;
noa:hasID "EU-203497"^^xsd:string;
noa:hasArea_ha "255.5807904"^^xsd:double;
strdf:hasGeometry "POLYGON((15.53 62.54,
…))"^^strdf:WKT;
noa:hasLandUse noa:ConiferousForest
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
23
Burnt Area Products
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
24
Burnt Area Products
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
25
Burnt Area Products
noa:ba_15
rdf:type noa:BurntArea;
noa:isProducedByProcessingChain
"static thresholds"^^xsd:string;
noa:hasAcquisitionTime
"2010-08-24T13:00:00"^^xsd:dateTime;
strdf:hasGeometry "MULTIPOLYGON(((
393801.42 4198827.92, ..., 393008 424131)));
<http://www.opengis.net/def/crs/
EPSG/0/2100>"^^strdf:WKT.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
26
stSPARQL: Geospatial SPARQL 1.1
We define a SPARQL extension function for each function
defined in the OpenGIS Simple Features Access standard
Basic functions
 Get a property of a geometry
xsd:int strdf:Dimension(strdf:geometry A)
xsd:string strdf:GeometryType(strdf:geometry A)
xsd:int strdf:SRID(strdf:geometry A)
 Get the desired representation of a geometry
xsd:string strdf:AsText(strdf:geometry A)
strdf:wkb strdf:AsBinary(strdf:geometry A)
xsd:string strdf:AsGML(strdf:geometry A)
 Test whether a certain condition holds
xsd:boolean strdf:IsEmpty(strdf:geometry A)
xsd:boolean strdf:IsSimple(strdf:geometry A)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
27
stSPARQL: Geospatial SPARQL 1.1
Functions for testing topological spatial
relationships
 OGC Simple Features Access
xsd:boolean strdf:Equals(strdf:geometry A, strdf:geometry B)
xsd:boolean strdf:Disjoint(strdf:geometry A, strdf:geometry B)
xsd:boolean strdf:Intersects(strdf:geometry A, strdf:geometry B)
xsd:boolean strdf:Touches(strdf:geometry A, strdf:geometry B)
xsd:boolean strdf:Crosses(strdf:geometry A, strdf:geometry B)
xsd:boolean strdf:Within(strdf:geometry A, strdf:geometry B)
xsd:boolean strdf:Contains(strdf:geometry A, strdf:geometry B)
xsd:boolean strdf:Overlaps(strdf:geometry A, strdf:geometry B)
xsd:boolean strdf:Relate(strdf:geometry A, strdf:geometry B,
xsd:string intersectionPatternMatrix)
 Egenhofer
 RCC-8
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
28
stSPARQL: Geospatial SPARQL 1.1
Spatial analysis functions
 Construct new geometric objects from existing geometric
objects
strdf:geometry strdf:Boundary(strdf:geometry A)
strdf:geometry strdf:Envelope(strdf:geometry A)
strdf:geometry strdf:Intersection(strdf:geometry A, strdf:geometry B)
strdf:geometry strdf:Union(strdf:geometry A, strdf:geometry B)
strdf:geometry strdf:Difference(strdf:geometry A, strdf:geometry B)
strdf:geometry strdf:SymDifference(strdf:geometry A, strdf:geometry B)
strdf:geometry strdf:Buffer(strdf:geometry A, xsd:double distance)
 Spatial metric functions
xsd:float strdf:distance(strdf:geometry A, strdf:geometry B)
xsd:float strdf:area(strdf:geometry A)
 Spatial aggregate functions
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)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
29
stSPARQL: Geospatial SPARQL 1.1
Select clause
 Construction of new geometries (e.g., strdf:buffer(?geo, 0.1))
 Spatial aggregate functions (e.g., strdf:union(?geo))
 Metric functions (e.g., strdf:area(?geo))
Filter clause
 Functions for testing topological spatial relationships between spatial terms
(e.g., strdf:contains(?G1, strdf:union(?G2, ?G3)))
 Numeric expressions involving spatial metric functions
(e.g., strdf:area(?G1) ≤ 2*strdf:area(?G2)+1)
 Boolean combinations
Having clause
 Boolean expressions involving spatial aggregate functions and spatial
metric functions or functions testing for topological relationships between
spatial terms (e.g., strdf:area(strdf:union(?geo))>1)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
30
stSPARQL: An example (1/3)
SELECT ?name
WHERE {
?community rdf:type dbpedia:Community;
geonames:name ?name;
strdf:hasGeometry ?comGeom.
?ba rdf:type noa:BurntArea;
strdf:hasGeometry ?baGeom.
FILTER(strdf:overlap(?comGeom,?baGeom))
}
Spatial
Function
Return the names of communities that have been
affected by fires
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
31
stSPARQL: An example (2/3)
SELECT ?ba ?baGeom
WHERE {
?r rdf:type noa:Region;
strdf:geometry ?rGeom;
noa:hasCorineLandCoverUse ?f.
?f rdfs:subClassOf clc:Forests.
?c rdf:type dbpedia:Community;
strdf:geometry ?cGeom.
?ba rdf:type noa:BurntArea;
strdf:geometry ?baGeom.
FILTER( strdf:intersects(?rGeom,?baGeom) &&
strdf:distance(?baGeom,?cGeom) < 0.02)}Spatial
Functions
Find all burnt forests near communities
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Spatial
Function
32
SELECT ?burntArea
(strdf:intersection(?baGeom,
strdf:union(?fGeom))
AS ?burntForest)
WHERE {
?burntArea rdf:type noa:BurntArea;
strdf:hasGeometry ?baGeom.
?forest rdf:type noa:Region;
noa:hasLandCover noa:coniferousForest;
strdf:hasGeometry ?fGeom.
FILTER(strdf:intersects(?baGeom,?fGeom))
}
GROUP BY ?burntArea ?baGeom
Isolate the parts of the burnt areas that lie in
coniferous forests.
stSPARQL: An example 3/3)
Spatial
Aggregate
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
33
Conclusions
 Geospatial data in the Semantic Web - stSPARQL
 Early works
 The data model stRDF
 Examples of publicly available linked geospatial
data
 The query language stSPARQL
 Next topic: Geospatial data in RDF - GeoSPARQL
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Bibliography
34
[Kolas and Self, 2007]
Kolas, D., Self, T.: Spatially Augmented Knowledgebase. In:
Proceedings of the 6th International Semantic Web Conference and
2nd Asian Semantic Web Conference (ISWC/ASWC2007). Lecture
Notes in Computer Science, vol. 4825, pp. 785-794. Springer
Verlag (2007)
[Perry, 2008]
Perry, M.: A Framework to Support Spatial, Temporal and Thematic
Analytics over Semantic Web Data. Ph.D. thesis, Wright State
University (2008)
[Koubarakis and Kyzirakos, 2010]
Koubarakis, M., Kyzirakos, K.: Modeling and Querying Metadata in the
Semantic Sensor Web: The Model stRDF and the Query Language
stSPARQL. In: ESWC. pp. 425-439 (2010)
Geospatial data in RDF –
GeoSPARQL
Presenter: Kostis Kyzirakos
Reasoning Web 2012
Dept. of Informatics and Telecommunications
National and Kapodistrian University of Athens
Summer School
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
2
GeoSPARQL
GeoSPARQL is a recently completed
OGC standard
Functionalities similar to stSPARQL:
 Geometries are represented using literals
similarly to stSPARQL.
 The same families of functions are offered for
querying geometries.
Functionalities beyond stSPARQL:
 Topological relations can now be asserted as
well so that reasoning and querying on them is
possible.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
3
Example in GeoSPARQL (1/2)
geonames:Olympia
geonames:name "Ancient Olympia";
rdf:type dbpedia:Community ;
geo:hasGeometry ex:polygon1.
ex:polygon1
rdf:type geo:Polygon;
geo:asWKT "POLYGON((21.5 18.5,23.5 18.5,
23.5 21,21.5 21,21.5 18.5))
"^^sf:wktLiteral.
Spatial
data type
Spatial
literal
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
4
Example in GeoSPARQL (2/2)
gag:OlympiaMunicipality
rdf:type gag:Municipality;
rdfs:label "ΔΗΜΟΣ ΑΡΧΑΙΑΣ
ΟΛΥΜΠΙΑΣ"@el;
rdfs:label "Municipality of
Ancient Olympia".
Asserted
topological
relation
gag:olympiaMunicipality geo:sfContains geonames:olympia .
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
GeoSPARQL Components
Core
Topology Vocabulary
Extension
- relation family
Geometry Extension
- serialization
- version
Geometry Topology
Extension
- serialization
- version
- relation family
Query Rewrite
Extension
- serialization
- version
- relation family
RDFS Entailment
Extension
- serialization
- version
- relation family
Parameters
• Serialization
• WKT
• GML
• Relation Family
• Simple
Features
• RCC-8
• Egenhofer
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
6
GeoSPARQL Core
Defines top level classes that provides
users with vocabulary for modeling geospatial
information.
 The class geo:SpatialObject is the
top class and has as instances
everything that can have a spatial
representation.
 The class geo:Feature is a subclass
of geo:SpatialObject. Feature is a
domain entity that can have various
attributes that describe spatial and
non-spatial characteristics.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
7
Example
GeoSPARQL representation of the community of
Ancient Olympia.
dbpedia:Community rdfs:subClassOf geo:Feature .
geonames:Olympia geonames:name "Ancient Olympia";
rdf:type dbpedia:Community .
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
8
GeoSPARQL Geometry Extension
Provides vocabulary for asserting and querying
information about geometries.
 The class geo:Geometry is a top class which is a
superclass of all geometry classes.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
9
Example
GeoSPARQL representation of the community of Ancient
Olympia.
dbpedia:Community rdfs:subClassOf geo:Feature .
geonames:Olympia geonames:name "Ancient Olympia";
rdf:type dbpedia:Community .
geonames:Olympia geo:hasGeometry ex:polygon1.
ex:polygon1 rdf:type geo:Polygon;
geo:isEmpty "false"^^xsd:boolean;
geo:asWKT "POLYGON((21.5 18.5, 23.5
18.5, 23.5 21, 21.5 21,
21.5 18.5))"^^sf:wktLiteral.
Spatial
data type
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
10
GeoSPARQL Geometry Extension
Spatial analysis functions
 Construct new geometric objects from existing geometric
objects
geof:boundary (geom1: ogc:geomLiteral): ogc:geomLiteral
geof:envelope (geom1: ogc:geomLiteral): ogc:geomLiteral
geof:intersection( geom1: ogc:geomLiteral,
geom2: ogc:geomLiteral): ogc:geomLiteral
geof:union ( geom1: ogc:geomLiteral,
geom2: ogc:geomLiteral): ogc:geomLiteral
geof:difference ( geom1: ogc:geomLiteral,
geom2: ogc:geomLiteral): ogc:geomLiteral
geof:symDifference (geom1: ogc:geomLiteral,
geom2:ogc:geomLiteral): ogc:geomLiteral
geof:buffer(geom: ogc:geomLiteral, radius: xsd:double,
units: xsd:anyURI): ogc:geomLiteral
geof:convexHull(geom1: ogc:geomLiteral): ogc:geomLiteral
 Spatial metric functions
geof:distance(geom1: ogc:geomLiteral, geom2:
ogc:geomLiteral, units: xsd:anyURI): xsd:double
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
11
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
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
gag:Olympia
rdf:type gag:Community;
geonames:name "Ancient Olympia".
gag:OlympiaBorough
rdf:type gag:Borough;
rdfs:label "Borough of
Ancient Olympia".
gag:OlympiaMunicipality
rdf:type gag:Municipality;
rdfs:label "Municipality of
Ancient Olympia".
gag:OlympiaBorough geo:sfContains geonames:Olympia .
gag:OlympiaMunicipality geo:sfContains
geonames:OlympiaBorough.
12
Example
Asserted
topological
relation
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
13
GeoSPARQL: An example
SELECT ?m
WHERE {
?m rdf:type gag:Borough.
?m geo:sfContains geonames:Olympia.
}
Find the borough that contains the
community of Ancient Olympia
Topological
Predicate
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
14
GeoSPARQL: An example
SELECT ?m
WHERE {
?m rdf:type gag:Municipality.
?m geo:sfContains geonames:Olympia.
}
Find the municipality that contains the
community of Ancient Olympia
What is the
answer to this
query?
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
15
Example (cont’d)
The answer to the previous query is
?m = gag:OlympiaMunicipality
GeoSPARQL does not tell you how to
compute this answer which needs
reasoning about the transitivity of
relation geo:sfContains.
Options:
• Use rules
• Use constraint-based techniques
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
16
GeoSPARQL Geometry Topology Extension
 Defines Boolean functions that correspond to each of
the topological relations of the topology vocabulary
extension:
 OGC Simple Features Access
geof:sfEquals(geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): xsd:boolean
geof:sfDisjoint(geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): xsd:boolean
geof:sfIntersects(geom1: ogc:geomLiteral,geom2: ogc:geomLiteral): xsd:boolean
geof:sfTouches(geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): xsd:boolean
geof:sfCrosses(geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): xsd:boolean
geof:sfWithin(geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): xsd:boolean
geof:sfContains(geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): xsd:boolean
geof:sfOverlaps(geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): xsd:boolean
 Egenhofer
 RCC-8
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
 Provides a mechanism for realizing the RDFS entailments that
follow from the geometry class hierarchies defined by the WKT
and GML standards.
 Systems should use an implementation of RDFS entailment to
allow the derivation of new triples from those already in a graph.
17
GeoSPARQL RDFS Entailment Extension
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
18
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 .
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
19
GeoSPARQL Query Rewrite Extension
 Provides a collection of RIF rules that use topological extension
functions to establish the existence of topological predicates.
 Example: given the RIF rule named geor:sfWithin, the
serializations of the geometries of dbpedia:Athens and
dbpedia: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
dbpedia:Athens geo:sfWithin dbpedia:Greece
 One possible implementation is to re-write a given SPARQL
query.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
20
RIF Rule
Forall ?f1 ?f2 ?g1 ?g2 ?g1Serial ?g2Serial
(?f1[geo:sfWithin->?f2] :-
Or(
And (?f1[geo:defaultGeometry->?g1]
?f2[geo:defaultGeometry->?g2]
?g1[ogc:asGeomLiteral->?g1Serial]
?g2[ogc:asGeomLiteral->?g2Serial]
External(geo:sfWithin (?g1Serial,?g2Serial)))
And (?f1[geo:defaultGeometry->?g1]
?g1[ogc:asGeomLiteral->?g1Serial]
?f2[ogc:asGeomLiteral->?g2Serial]
External(geo:sfWithin (?g1Serial,?g2Serial)))
And (?f2[geo:defaultGeometry->?g2]
?f1[ogc:asGeomLiteral->?g1Serial]
?g2[ogc:asGeomLiteral->?g2Serial]
External(geo:sfWithin (?g1Serial,?g2Serial)))
And (?f1[ogc:asGeomLiteral->?g1Serial]
?f2[ogc:asGeomLiteral->?g2Serial]
External(geo:sfWithin (?g1Serial,?g2Serial)))
))
Feature
-
Feature
Feature
-
Geometry
Geometry
-
Feature
Geometry
-
Geometry
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
21
GeoSPARQL: An example
SELECT ?feature
WHERE {
?feature geo:sfWithin
geonames:OlympiaMunicipality.
}
Discover the features that are inside the municipality of
Ancient Olympia
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
22
GeoSPARQL: An example
SELECT ?feature
WHERE { {?feature geo:sfWithin geonames:Olympia }
UNION
{ ?feature geo:defaultGeometry ?featureGeom .
?featureGeom geo:asWKT ?featureSerial .
geonames:Olympia geo:defaultGeometry ?olGeom .
?olGeom geo:asWKT ?olSerial .
FILTER (geof:sfWithin (?featureSerial, ?olSerial)) }
UNION { ?feature geo:defaultGeometry ?featureGeom .
?featureGeom geo:asWKT ?featureSerial .
geonames:Olympia geo:asWKT ?olSerial .
FILTER (geof:sfWithin (?featureSerial, ?olSerial)) }
UNION { ?feature geo:asWKT ?featureSerial .
geonames:Olympia geo:defaultGeometry ?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)) }
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
23
Conclusions
 Geospatial data in the Semantic Web
 The query language GeoSPARQL
 Core
 Topology vocabulary extension
 Geometry extension
 Geometry topology extension
 Query rewrite extension
 RDFS entailment extension
 Next topic: Implemented RDF Stores with Geospatial
Support
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Bibliography
24
[Perry and Herring, 2012]
Open Geospatial Consortium. OGC GeoSPARQL - A geographic query
language for RDF data. OGC Candidate Implementation Standard
(2012)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Implemented RDF Stores with
Geospatial Support
Presenter: Kostis Kyzirakos
Reasoning Web 2012
Dept. of Informatics and Telecommunications
National and Kapodistrian University of Athens
Summer School
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Outline
 Relational DBMS with a geospatial extension
 RDF stores with a geospatial component:
• Research prototypes
• Commercial systems
2
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
 Geometries are not explicitly handled by query language (SQL)
 Define datatypes that extend the SQL type system
• Model geometries using Abstract Data Type (ADT)
• Hide the structure of the data type to the user
 The interface to an ADT is a list of operations
 For spatial ADTs: Operations defined according to OGC
Simple Features for SQL
 Vendor-specific implementation irrelevant - extend SQL with
geometric functionality independently of a specific
representation/implementation
How does an RDBMS handle
geometries? (1/2)
3
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Special indices needed for geometry data types
How does an RDBMS handle
geometries? (2/2)
4
Specialised query processing methods
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Will examine following aspects:
 Data model
 Query language
 Functionality exposed
 Coordinate Reference System support
 Indexing Mechanisms
Implemented Systems
5
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
 Strabon
 Parliament
 Brodt et al.
 Perry
Research Prototypes
6
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
 Storage and query evaluation
module for stSPARQL
 Geometries represented using typed literals
WKT & GML serializations supported
 Spatial predicates represented as SPARQL functions
OGC-SFA, Egenhofer, RCC-8 families exposed
Spatial aggregate functions
 Support for multiple coordinate reference systems
 GeoSPARQL support
Core
Geometry Extension
Geometry Topology Extension
Strabon
7
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Strabon - Implementation
8
stRDF
graphs
stSPARQL/
GeoSPARQL
queries
WKT GML
Open Source, available from http://www.strabon.di.uoa.gr/
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
 Storage Engine
 Developed by Raytheon BBN Technologies
 Implementation of GeoSPARQL
• Geometries represented using typed literals
WKT & GML serializations supported
• Three families of topological functions
exposed
OGC-SFA
Egenhofer
RCC-8
• Multiple CRS support
Parliament
9
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
 Rule engine included
 Paired with query
processor
 R-tree used
Parliament - Implementation
10
Open Source, available from
http://www.parliament.semwebcentral.org
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
 Built on top of RDF-3X
 Implemented at University of Stuttgart
 No formal definitions of data model and
query language given
 Geometries expressed according to OGC-SFA
Typed Literals
WKT serialization supported
Expressed in WGS84
 Spatial predicates represented as SPARQL
filter functions
OGC-SFA functionality exposed
Brodt et al.
11
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Focus on spatial query
processing and spatial
indexing techniques for
spatial selections
e.g. "Retrieve features
located inside a given
polygon"
Naive spatial selection
operator
Placed in front of the execution
plan which the planner
returns
Spatial index
(R-Tree) implemented
Only utilized in spatial
selections
Brodt et al. - Implementation
12
Available upon request
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
 Built on top of Oracle 10g
 Implemented at Wright State University
 Implementation of SPARQL-ST
Upper-level ontology imposed
 Geometries expressed according to GeoRSS GML
 Spatial and temporal variables introduced
 Spatial and temporal filters used to filter results with
spatiotemporal constraints
RCC-8 calculus
Allen’s interval calculus
Perry
13
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
 Spatiotemporal operators implemented using Oracle's
extensibility framework
 Three spatial operators defined
 Strictly RDF concepts implemented using Oracle’s RDF
storage and inferencing capabilities
 R-Tree used for indexing spatial objects
Perry - Implementation
14
Available upon request
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
 AllegroGraph
 OWLIM
 Virtuoso
 uSeekM
Commercial RDF Stores
15
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
 Well-known RDF store, developed by Franz Inc.
 Two-dimensional point geometries
Cartesian / spherical coordinate systems supported
 GEO operator introduced for querying
Syntax similar to SPARQL’s GRAPH operator
Available operations:
Radius / Haversine (Buffer)
Bounding Box
Distance
 Linear Representation of data
 X and Y ordinates of a point are combined into a single datum
 Distribution sweeping technique used for indexing
• Strip-based index
 Closed source, available from
http://www.franz.com/agraph/allegrograph/
AllegroGraph
16
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
 Semantic Repository, developed by Ontotext
 Two-dimensional point geometries supported
Expressed using W3C Geo Vocabulary
Point Geometries
WGS84
 Spatial predicates represented as property functions
Available operations:
Point-in-polygon
Buffer
Distance
 Implemented as a Storage and Inference Layer for Sesame
 Custom spatial index used
 Closed Source
Free version available for evaluation purposes
http://www.ontotext.com/owlim
OWLIM
17
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
 Multi-model data server, developed by OpenLink
 Two-dimensional point geometries
Typed literals
WKT serialization supported
Multiple CRS support
 Spatial predicates represented as functions
Subset of SQL/MM supported
 R-Tree used for indexing
 Spatial capabilities firstly included in Virtuoso 6.1
 Closed Source
Open Source Edition available from
http://virtuoso.openlinksw.com/
Does not include the spatial capabilities extension
Virtuoso
18
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
 Add-on library for Sesame-enabled semantic repositories,
developed by OpenSahara
 Geometries expressed according to OGC-SFA
WKT serialization
Only WGS84 supported
 Spatial predicates represented as functions
OGC-SFA functionality exposed
Additional functions
e.g. shortestline(geometry,geometry)
 Implemented as a Storage and Inference Layer (SAIL) for Sesame
May be used with RDF stores that have a Sesame Repository/SAIL layer
 R-tree-over-GiST index used (provided by PostGIS)
 Open Source, Apache v2 License
 Available from https://dev.opensahara.com/projects/useekm
uSeekM
19
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
System Language Index Geometries CRS support Comments on
Functionality
Strabon stSPARQL/
GeoSPARQL*
R-tree-over-
GiST
WKT / GML
support
Yes • OGC-SFA
• Egenhofer
• RCC-8
Parliament GeoSPARQL R-Tree WKT / GML
support
Yes •OGC-SFA
•Egenhofer
•RCC-8
Brodt et al.
(RDF-3X)
SPARQL R-Tree WKT support No OGC-SFA
Perry SPARQL-ST R-Tree GeoRSS
GML
Yes RCC-8
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)
uSeekM SPARQL R-tree-over
GiST
WKT support No OGC-SFA
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
21
Conclusions
 Semantic Geospatial Systems:
 Research Prototypes
 Commercial Systems
 Next topic: Geospatial information with
description logics, OWL and rules
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Bibliography
22
[Kyzirakos et al, 2010]
K. Kyzirakos , M. Karpathiotakis, M. Koubarakis: Developing
Registries for the Semantic Sensor Web using stRDF and stSPARQL
(short paper). In: Proceedings of the 3rd International Workshop
on Semantic Sensor Networks (SSN10) (2010)
[Kyzirakos et al, 2012]
K. Kyzirakos , M. Karpathiotakis, M. Koubarakis: Strabon: A Semantic
Geospatial DBMS. In: Proceedings of the 11th International
Semantic Web Conference (2012)
[Battle and Kolas, 2011]
Battle, R., Kolas, D.: Enabling the Geospatial Semantic Web with
Parliament and GeoSPARQL (2011)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Bibliography
23
[Brodt et al, 2010]
A. Brodt, D. Nicklas, and B. Mitschang. Deep integration of spatial
query processing into native rdf triple stores. In ACM SIGSPATIAL,
2010.
[Perry, 2007]
Matthew Perry. A Framework to Support Spatial, Temporal and
Thematic Analytics over Semantic Web Data. PhD thesis, Wright
State University, 2008
Geospatial Information with
Description Logics, OWL, and
Rules
Presenter: Charalampos Nikolaou
Reasoning Web 2012
Dept. of Informatics and Telecommunications
National and Kapodistrian University of Athens
Summer School
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Outline
§  Geospatial information with description logics
and OWL
§  OWL reasoners with geospatial capabilities
§  Geospatial information with SWRL rules
2
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Geospatial information with DLs and
OWL
Three main approaches:
1.  Use a DL as it is
2.  Define a spatial DL (concrete domain approach)
3.  Hybrid: OWL + Spatial ABox
3
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Use a DL as it is
4
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Use a DL as it is
5
Use OWL-DL
§  Regions are represented by concepts
§  Points are represented by individuals
§  RCC-8 relations among regions expressed by DL axioms
Translation of PO(X, Y) as
X
Y
Z1 Z3 Z2
TBox
ABox
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Use a DL as it is
7
Use OWL-DL
Discussion
§  Impractical when implemented in a reasoner
[Stocker-Sirin, OWLED’09]
§  Unnatural modeling?
§  Can we generalize the approach?
§  For example, can we define the concept of a dream house as one
that is located inside a forest?
§  How do we express disjunctions of RCC-8 relations (indefinite
information)?
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Define a spatial DL
(concrete domain approach)
11
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Concrete domains
§  Reason about specific domains
(real numbers, time intervals, spatial regions)
§  Formalization of a concrete domain using a first-order
theory
§  From roles to features: associate an individual to a
value from a concrete domain
§  Notation:
12
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Concrete domains
Examples:
§  Reals with order ( )
Domain: the set of real numbers
Predicates: < interpreted by the “less-than” relation
§  Allen’s Interval Calculus
Domain: the set of time intervals
Predicates: Allen’s basic interval relations (before, starts, etc.)
and Boolean combinations of them
§  RCC-8 Calculus
Domain: the set of non-empty, regular closed subsets of
Predicates: basic RCC-8 relations (EQ, PO, etc.) and Boolean
combinations of them
13
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
TBox
Concept equivalences/inclusions can include features and
concrete domain predicates
ABox
Assertions can associate an individual to values from a
concrete domain
14
Concrete domains
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Two state of the art approaches
§  : with RCC-8 calculus as the concrete domain
§  extension of model-theoretic semantics of
§  ω-admissibility property
§  tableau-based technique
15
Concrete domains
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Two state of the art approaches
§  : with RCC-8 calculus as the concrete domain
§  extension of model-theoretic semantics of
§  ω-admissibility property
§  tableau-based technique
§  : DL-Lite with RCC-8 calculus as the concrete
domain
§  extension of model-theoretic semantics of DL-Lite
§  FOL-rewritability for unions of conjunctive queries
16
Concrete domains
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
An Example
§  DreamHouse
One that is located inside a pine forest and borders a lake
17
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
An Example
§  DreamHouse
One that is located inside a pine forest and borders a lake
18
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
An Example
§  DreamHouse
One that is located inside a pine forest and borders a lake
19
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
An Example
§  DreamHouse
One that is located inside a pine forest and borders a lake
20
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
An Example
§  DreamHouse
One that is located inside a pine forest and borders a lake
21
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
An Example (classification)
§  ABox
22
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
An Example (classification)
§  ABox
§  Question: Is individual h a DreamHouse?
23
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
An Example (classification)
§  ABox
§  Question: Is individual h a DreamHouse?
§  Answer: Yes.
24
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
An Example (classification)
§  ABox
§  Question: Is individual h a DreamHouse?
§  Answer: Yes.
§  Why?
25
☐
☐
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
An Example (classification)
§  ABox
26
☐
☐
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
An Example (classification)
§  ABox
27
☐
☐
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
An Example (classification)
§  ABox
28
☐
☐
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
An Example (classification)
§  ABox
29
☐
☐
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Hybrid: OWL + Spatial ABox
30
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Hybrid: OWL + Spatial ABox
31
General architecture
KB
TBox ABox
DL
DL Reasoning
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Hybrid: OWL + Spatial ABox
32
General architecture
KB
TBox ABox
DL
DL Reasoning
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Hybrid: OWL + Spatial ABox
33
General architecture
KB
TBox ABox
DL
DL Reasoning
Spatial
ABox
Spatial Reasoning
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Hybrid: OWL + Spatial ABox
34
1. Grutter et al.
2. Reasoner RacerPro (DL/OWL + Spatial ABox)
3. Reasoner PelletSpatial (DL/OWL + Spatial ABox)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Hybrid: OWL + Spatial ABox
35
Domain Knowledge (TBox)
§  Introduction of roles (e.g., partiallyOverlaps) for RCC relations
(e.g., PO)
§  spatiallyRelated: top role for topological relations
§  Role inclusion axioms for RCC relations
Assertions (ABox)
§  Assertion of the “connectsWith” relation, connectsWith(a, b),
between two regions (individuals)
[Grütter et al., ISWC‘08]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Hybrid: OWL + Spatial ABox
36
RCCBox
§  Definition of RCC relations based on the “connectsWith” relation
§  Axioms for composition tables of RCC
Predicate C(x, y)
corresponds to role
connectsWith(x, y) in ABox
[Grütter et al., ISWC‘08]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Hybrid: OWL + Spatial ABox
38
Application
1.  Input: a set of geometries (polygons in )
2.  Compute assertions of the form connectsWith(a, b)
3.  Update ABox with new spatial relations according to definitions in RCCBox
1.  Should DC(a, b) be inferred in RCCBox, then
2.  the role assertion disconnectedWith(a, b) is inserted in ABox
4.  Check spatial consistency of ABox using path consistency on the RCC network
constructed from the spatial role assertions of the ABox
[Grütter et al., ISWC‘08]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
The reasoner RacerPro
39
§  Description Logic:
§  Spatial Extension: the ABox is associated to a spatial
representation layer (RCC substrate)
§  RCC substrate: offers representation and querying facilities for
RCC networks
Features
§  Representation of indefinite information: disjunctions of RCC
relations can be used between two individuals
§  Consistency checking of RCC networks
§  Querying of asserted and entailed RCC relations using the query
language nRQL
[Möller et al.][Wessel-Möller, JAPLL’09]
Available from
http://www.racer-systems.com/products/racerpro/
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
40
§  Spatial regions: a, b, and c
§  Region a contains b
(rcc-related a b ((:ntppi :tppi)))
§  Region a is disjoint with c
(rcc-related a c (:dc))
bX
a
c
bX
a
RacerPro: ABox Reasoning
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
41
§  Spatial regions: a, b, and c
§  Region a contains b
(rcc-related a b ((:ntppi :tppi)))
§  Region a is disjoint with c
(rcc-related a c (:dc))
(?) Which regions are disjoint?
bX
a
c
bX
a
RacerPro: ABox Reasoning
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
42
§  Spatial regions: a, b, and c
§  Region a contains b
(rcc-related a b ((:ntppi :tppi)))
§  Region a is disjoint with c
(rcc-related a c (:dc))
?(retrieve (?x ?y) (and (?x ?y :dc)))
bX
a
c
bX
a
RacerPro: ABox Reasoning
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
RacerPro: ABox Reasoning
43
§  Spatial regions: a, b, and c
§  Region a contains b
(rcc-related a b ((:ntppi :tppi)))
§  Region a is disjoint with c
(rcc-related a c (:dc))
?(retrieve (?x ?y) (and (?x ?y :dc)))
(a, c) and (c, b)
bX
a
c
bX
a
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Dream House (definition)
§  DreamHouse
One that is located inside a pine forest and borders a lake
44
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
§  DreamHouse
One that is located inside a pine forest and borders a lake
45
(implies DreamHouse
(and
(all hasForest PineForest)
(all hasLake Lake)))
Dream House (definition)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
§  DreamHouse
One that is located inside a pine forest and borders a lake
46
(implies DreamHouse
(and
(all hasForest PineForest)
(all hasLake Lake)))
?
Dream House (definition)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
§  ABox
47
Dream House (ABox reasoning)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
§  ABox
§  Question: What are the houses that are threatened?
48
Dream House (ABox reasoning)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
§  ABox
§  Question: What are the houses that are threatened?
§  Answer: House h.
49
Dream House (ABox reasoning)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
§  ABox
§  Question: What are the houses that are threatened?
§  Answer: House h.
§  Why?
50
Dream House (ABox reasoning)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
51
Dream House (ABox reasoning)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
52
NTPP
Dream House (ABox reasoning)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
53
NTPP
EC
Dream House (ABox reasoning)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
54
NTPP
NTPP
EC
Dream House (ABox reasoning)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
55
NTPP
EC
Composition of edge
(vh, vn) and (vn, vf)
NTPP
Dream House (ABox reasoning)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
56
NTPP
EC
Composition of edge
(vh, vn) and (vn, vf)
NTPP
Dream House (ABox reasoning)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
57
NTPP
PO, TPP, NTPP
EC
NTPP
Dream House (ABox reasoning)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
58
NTPP
PO, TPP, NTPP
EC
NTPP
Dream House (ABox reasoning)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
The reasoner PelletSpatial
59
§  Description Logic: OWL 2 ( )
§  Spatial Extension: Separate ABox for spatial data
§  Spatial ABox: Topological relations are managed as a basic
RCC-8 network (a single relation between two nodes)
Features
§  Representation of definite information only
§  Consistency checking of basic RCC-8 networks (path consistency)
§  Querying of asserted and entailed basic RCC-8 relations using a
subset of SPARQL (BGPs and operator AND)
[Stocker-Sirin, OWLED‘09]
Available from
http://clarkparsia.com/pellet/spatial
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
SWRL Rules
60
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Geospatial information with SWRL
rules
61
Extension of OWL for the representation of qualitative and
quantitative spatial information (SOWL)
§  RCC-8
§  Directional relations (e.g., East, North-West), and
§  Distance relations (e.g., “3Km away from Vienna”)
[Batsakis et al., RuleML’11]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Modeling
Geospatial information with SWRL
rules
62
Footprint
Polyline MBRLinePoint
X Y Xmin
Ymin
Xmax
Ymax
Reg2
DistanceReg1-
Reg2
Reg1
3
Location
WestOf
class
instance
datatype
subclass
property
Legend
[Batsakis et al., RuleML’11]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Geospatial information with SWRL
rules
63
Spatial assertions
§  RCC-8 relations between two regions
§  Directional relations between two regions
§  Distance relations between two regions
§  Geometry of regions (in subclasses of Footprint)
[Batsakis et al., RuleML’11]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Geospatial information with SWRL
rules
64
Implementation of the previous framework using OWL
1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity
for spatial relations
[Batsakis et al., RuleML’11]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Geospatial information with SWRL
rules
65
Implementation of the previous framework using OWL
1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity
for spatial relations
2. SWRL rules to
§  encode composition of spatial relations
§  compute the intersection of two sets of spatial relations
§  check spatial consistency (using Pellet)
[Batsakis et al., RuleML’11]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Geospatial information with SWRL
rules
66
Implementation of the previous framework using OWL
1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity
for spatial relations
2. SWRL rules to
§  encode composition of spatial relations
§  compute the intersection of two sets of spatial relations
§  check spatial consistency (using Pellet)
[Batsakis et al., RuleML’11]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Geospatial information with SWRL
rules
67
Implementation of the previous framework using OWL
1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity
for spatial relations
2. SWRL rules to
§  encode composition of spatial relations
§  compute the intersection of two sets of spatial relations
§  check spatial consistency (using Pellet)
denotes disjunction of
relations DC and EC
[Batsakis et al., RuleML’11]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Geospatial information with SWRL
rules
68
Implementation of the previous framework using OWL
1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity
for spatial relations
2. SWRL rules to
§  encode composition of spatial relations
§  compute the intersection of two sets of spatial relations
§  check spatial consistency (using Pellet)
denotes disjunction of
relations DC and EC
[Batsakis et al., RuleML’11]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Geospatial information with SWRL
rules
69
Implementation of the previous framework using OWL
1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity
for spatial relations
2. SWRL rules to
§  encode composition of spatial relations
§  compute the intersection of two sets of spatial relations
§  check spatial consistency (using Pellet)
denotes disjunction of
relations DC and EC
[Batsakis et al., RuleML’11]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Geospatial information with SWRL
rules
70
Implementation of the previous framework using OWL
1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity
for spatial relations
2. SWRL rules to
§  encode composition of spatial relations
§  compute the intersection of two sets of spatial relations
§  check spatial consistency (using Pellet)
Current relation between regions x and y
denotes disjunction of
relations DC and EC
[Batsakis et al., RuleML’11]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Geospatial information with SWRL
rules
71
Implementation of the previous framework using OWL
1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity
for spatial relations
2. SWRL rules to
§  encode composition of spatial relations
§  compute the intersection of two sets of spatial relations
§  check spatial consistency (using Pellet)
Composition of Rj with Rk
Current relation between regions x and y
denotes disjunction of
relations DC and EC
[Batsakis et al., RuleML’11]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Geospatial information with SWRL
rules
72
Implementation of the previous framework using OWL
1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity
for spatial relations
2. SWRL rules to
§  encode composition of spatial relations
§  compute the intersection of two sets of spatial relations
§  check spatial consistency (using Pellet)
Composition of Rj with Rk
Current relation between regions x and y
New relation between x and y
denotes disjunction of
relations DC and EC
[Batsakis et al., RuleML’11]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Geospatial information with SWRL
rules
73
§  Implementation of SOWL is available at
http://www.intelligence.tuc.gr/prototypes.php
[Batsakis et al., RuleML’11]
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Conclusions
75
§  We talked about
§  Geospatial information with description logics and
OWL
§  OWL reasoners with geospatial capabilities
§  Geospatial information with SWRL rules
§  Next topic: conclusions, questions, discussion
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Bibliography
76
[Katz et al., OWLED’05]
Yarden Katz, Bernardo Cuenca Grau: Representing Qualitative Spatial
Information in OWL-DL. OWLED 2005
[Lutz-Milicic, JAR‘07]
Carsten Lutz, Maja Milicic: A Tableau Algorithm for Description Logics
with Concrete Domains and General TBoxes. J. Autom. Reasoning
(JAR) 38(1-3):227-259 (2007)
[Özçep-Möller, DL‘12]
Özgür L. Özçep, Ralf Möller: Combining DL-Lite with Spatial Calculi
for Feasible Geo-thematic Query Answering. Description Logics 2012
[Grütter et al., ISWC‘08]
Rolf Grütter, Thomas Scharrenbach, Bettina Bauer-Messmer:
Improving an RCC-Derived Geospatial Approximation by OWL
Axioms. International Semantic Web Conference 2008:293-306
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
Bibliography
77
[Wessel-Möller, JAPLL’09]
Michael Wessel, Ralf Möller: Flexible software architectures for
ontology-based information systems. J. Applied Logic (JAPLL) 7(1):
75-99 (2009)
[Stocker-Sirin, OWLED‘09]
Markus Stocker, Evren Sirin: PelletSpatial: A Hybrid RCC-8 and RDF/
OWL Reasoning and Query Engine. OWLED 2009
[Batsakis-Petrakis, RuleML’11]
Sotiris Batsakis, Euripides G. M. Petrakis: SOWL: A Framework for
Handling Spatio-temporal Information in OWL 2.0. RuleML Europe
2011:242-249
Conclusions
Presenter: Manolis Koubarakis
Reasoning Web 2012
Dept. of Informatics and Telecommunications
National and Kapodistrian University of Athens
Summer School
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
2
What we talked about
 Introduction
 Background in geospatial data modeling
 Geospatial data in the Semantic Web
(extensions to RDF, stSPARQL and
GeoSPARQL, spatial DLs, rules)
 Implemented systems (RDF stores,
spatial DL reasoners, rule-based)
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
3
What we did not talk about: Tools
• Tools for translating GIS data (e.g.,
shape files or tables from a geospatial
DBMS) into the geospatial extensions of
RDF that we presented.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
4
What we did not talk about:
Representational issues
• What are appropriate vocabularies and
ontologies for representing geospatial
information? (GeoSPARQL only)
• Is the GeoSPARQL vocabularies/ontologies
always appropriate?
• Is using the WKT/GML encoding of a spatial
object always a good idea?
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
5
What we did not talk about: Theory
• Semantics: How do we extend the semantics
of SPARQL, to give semantics to stSPARQL and
GeoSPARQL?
• Computational complexity of query
processing: What is the complexity of
stSPARQL or GeoSPARQL querying?
• Same questions for DLs, OWL and rules.
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
6
Some open research questions
• More efficient geospatial RDF stores (can you beat
Strabon?)
• Federations of geospatial RDF stores
• More expressive/efficient spatial DL reasoners
• Theory (extensions of SPARQL, extensions of DLs,
extensions of SWRL)
• OWL 2 and geospatial (e.g., new data types)
• More efficient SWRL+spatial implementations
Reasoning Web 2012 – Summer School
Data Models and Query Languages for Linked Geospatial Data
7
Thank you for Attending!
• Questions?
• Feedback?

More Related Content

Viewers also liked

Linked DAta Applications: There is no One-Size-Fits All Formula (Short presen...
Linked DAta Applications: There is no One-Size-Fits All Formula (Short presen...Linked DAta Applications: There is no One-Size-Fits All Formula (Short presen...
Linked DAta Applications: There is no One-Size-Fits All Formula (Short presen...Asuncion Gomez-Perez
 
Intro To Geospatial
Intro To GeospatialIntro To Geospatial
Intro To Geospatialdanrickman
 
Enabling Access to Big Geospatial Data with LocationTech and Apache projects
Enabling Access to Big Geospatial Data with LocationTech and Apache projectsEnabling Access to Big Geospatial Data with LocationTech and Apache projects
Enabling Access to Big Geospatial Data with LocationTech and Apache projectsRob Emanuele
 
Spatially enabled open source BI (GeoBI) with GeoKettle, GeoMondrian & SOLAPL...
Spatially enabled open source BI (GeoBI) with GeoKettle, GeoMondrian & SOLAPL...Spatially enabled open source BI (GeoBI) with GeoKettle, GeoMondrian & SOLAPL...
Spatially enabled open source BI (GeoBI) with GeoKettle, GeoMondrian & SOLAPL...Thierry Badard
 
Change the Way We build - Part 3
Change the Way We build -  Part 3Change the Way We build -  Part 3
Change the Way We build - Part 3Amol Vidwans
 
Geospatial analytics data science sg meetup
Geospatial analytics   data science sg meetupGeospatial analytics   data science sg meetup
Geospatial analytics data science sg meetupNUS-ISS
 
STATVIEW: a web platform for visualisation and dissemination of statistical d...
STATVIEW: a web platform for visualisation and dissemination of statistical d...STATVIEW: a web platform for visualisation and dissemination of statistical d...
STATVIEW: a web platform for visualisation and dissemination of statistical d...ALESSANDRO CAPEZZUOLI
 

Viewers also liked (9)

Linked DAta Applications: There is no One-Size-Fits All Formula (Short presen...
Linked DAta Applications: There is no One-Size-Fits All Formula (Short presen...Linked DAta Applications: There is no One-Size-Fits All Formula (Short presen...
Linked DAta Applications: There is no One-Size-Fits All Formula (Short presen...
 
Intro To Geospatial
Intro To GeospatialIntro To Geospatial
Intro To Geospatial
 
Geospatial Data Preservation Primer GeoConnections
Geospatial Data Preservation Primer GeoConnectionsGeospatial Data Preservation Primer GeoConnections
Geospatial Data Preservation Primer GeoConnections
 
Geospatial Data Abstraction Library (GDAL) Enhancement for ESDIS (GEE)
Geospatial Data Abstraction Library (GDAL) Enhancement for ESDIS (GEE)Geospatial Data Abstraction Library (GDAL) Enhancement for ESDIS (GEE)
Geospatial Data Abstraction Library (GDAL) Enhancement for ESDIS (GEE)
 
Enabling Access to Big Geospatial Data with LocationTech and Apache projects
Enabling Access to Big Geospatial Data with LocationTech and Apache projectsEnabling Access to Big Geospatial Data with LocationTech and Apache projects
Enabling Access to Big Geospatial Data with LocationTech and Apache projects
 
Spatially enabled open source BI (GeoBI) with GeoKettle, GeoMondrian & SOLAPL...
Spatially enabled open source BI (GeoBI) with GeoKettle, GeoMondrian & SOLAPL...Spatially enabled open source BI (GeoBI) with GeoKettle, GeoMondrian & SOLAPL...
Spatially enabled open source BI (GeoBI) with GeoKettle, GeoMondrian & SOLAPL...
 
Change the Way We build - Part 3
Change the Way We build -  Part 3Change the Way We build -  Part 3
Change the Way We build - Part 3
 
Geospatial analytics data science sg meetup
Geospatial analytics   data science sg meetupGeospatial analytics   data science sg meetup
Geospatial analytics data science sg meetup
 
STATVIEW: a web platform for visualisation and dissemination of statistical d...
STATVIEW: a web platform for visualisation and dissemination of statistical d...STATVIEW: a web platform for visualisation and dissemination of statistical d...
STATVIEW: a web platform for visualisation and dissemination of statistical d...
 

Similar to Geo Data Models and Query Languages

DH101 2013/2014 course 6 - Semantic coding, RDF, CIDOC-CRM
DH101 2013/2014 course 6 - Semantic coding, RDF, CIDOC-CRMDH101 2013/2014 course 6 - Semantic coding, RDF, CIDOC-CRM
DH101 2013/2014 course 6 - Semantic coding, RDF, CIDOC-CRMFrederic Kaplan
 
The Project of Education and Awareness-raising: City, Territory, Landscape
The Project of Education and Awareness-raising: City, Territory, LandscapeThe Project of Education and Awareness-raising: City, Territory, Landscape
The Project of Education and Awareness-raising: City, Territory, LandscapePere Sala i Martí
 
Esriuk_track8_university_of_sheffield
Esriuk_track8_university_of_sheffieldEsriuk_track8_university_of_sheffield
Esriuk_track8_university_of_sheffieldEsri UK
 
Andrew Cox Research data management
Andrew Cox Research data managementAndrew Cox Research data management
Andrew Cox Research data managementIncisive_Events
 
Harnessing Textbooks for High-Quality Labeled Data: An Approach to Automatic ...
Harnessing Textbooks for High-Quality Labeled Data: An Approach to Automatic ...Harnessing Textbooks for High-Quality Labeled Data: An Approach to Automatic ...
Harnessing Textbooks for High-Quality Labeled Data: An Approach to Automatic ...Sergey Sosnovsky
 
Thesis presentation for defence
Thesis presentation for defenceThesis presentation for defence
Thesis presentation for defenceKnut Jetlund
 
New Map Librarians: Local Perspectives and Local Experiences on Digital Spati...
New Map Librarians: Local Perspectives and Local Experiences on Digital Spati...New Map Librarians: Local Perspectives and Local Experiences on Digital Spati...
New Map Librarians: Local Perspectives and Local Experiences on Digital Spati...Rose Holley
 
Spatial data analysis 1
Spatial data analysis 1Spatial data analysis 1
Spatial data analysis 1Johan Blomme
 
IASSIST 2012 - DDI-RDF - Trouble with Triples
IASSIST 2012 - DDI-RDF - Trouble with TriplesIASSIST 2012 - DDI-RDF - Trouble with Triples
IASSIST 2012 - DDI-RDF - Trouble with TriplesDr.-Ing. Thomas Hartmann
 
Linked Open (Geo)Data and the Distributed Ontology Language – a perfect match
Linked Open (Geo)Data and the Distributed Ontology Language – a perfect matchLinked Open (Geo)Data and the Distributed Ontology Language – a perfect match
Linked Open (Geo)Data and the Distributed Ontology Language – a perfect matchChristoph Lange
 
Claremont Report on Database Research: Research Directions (Le Gruenwald)
Claremont Report on Database Research: Research Directions (Le Gruenwald)Claremont Report on Database Research: Research Directions (Le Gruenwald)
Claremont Report on Database Research: Research Directions (Le Gruenwald)infoblog
 
Policies for geospatial collections: a research in US and Canadian academic l...
Policies for geospatial collections: a research in US and Canadian academic l...Policies for geospatial collections: a research in US and Canadian academic l...
Policies for geospatial collections: a research in US and Canadian academic l...Giannis Tsakonas
 
Education resume 2.8.2016
Education resume 2.8.2016Education resume 2.8.2016
Education resume 2.8.2016Matthew Appel
 
Education Resume 2.8.2016
Education Resume 2.8.2016Education Resume 2.8.2016
Education Resume 2.8.2016Matthew Appel
 
Cultural Heritage: when data are much worst than one can believe
Cultural Heritage: when data are much worst than one can believe Cultural Heritage: when data are much worst than one can believe
Cultural Heritage: when data are much worst than one can believe Research Data Alliance
 

Similar to Geo Data Models and Query Languages (20)

DH101 2013/2014 course 6 - Semantic coding, RDF, CIDOC-CRM
DH101 2013/2014 course 6 - Semantic coding, RDF, CIDOC-CRMDH101 2013/2014 course 6 - Semantic coding, RDF, CIDOC-CRM
DH101 2013/2014 course 6 - Semantic coding, RDF, CIDOC-CRM
 
The Project of Education and Awareness-raising: City, Territory, Landscape
The Project of Education and Awareness-raising: City, Territory, LandscapeThe Project of Education and Awareness-raising: City, Territory, Landscape
The Project of Education and Awareness-raising: City, Territory, Landscape
 
Esriuk_track8_university_of_sheffield
Esriuk_track8_university_of_sheffieldEsriuk_track8_university_of_sheffield
Esriuk_track8_university_of_sheffield
 
Andrew Cox Research data management
Andrew Cox Research data managementAndrew Cox Research data management
Andrew Cox Research data management
 
Harnessing Textbooks for High-Quality Labeled Data: An Approach to Automatic ...
Harnessing Textbooks for High-Quality Labeled Data: An Approach to Automatic ...Harnessing Textbooks for High-Quality Labeled Data: An Approach to Automatic ...
Harnessing Textbooks for High-Quality Labeled Data: An Approach to Automatic ...
 
Thesis presentation for defence
Thesis presentation for defenceThesis presentation for defence
Thesis presentation for defence
 
New Map Librarians: Local Perspectives and Local Experiences on Digital Spati...
New Map Librarians: Local Perspectives and Local Experiences on Digital Spati...New Map Librarians: Local Perspectives and Local Experiences on Digital Spati...
New Map Librarians: Local Perspectives and Local Experiences on Digital Spati...
 
Data Driven Ontology Practices: The Real world objects of Ordnance Survey Ir...
Data Driven Ontology Practices: The Real world objects of  Ordnance Survey Ir...Data Driven Ontology Practices: The Real world objects of  Ordnance Survey Ir...
Data Driven Ontology Practices: The Real world objects of Ordnance Survey Ir...
 
Spatial data analysis 1
Spatial data analysis 1Spatial data analysis 1
Spatial data analysis 1
 
Phd defense slides
Phd defense slidesPhd defense slides
Phd defense slides
 
Museum reasonableview
Museum reasonableviewMuseum reasonableview
Museum reasonableview
 
IASSIST 2012 - DDI-RDF - Trouble with Triples
IASSIST 2012 - DDI-RDF - Trouble with TriplesIASSIST 2012 - DDI-RDF - Trouble with Triples
IASSIST 2012 - DDI-RDF - Trouble with Triples
 
Linked Open (Geo)Data and the Distributed Ontology Language – a perfect match
Linked Open (Geo)Data and the Distributed Ontology Language – a perfect matchLinked Open (Geo)Data and the Distributed Ontology Language – a perfect match
Linked Open (Geo)Data and the Distributed Ontology Language – a perfect match
 
Open University Data
Open University DataOpen University Data
Open University Data
 
Claremont Report on Database Research: Research Directions (Le Gruenwald)
Claremont Report on Database Research: Research Directions (Le Gruenwald)Claremont Report on Database Research: Research Directions (Le Gruenwald)
Claremont Report on Database Research: Research Directions (Le Gruenwald)
 
Maggie and peter williams liv3 d vis
Maggie and peter williams liv3 d visMaggie and peter williams liv3 d vis
Maggie and peter williams liv3 d vis
 
Policies for geospatial collections: a research in US and Canadian academic l...
Policies for geospatial collections: a research in US and Canadian academic l...Policies for geospatial collections: a research in US and Canadian academic l...
Policies for geospatial collections: a research in US and Canadian academic l...
 
Education resume 2.8.2016
Education resume 2.8.2016Education resume 2.8.2016
Education resume 2.8.2016
 
Education Resume 2.8.2016
Education Resume 2.8.2016Education Resume 2.8.2016
Education Resume 2.8.2016
 
Cultural Heritage: when data are much worst than one can believe
Cultural Heritage: when data are much worst than one can believe Cultural Heritage: when data are much worst than one can believe
Cultural Heritage: when data are much worst than one can believe
 

More from Kostis Kyzirakos

The spatiotemporal RDF store Strabon
The spatiotemporal RDF store StrabonThe spatiotemporal RDF store Strabon
The spatiotemporal RDF store StrabonKostis Kyzirakos
 
Linked Earth Observation Data:The Projects TELEIOS and LEO
Linked Earth Observation Data:The Projects TELEIOS and LEOLinked Earth Observation Data:The Projects TELEIOS and LEO
Linked Earth Observation Data:The Projects TELEIOS and LEOKostis Kyzirakos
 
Geographica: A Benchmark for Geospatial RDF Stores - ISWC 2013
Geographica: A Benchmark for Geospatial RDF Stores - ISWC 2013Geographica: A Benchmark for Geospatial RDF Stores - ISWC 2013
Geographica: A Benchmark for Geospatial RDF Stores - ISWC 2013Kostis Kyzirakos
 
Geographica: A Benchmark for Geospatial RDF Stores
Geographica: A Benchmark for Geospatial RDF StoresGeographica: A Benchmark for Geospatial RDF Stores
Geographica: A Benchmark for Geospatial RDF StoresKostis Kyzirakos
 
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQL
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQLModeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQL
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQLKostis Kyzirakos
 
Building Scalable Semantic Geospatial RDF Stores
Building Scalable Semantic Geospatial RDF StoresBuilding Scalable Semantic Geospatial RDF Stores
Building Scalable Semantic Geospatial RDF StoresKostis Kyzirakos
 
Representing and Querying Geospatial Information in the Semantic Web
Representing and Querying Geospatial Information in the Semantic WebRepresenting and Querying Geospatial Information in the Semantic Web
Representing and Querying Geospatial Information in the Semantic WebKostis Kyzirakos
 
Strabon: A Semantic Geospatial Database System
Strabon: A Semantic Geospatial Database SystemStrabon: A Semantic Geospatial Database System
Strabon: A Semantic Geospatial Database SystemKostis Kyzirakos
 

More from Kostis Kyzirakos (8)

The spatiotemporal RDF store Strabon
The spatiotemporal RDF store StrabonThe spatiotemporal RDF store Strabon
The spatiotemporal RDF store Strabon
 
Linked Earth Observation Data:The Projects TELEIOS and LEO
Linked Earth Observation Data:The Projects TELEIOS and LEOLinked Earth Observation Data:The Projects TELEIOS and LEO
Linked Earth Observation Data:The Projects TELEIOS and LEO
 
Geographica: A Benchmark for Geospatial RDF Stores - ISWC 2013
Geographica: A Benchmark for Geospatial RDF Stores - ISWC 2013Geographica: A Benchmark for Geospatial RDF Stores - ISWC 2013
Geographica: A Benchmark for Geospatial RDF Stores - ISWC 2013
 
Geographica: A Benchmark for Geospatial RDF Stores
Geographica: A Benchmark for Geospatial RDF StoresGeographica: A Benchmark for Geospatial RDF Stores
Geographica: A Benchmark for Geospatial RDF Stores
 
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQL
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQLModeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQL
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQL
 
Building Scalable Semantic Geospatial RDF Stores
Building Scalable Semantic Geospatial RDF StoresBuilding Scalable Semantic Geospatial RDF Stores
Building Scalable Semantic Geospatial RDF Stores
 
Representing and Querying Geospatial Information in the Semantic Web
Representing and Querying Geospatial Information in the Semantic WebRepresenting and Querying Geospatial Information in the Semantic Web
Representing and Querying Geospatial Information in the Semantic Web
 
Strabon: A Semantic Geospatial Database System
Strabon: A Semantic Geospatial Database SystemStrabon: A Semantic Geospatial Database System
Strabon: A Semantic Geospatial Database System
 

Recently uploaded

THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvRicaMaeCastro1
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
How to Manage Engineering to Order in Odoo 17
How to Manage Engineering to Order in Odoo 17How to Manage Engineering to Order in Odoo 17
How to Manage Engineering to Order in Odoo 17Celine George
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsPooky Knightsmith
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxMichelleTuguinay1
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleCeline George
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 

Recently uploaded (20)

THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
How to Manage Engineering to Order in Odoo 17
How to Manage Engineering to Order in Odoo 17How to Manage Engineering to Order in Odoo 17
How to Manage Engineering to Order in Odoo 17
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young minds
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP Module
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 

Geo Data Models and Query Languages

  • 1. Data Models and Query Languages for Linked Geospatial Data Reasoning Web 2012 Dept. of Informatics and Telecommunications National and Kapodistrian University of Athens Summer School Manolis Koubarakis, Kostis Kyzirakos and Charalampos Nikolaou
  • 2. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 2 Tutorial Organization 14:30 – 14:45 Introduction 14:45 – 15:15 Background in geospatial data modeling 15:15 – 16:00 Geospatial data in RDF - stSPARQL 16:00 – 16:30 Coffee break 16:30 – 16:45 Geospatial data in RDF - GeoSPARQL 16:45 – 17:00 Implemented RDF Stores with geospatial support 17:00 – 17:50 Geospatial information with description logics, OWL and rules 17:50 – 18:00 Conclusions, questions, discussion
  • 3. Introduction Presenter: Manolis Koubarakis Reasoning Web 2012 Dept. of Informatics and Telecommunications National and Kapodistrian University of Athens Summer School
  • 4. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 4 Outline • Why should you be interested in geospatial information? • Why should you attend this tutorial?
  • 5. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 5 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.
  • 6. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 6 Geography • From http://en.wikipedia.org/wiki/Geography • Geography is the science that studies the lands, the features, the inhabitants and the phenomena of the Earth. • From the Greek word γεωγραφία (geographia) which means “describing the Earth”.
  • 7. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 7 Geographical Information Systems and Science • A geographical information system (GIS) is a system designed to capture, store, manipulate, analyze, manage, and present all types of geographical data. • GIS science is the field of study for developing and using GIS.
  • 8. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 8 Combining GIS Data for Decision Making
  • 9. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 9 Why this tutorial? • Lots of geospatial data is available on the Web today. • Lots of public data coming out of open government initiatives is geospatial. • Lots of the above data is quickly being transformed into linked data! • People have started building applications utilizing linked data.
  • 10. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 10 Geospatial data on the Web
  • 11. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 11 Open Government Data
  • 12. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 12 Linked geospatial data – Ordnance Survey
  • 13. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 13 Linked geospatial data – Research Funding Explorer
  • 14. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 14 Linked geospatial data – Spain
  • 15. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 15 Linked geospatial data – Open Street Map
  • 16. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 16 Conclusions • Introduction • Why should you be interested in geospatial information? • Why should you attend this tutorial? • Next topic: Background in geospatial data modeling
  • 17. Background in geospatial data modeling Presenter: Manolis Koubarakis Reasoning Web 2012 Dept. of Informatics and Telecommunications National and Kapodistrian University of Athens Summer School
  • 18. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 2 Outline • Basic GIS concepts and terminology • Geographic space modeling paradigms • Geospatial data standards
  • 19. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 3 Basic GIS Concepts and Terminology • Theme: the information corresponding to a particular domain that we want to model. A theme is a set of geographic features. • Example: the countries of Europe
  • 20. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 4 Basic GIS Concepts (cont’d) • 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
  • 21. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 5 Basic GIS Concepts (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 perfectures (e.g., Heraklion) • Each perfecture consists of municipalities (e.g., Dimos Chersonisou)
  • 22. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 6 Basic GIS Concepts (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 perfecture of Heraklion: 1. Dimos Irakliou 2. Dimos Archanon-Asterousion 3. Dimos Viannou 4. Dimos Gortynas 5. Dimos Maleviziou 6. Dimos Minoa Pediadas 7. Dimos Festou 8. Dimos Chersonisou
  • 23. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 7 Geometric Information • Geometric information can be captured by using geometric primitives (points, lines, polygons, etc.) to approximate the spatial attributes of the real world feature that we want to model. • Geometries are associated with a coordinate reference system which describes the coordinate space in which the geometry is defined.
  • 24. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 8 Topological Information • 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.
  • 25. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 9 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)
  • 26. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 10 The 4-intersection model • The 4-intersection model has been defined by Egenhofer and Franzosa in 1991 based on previous work by Egenhofer and colleagues. • It is based on point-set topology. • Spatial regions are defined to be non-empty, proper subsets of a topological space. In addition, they must be closed and have connected interiors. • Topological relations are the ones that are invariant under topological homeomorphisms.
  • 27. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 11 4IM and 9IM • The 4-intersection model can captures topological relations between two spatial regions a and b by considering whether the intersection of their boundaries and interiors is empty or non-empty. • The 9-intersection model is an extension of the 4-intersection model (Egenhofer and Herring, 1991). • 9IM captures topological relations between two spatial regions a and b by considering whether the intersection of their boundaries, interiors and exteriors is empty or non-empty.
  • 28. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 12 DE-9IM • The dimensionally extended 9-intersection model has been defined by Clementini and Felice in 1994. • It is also based on the point-set topology of R2 and deals with “simple”, closed geometries (areas, lines, points). • Like its predecessors (4IM, 9IM), it can also be extended to more complex geometries (areas with holes, geometries with multiple components).
  • 29. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 13 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).
  • 30. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 14 DE-9IM • Five jointly exclusive and pairwise disjoint (JEPD) relationships between two different geometries can be distinguished (disjoint, touches, crosses, within, overlaps). • The model can also be defined using an appropriate calculus of geometries that uses these 5 binary relations and boundary operators. • See the paper: E. Clementini and P. Felice. A Comparison of Methods for Representing Topological Relationships. Information Sciences 80 (1994), pp. 1-34.
  • 31. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 15 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 }
  • 32. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 16 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***
  • 33. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 17 DE-9IM Relation Definitions
  • 34. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 18 The Region Connection Calculus (RCC) • The primitives of the calculus are spatial regions. These are non-empty, regular 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. • See the original paper by Randell, Cui and Cohn (KR 1991).
  • 35. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 19 RCC-8 • This is a set of eight JEPD binary relations that can be defined in terms of predicate C.
  • 36. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 20 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.
  • 37. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 21 More Qualitative Spatial Relations • Orientation/Cardinal directions (left of, right of, north of, south of, northeast of etc.) • Distance (close to, far from etc.). This information can also be quantitative.
  • 38. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 22 Coordinate Systems • Coordinate: one of n scalar values that determines the position of a point in an n-dimensional space. • Coordinate system: a set of mathematical rules for specifying how coordinates are to be assigned to points. • Example: the Cartesian coordinate system
  • 39. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 23 Coordinate Reference Systems • Coordinate reference system: a coordinate system that is related to an object (e.g., the Earth, a planar projection of the Earth, a three dimensional mathematical space such as R3) through a datum which specifies its origin, scale, and orientation. • The term spatial reference system is also used.
  • 40. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 24 Geographic Coordinate Reference Systems • These are 3-dimensional coordinate systems that utilize latitude (φ), longitude (λ) , and optionally geodetic height (i.e., elevation), to capture geographic locations on Earth.
  • 41. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 25 The World Geodetic System • The World Geodetic System (WGS) is the most well-known geographic coordinate reference system and its latest revision is WGS84. • Applications: cartography, geodesy, navigation (GPS), etc.
  • 42. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 26 Projected Coordinate Reference Systems • Projected coordinate reference system: they transform the 3- dimensional approximation of the Earth into a 2-dimensional surface (distortions!) • Example: the Universal Transverse Mercator (UTM) system
  • 43. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 27 Coordinate Reference Systems (cont’d) • There are well-known ways to translate between co- ordinate reference systems. • Various authorities maintain lists of coordinate reference systems. See for example: • OGC http://www.opengis.net/def/crs/ • European Petroleum Survey Group http://www.epsg-registry.org/
  • 44. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 28 Geographic Space Modeling Paradigms • Abstract geographic space modeling paradigms: discrete objects vs. continuous fields • Concrete representations: tessellation vs. vectors vs. constraints
  • 45. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 29 Abstract Modeling Paradigms: Feature-based • Feature-based (or entity-based or object-based). This kind of modeling is based on the concepts we presented already.
  • 46. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 30 Abstract Modeling Paradigms: Field-based • Each point (x,y) in geographic space is associated with one or several attribute values defined as continuous functions in x and y. • Examples: elevation, precipitation, humidity, temperature for each point (x,y) in the Euclidean plane.
  • 47. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 31 From Abstract Modeling to Concrete Representations • Question: How do we represent the infinite objects of the abstract representations (points, lines, fields etc.) by finite means (in a computer)? • Answers: • Approximate the continuous space (e.g., ℝ2) by a discrete one (ℤ2). • Use special encodings
  • 48. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 32 Approximations: Tessellation • In this case a cellular decomposition of the plane (usually, a grid) serves as a basis for representing the geometry. • Example: raster representation (fixed or regular tesselation)
  • 49. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 33 Example • Cadastral map (irregular tessellation) overlayed on a satellite image.
  • 50. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 34 Special Encodings: Vector Representation • In this case objects in space are represented using points as primitives as follows: • A point is represented by a tuple of coordinates. • A line segment is represented by a pair with its beginning and ending point. • More complex objects such as arbitrary lines, curves, surfaces etc. are built recursively by the basic primitives using constructs such as lists, sets etc. • This is the approach used in all GIS and other popular systems today. It has also been standardized by various international bodies.
  • 51. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 35 Example [(1,2) (2,2) (5,3) (3,1) (2,1) (1 2)]
  • 52. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 36 Special Encodings: Constraint Representation • In this case objects in space are represented by quantifier free formulas in a constraint language (e.g., linear constraints). ) 3 4 3 53()124()223( ≤−∧≤∧≥∨≥∧≥∧≤+∨≤∧≤∧≥+ x yxyyxxyyxxy
  • 53. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 37 Constraint Databases • The constraint representation of spatial data was the focus of much work in databases, logic programming and AI after the paper by Kanellakis, Kuper and Revesz (PODS, 1991). • The approach was very fruitful theoretically but was not adopted in practice. • See the book by Revesz for a tutorial introduction.
  • 54. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 38 Geospatial Data Standards • The Open Geospatial Consortium (OGC) and the International Organization for Standardization (ISO) have developed many geospatial data standards that are in wide use today. In this tutorial we will cover: • Well-Known Text • Geography Markup Language • OpenGIS Simple Feature Access
  • 55. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 39 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.
  • 56. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 40 WKT Class Hierarchy
  • 57. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 41 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)) )
  • 58. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 42 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.
  • 59. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 43 GML Simple Features: Class Hierarchy
  • 60. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 44 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>
  • 61. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 45 OpenGIS Simple Features Access (cont’d) • OGC has also specified a standard for the storage, retrieval, query and update of sets of simple features using relational DBMS and SQL. • This standard is “OpenGIS Simple Feature Access - Part 2: SQL Option” and it is the same as the ISO 19125-2 standard. Download from http://portal.opengeospatial.org/files/?artifact_id=25354. • Related standard: ISO 13249 SQL/MM - Part 3.
  • 62. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 46 OpenGIS Simple Features Access (cont’d) • The standard covers two implementations options: (i) using only the SQL predefined data types and (ii) using SQL with geometry types. • SQL with geometry types: • We use the WKT geometry class hierarchy presented earlier to define new geometric data types for SQL • We define new SQL functions on those types.
  • 63. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 47 SQL with Geometry Types - Functions • Functions that request or check properties of a geometry: • ST_Dimension(A:Geometry):Integer • ST_GeometryType(A:Geometry):Character Varying • ST_AsText(A:Geometry): Character Large Object • ST_AsBinary(A:Geometry): Binary Large Object • ST_SRID(A:Geometry): Integer • ST_IsEmpty(A:Geometry): Boolean • ST_IsSimple(A:Geometry): Boolean
  • 64. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 48 SQL with Geometry Types – Functions (cont’d) • Functions that test topological relations between two geometries using the DE-9IM: • ST_Equals(A:Geometry, B:Geometry):Boolean • ST_Disjoint(A:Geometry, B:Geometry):Boolean • ST_Intersects(A:Geometry, B:Geometry):Boolean • ST_Touches(A:Geometry, B:Geometry):Boolean • ST_Crosses(A:Geometry, B:Geometry):Boolean • ST_Within(A:Geometry, B:Geometry):Boolean • ST_Contains(A:Geometry, B:Geometry):Boolean • ST_Overlaps(A:Geometry, B:Geometry):Boolean • ST_Relate(A:Geometry, B:Geometry, Matrix: Char(9)):Boolean
  • 65. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 49 DE-9IM Relation Definitions • A equals B can also 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
  • 66. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 50 SQL with Geometry Types – Functions (cont’d) • Functions for constructing new geometries out of existing ones: • ST Boundary(A:Geometry):Geometry • ST_Envelope(A:Geometry):Geometry • ST_Intersection(A:Geometry, B:Geometry):Geometry • ST_Union(A:Geometry, B:Geometry):Geometry • ST_Difference(A:Geometry, B:Geometry):Geometry • ST_SymDifference(A:Geometry, B:Geometry):Geometry • ST_Buffer(A:Geometry, distance:Double):Geometry
  • 67. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 51 Geospatial Relational DBMS • The OpenGIS Simple Features Access Standard is today been used in all relational DBMS with a geospatial extension. • The abstract data type mechanism of the DBMS allows the representation of all kinds of geospatial data types supported by the standard. • The query language (SQL) offers the functions of the standard for querying data of these types.
  • 68. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 52 Conclusions • Background in geospatial data modeling: • Why geographical information? • Geographical Information Science and Systems • Geospatial data on the Web and linked geospatial data • Abstract geographic space modeling paradigms: discrete objects vs. continuous fields • Concrete representations: tessellation vs. vectors vs. constraints • Geospatial data standards • Next topic: Geospatial data in the Semantic Web
  • 69. Geospatial data in RDF – stSPARQL Presenter: Kostis Kyzirakos Reasoning Web 2012 Dept. of Informatics and Telecommunications National and Kapodistrian University of Athens Summer School
  • 70. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 2 Outline  Main idea  Early works  The data model stRDF  Examples of publicly available linked geospatial data  The query language stSPARQL
  • 71. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 3 Main idea How do we represent and query geospatial information in the Semantic Web? Extend RDF to take into account the geospatial dimension. Extend SPARQL to query the new kinds of data.
  • 72. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 4 Early works SPAUK  Geometric attributes of a resource are represented by: • introducing a blank node for the geometry • specifying the geometry using GML vocabulary • associating the blank node with the resource using GeoRSS vocabulary  Queries are expressed in SPARQL utilizing appropriate geometric vocabularies and ontologies (e.g., the topological relationships of RCC-8).  Introduces a new PREMISE clause in SPARQL to specify spatial geometries to be used in a query  Use some form of the DESCRIBE query form of SPARQL for asking queries about geometries
  • 73. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 5 Early works SPARQL-ST  Assumes a particular upper ontology expressed in RDFS for modeling theme, space and valid time.  Spatial geometries in SPARQL-ST are specified by sets of RDF triples that give various details of the geometry.  SPARQL-ST provides a set of built-in spatial conditions that can be used in SPATIAL FILTER clauses to constrain the geometries that are returned as answers to queries.
  • 74. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 6 stRDF and stSPARQL  Similar approach to SPARQL-ST (theme, space and valid time can be represented)  Linear constraints are used to represent geometries  Constraints are represented using literals of an appropriate datatype  Formal approach  New version to be presented today uses OGC standards to represent and query geometries
  • 75. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 7 Example
  • 76. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 8 Example with simplified geometries
  • 77. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 9 Example in stRDF geonames:Olympia geonames:name "Ancient Olympia"; owl:sameAs dbpedia:Olympia_Greece; rdf:type dbpedia:Community . Spatial data type geonames:Olympia strdf:hasGeometry "POLYGON((21.5 18.5, 23.5 18.5, 23.5 21, 21.5 21, 21.5 18.5)); <http://www.opengis.net/def/crs/EPSG/0/4326>"^^ strdf:WKT . Spatial literal
  • 78. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 10 strdf:geometry rdf:type rdfs:Datatype; rdfs:subClassOf rdfs:Literal. strdf:WKT rdf:type rdfs:Datatype; rdfs:subClassOf rdfs:Literal; rdfs:subClassOf strdf:geometry. strdf:GML rdf:type rdfs:Datatype; rdfs:subClassOf rdfs:Literal; rdfs:subClassOf strdf:geometry. The stRDF Data Model
  • 79. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 11 We define the datatypes strdf:WKT and strdf:GML that can be used to represent spatial objects using the WKT and GML serializations.  Lexical space: the finite length sequences of characters that can be produced from the WKT and GML specifications.  Literals of type strdf:WKT consist of an optional URI identifying the coordinate reference system used. The stRDF Data Model e.g., "POINT(21 18); <http://www.opengis.net/def/crs/EPSG/0/4326>" ^^strdf:WKT
  • 80. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 12  Value space: the set of geometry values defined in the WKT and GML standard that is a subset of the powerset of ℝ2 and ℝ3 .  Lexical-to-value mapping: takes into account that the vector-based model is used for representing geometries.  The datatype strdf:geometry is the union of the datatypes strdf:WKT and strdf:GML. The stRDF Data Model
  • 81. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 13 Examples of publicly available linked geospatial data  Geonames  Greek Administrative Geography  Corine Land Use / Land Cover  Burnt Area Products
  • 82. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 14 Geonames
  • 83. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 15 Geonames
  • 84. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Geonames gn:2761333 rdf:type geonames:Feature; geonames:officialName "Vienna"@en; geonames:name "Politischer Bezirk Wien (Stadt)"; geonames:countryCode "AT"; wgs84_pos:lat "48.2066"; wgs84_pos:long "16.37341". geonames:parentCountry gn:2782113; gn:2782113 geonames:name "Austria"; geonames:altName "Republic of Austria"@en, "Republik Osterreich"@de, "Αυστρία"@el.
  • 85. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 17 Greek Administrative Geography Kallikrates ontology
  • 86. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 18 Greek Administrative Geography Kallikrates ontology
  • 87. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data gag:Olympia rdf:type gag:Community; geonames:name "Ancient Olympia"; gag:population "184"^^xsd:int; strdf:hasGeometry "POLYGON (((25.37 35.34,…)))"^^strdf:WKT. gag:OlympiaBorough rdf:type gag:Borough; rdfs:label "Borough of Ancient Olympia". gag:OlympiaMunicipality rdf:type gag:Municipality; rdfs:label "Municipality of Ancient Olympia". gag:Olympia gag:isPartOf gag:OlympiaBorough . gag:OlympiaBorough gag:isPartOf gag:OlympiaMunicipality. 19 Greek Administrative Geography
  • 88. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 20 Corine Land Use / Land Cover
  • 89. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 21 Corine Land Use / Land Cover
  • 90. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 22 Corine Land Use / Land Cover noa:Area_24015134 rdf:type noa:Area ; noa:hasCode "312"^^xsd:decimal; noa:hasID "EU-203497"^^xsd:string; noa:hasArea_ha "255.5807904"^^xsd:double; strdf:hasGeometry "POLYGON((15.53 62.54, …))"^^strdf:WKT; noa:hasLandUse noa:ConiferousForest
  • 91. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 23 Burnt Area Products
  • 92. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 24 Burnt Area Products
  • 93. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 25 Burnt Area Products noa:ba_15 rdf:type noa:BurntArea; noa:isProducedByProcessingChain "static thresholds"^^xsd:string; noa:hasAcquisitionTime "2010-08-24T13:00:00"^^xsd:dateTime; strdf:hasGeometry "MULTIPOLYGON((( 393801.42 4198827.92, ..., 393008 424131))); <http://www.opengis.net/def/crs/ EPSG/0/2100>"^^strdf:WKT.
  • 94. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 26 stSPARQL: Geospatial SPARQL 1.1 We define a SPARQL extension function for each function defined in the OpenGIS Simple Features Access standard Basic functions  Get a property of a geometry xsd:int strdf:Dimension(strdf:geometry A) xsd:string strdf:GeometryType(strdf:geometry A) xsd:int strdf:SRID(strdf:geometry A)  Get the desired representation of a geometry xsd:string strdf:AsText(strdf:geometry A) strdf:wkb strdf:AsBinary(strdf:geometry A) xsd:string strdf:AsGML(strdf:geometry A)  Test whether a certain condition holds xsd:boolean strdf:IsEmpty(strdf:geometry A) xsd:boolean strdf:IsSimple(strdf:geometry A)
  • 95. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 27 stSPARQL: Geospatial SPARQL 1.1 Functions for testing topological spatial relationships  OGC Simple Features Access xsd:boolean strdf:Equals(strdf:geometry A, strdf:geometry B) xsd:boolean strdf:Disjoint(strdf:geometry A, strdf:geometry B) xsd:boolean strdf:Intersects(strdf:geometry A, strdf:geometry B) xsd:boolean strdf:Touches(strdf:geometry A, strdf:geometry B) xsd:boolean strdf:Crosses(strdf:geometry A, strdf:geometry B) xsd:boolean strdf:Within(strdf:geometry A, strdf:geometry B) xsd:boolean strdf:Contains(strdf:geometry A, strdf:geometry B) xsd:boolean strdf:Overlaps(strdf:geometry A, strdf:geometry B) xsd:boolean strdf:Relate(strdf:geometry A, strdf:geometry B, xsd:string intersectionPatternMatrix)  Egenhofer  RCC-8
  • 96. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 28 stSPARQL: Geospatial SPARQL 1.1 Spatial analysis functions  Construct new geometric objects from existing geometric objects strdf:geometry strdf:Boundary(strdf:geometry A) strdf:geometry strdf:Envelope(strdf:geometry A) strdf:geometry strdf:Intersection(strdf:geometry A, strdf:geometry B) strdf:geometry strdf:Union(strdf:geometry A, strdf:geometry B) strdf:geometry strdf:Difference(strdf:geometry A, strdf:geometry B) strdf:geometry strdf:SymDifference(strdf:geometry A, strdf:geometry B) strdf:geometry strdf:Buffer(strdf:geometry A, xsd:double distance)  Spatial metric functions xsd:float strdf:distance(strdf:geometry A, strdf:geometry B) xsd:float strdf:area(strdf:geometry A)  Spatial aggregate functions 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)
  • 97. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 29 stSPARQL: Geospatial SPARQL 1.1 Select clause  Construction of new geometries (e.g., strdf:buffer(?geo, 0.1))  Spatial aggregate functions (e.g., strdf:union(?geo))  Metric functions (e.g., strdf:area(?geo)) Filter clause  Functions for testing topological spatial relationships between spatial terms (e.g., strdf:contains(?G1, strdf:union(?G2, ?G3)))  Numeric expressions involving spatial metric functions (e.g., strdf:area(?G1) ≤ 2*strdf:area(?G2)+1)  Boolean combinations Having clause  Boolean expressions involving spatial aggregate functions and spatial metric functions or functions testing for topological relationships between spatial terms (e.g., strdf:area(strdf:union(?geo))>1)
  • 98. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 30 stSPARQL: An example (1/3) SELECT ?name WHERE { ?community rdf:type dbpedia:Community; geonames:name ?name; strdf:hasGeometry ?comGeom. ?ba rdf:type noa:BurntArea; strdf:hasGeometry ?baGeom. FILTER(strdf:overlap(?comGeom,?baGeom)) } Spatial Function Return the names of communities that have been affected by fires
  • 99. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 31 stSPARQL: An example (2/3) SELECT ?ba ?baGeom WHERE { ?r rdf:type noa:Region; strdf:geometry ?rGeom; noa:hasCorineLandCoverUse ?f. ?f rdfs:subClassOf clc:Forests. ?c rdf:type dbpedia:Community; strdf:geometry ?cGeom. ?ba rdf:type noa:BurntArea; strdf:geometry ?baGeom. FILTER( strdf:intersects(?rGeom,?baGeom) && strdf:distance(?baGeom,?cGeom) < 0.02)}Spatial Functions Find all burnt forests near communities
  • 100. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Spatial Function 32 SELECT ?burntArea (strdf:intersection(?baGeom, strdf:union(?fGeom)) AS ?burntForest) WHERE { ?burntArea rdf:type noa:BurntArea; strdf:hasGeometry ?baGeom. ?forest rdf:type noa:Region; noa:hasLandCover noa:coniferousForest; strdf:hasGeometry ?fGeom. FILTER(strdf:intersects(?baGeom,?fGeom)) } GROUP BY ?burntArea ?baGeom Isolate the parts of the burnt areas that lie in coniferous forests. stSPARQL: An example 3/3) Spatial Aggregate
  • 101. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 33 Conclusions  Geospatial data in the Semantic Web - stSPARQL  Early works  The data model stRDF  Examples of publicly available linked geospatial data  The query language stSPARQL  Next topic: Geospatial data in RDF - GeoSPARQL
  • 102. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Bibliography 34 [Kolas and Self, 2007] Kolas, D., Self, T.: Spatially Augmented Knowledgebase. In: Proceedings of the 6th International Semantic Web Conference and 2nd Asian Semantic Web Conference (ISWC/ASWC2007). Lecture Notes in Computer Science, vol. 4825, pp. 785-794. Springer Verlag (2007) [Perry, 2008] Perry, M.: A Framework to Support Spatial, Temporal and Thematic Analytics over Semantic Web Data. Ph.D. thesis, Wright State University (2008) [Koubarakis and Kyzirakos, 2010] Koubarakis, M., Kyzirakos, K.: Modeling and Querying Metadata in the Semantic Sensor Web: The Model stRDF and the Query Language stSPARQL. In: ESWC. pp. 425-439 (2010)
  • 103. Geospatial data in RDF – GeoSPARQL Presenter: Kostis Kyzirakos Reasoning Web 2012 Dept. of Informatics and Telecommunications National and Kapodistrian University of Athens Summer School
  • 104. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 2 GeoSPARQL GeoSPARQL is a recently completed OGC standard Functionalities similar to stSPARQL:  Geometries are represented using literals similarly to stSPARQL.  The same families of functions are offered for querying geometries. Functionalities beyond stSPARQL:  Topological relations can now be asserted as well so that reasoning and querying on them is possible.
  • 105. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 3 Example in GeoSPARQL (1/2) geonames:Olympia geonames:name "Ancient Olympia"; rdf:type dbpedia:Community ; geo:hasGeometry ex:polygon1. ex:polygon1 rdf:type geo:Polygon; geo:asWKT "POLYGON((21.5 18.5,23.5 18.5, 23.5 21,21.5 21,21.5 18.5)) "^^sf:wktLiteral. Spatial data type Spatial literal
  • 106. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 4 Example in GeoSPARQL (2/2) gag:OlympiaMunicipality rdf:type gag:Municipality; rdfs:label "ΔΗΜΟΣ ΑΡΧΑΙΑΣ ΟΛΥΜΠΙΑΣ"@el; rdfs:label "Municipality of Ancient Olympia". Asserted topological relation gag:olympiaMunicipality geo:sfContains geonames:olympia .
  • 107. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data GeoSPARQL Components Core Topology Vocabulary Extension - relation family Geometry Extension - serialization - version Geometry Topology Extension - serialization - version - relation family Query Rewrite Extension - serialization - version - relation family RDFS Entailment Extension - serialization - version - relation family Parameters • Serialization • WKT • GML • Relation Family • Simple Features • RCC-8 • Egenhofer
  • 108. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 6 GeoSPARQL Core Defines top level classes that provides users with vocabulary for modeling geospatial information.  The class geo:SpatialObject is the top class and has as instances everything that can have a spatial representation.  The class geo:Feature is a subclass of geo:SpatialObject. Feature is a domain entity that can have various attributes that describe spatial and non-spatial characteristics.
  • 109. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 7 Example GeoSPARQL representation of the community of Ancient Olympia. dbpedia:Community rdfs:subClassOf geo:Feature . geonames:Olympia geonames:name "Ancient Olympia"; rdf:type dbpedia:Community .
  • 110. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 8 GeoSPARQL Geometry Extension Provides vocabulary for asserting and querying information about geometries.  The class geo:Geometry is a top class which is a superclass of all geometry classes.
  • 111. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 9 Example GeoSPARQL representation of the community of Ancient Olympia. dbpedia:Community rdfs:subClassOf geo:Feature . geonames:Olympia geonames:name "Ancient Olympia"; rdf:type dbpedia:Community . geonames:Olympia geo:hasGeometry ex:polygon1. ex:polygon1 rdf:type geo:Polygon; geo:isEmpty "false"^^xsd:boolean; geo:asWKT "POLYGON((21.5 18.5, 23.5 18.5, 23.5 21, 21.5 21, 21.5 18.5))"^^sf:wktLiteral. Spatial data type
  • 112. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 10 GeoSPARQL Geometry Extension Spatial analysis functions  Construct new geometric objects from existing geometric objects geof:boundary (geom1: ogc:geomLiteral): ogc:geomLiteral geof:envelope (geom1: ogc:geomLiteral): ogc:geomLiteral geof:intersection( geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): ogc:geomLiteral geof:union ( geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): ogc:geomLiteral geof:difference ( geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): ogc:geomLiteral geof:symDifference (geom1: ogc:geomLiteral, geom2:ogc:geomLiteral): ogc:geomLiteral geof:buffer(geom: ogc:geomLiteral, radius: xsd:double, units: xsd:anyURI): ogc:geomLiteral geof:convexHull(geom1: ogc:geomLiteral): ogc:geomLiteral  Spatial metric functions geof:distance(geom1: ogc:geomLiteral, geom2: ogc:geomLiteral, units: xsd:anyURI): xsd:double
  • 113. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 11 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
  • 114. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data gag:Olympia rdf:type gag:Community; geonames:name "Ancient Olympia". gag:OlympiaBorough rdf:type gag:Borough; rdfs:label "Borough of Ancient Olympia". gag:OlympiaMunicipality rdf:type gag:Municipality; rdfs:label "Municipality of Ancient Olympia". gag:OlympiaBorough geo:sfContains geonames:Olympia . gag:OlympiaMunicipality geo:sfContains geonames:OlympiaBorough. 12 Example Asserted topological relation
  • 115. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 13 GeoSPARQL: An example SELECT ?m WHERE { ?m rdf:type gag:Borough. ?m geo:sfContains geonames:Olympia. } Find the borough that contains the community of Ancient Olympia Topological Predicate
  • 116. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 14 GeoSPARQL: An example SELECT ?m WHERE { ?m rdf:type gag:Municipality. ?m geo:sfContains geonames:Olympia. } Find the municipality that contains the community of Ancient Olympia What is the answer to this query?
  • 117. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 15 Example (cont’d) The answer to the previous query is ?m = gag:OlympiaMunicipality GeoSPARQL does not tell you how to compute this answer which needs reasoning about the transitivity of relation geo:sfContains. Options: • Use rules • Use constraint-based techniques
  • 118. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 16 GeoSPARQL Geometry Topology Extension  Defines Boolean functions that correspond to each of the topological relations of the topology vocabulary extension:  OGC Simple Features Access geof:sfEquals(geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): xsd:boolean geof:sfDisjoint(geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): xsd:boolean geof:sfIntersects(geom1: ogc:geomLiteral,geom2: ogc:geomLiteral): xsd:boolean geof:sfTouches(geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): xsd:boolean geof:sfCrosses(geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): xsd:boolean geof:sfWithin(geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): xsd:boolean geof:sfContains(geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): xsd:boolean geof:sfOverlaps(geom1: ogc:geomLiteral, geom2: ogc:geomLiteral): xsd:boolean  Egenhofer  RCC-8
  • 119. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data  Provides a mechanism for realizing the RDFS entailments that follow from the geometry class hierarchies defined by the WKT and GML standards.  Systems should use an implementation of RDFS entailment to allow the derivation of new triples from those already in a graph. 17 GeoSPARQL RDFS Entailment Extension
  • 120. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 18 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 .
  • 121. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 19 GeoSPARQL Query Rewrite Extension  Provides a collection of RIF rules that use topological extension functions to establish the existence of topological predicates.  Example: given the RIF rule named geor:sfWithin, the serializations of the geometries of dbpedia:Athens and dbpedia: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 dbpedia:Athens geo:sfWithin dbpedia:Greece  One possible implementation is to re-write a given SPARQL query.
  • 122. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 20 RIF Rule Forall ?f1 ?f2 ?g1 ?g2 ?g1Serial ?g2Serial (?f1[geo:sfWithin->?f2] :- Or( And (?f1[geo:defaultGeometry->?g1] ?f2[geo:defaultGeometry->?g2] ?g1[ogc:asGeomLiteral->?g1Serial] ?g2[ogc:asGeomLiteral->?g2Serial] External(geo:sfWithin (?g1Serial,?g2Serial))) And (?f1[geo:defaultGeometry->?g1] ?g1[ogc:asGeomLiteral->?g1Serial] ?f2[ogc:asGeomLiteral->?g2Serial] External(geo:sfWithin (?g1Serial,?g2Serial))) And (?f2[geo:defaultGeometry->?g2] ?f1[ogc:asGeomLiteral->?g1Serial] ?g2[ogc:asGeomLiteral->?g2Serial] External(geo:sfWithin (?g1Serial,?g2Serial))) And (?f1[ogc:asGeomLiteral->?g1Serial] ?f2[ogc:asGeomLiteral->?g2Serial] External(geo:sfWithin (?g1Serial,?g2Serial))) )) Feature - Feature Feature - Geometry Geometry - Feature Geometry - Geometry
  • 123. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 21 GeoSPARQL: An example SELECT ?feature WHERE { ?feature geo:sfWithin geonames:OlympiaMunicipality. } Discover the features that are inside the municipality of Ancient Olympia
  • 124. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 22 GeoSPARQL: An example SELECT ?feature WHERE { {?feature geo:sfWithin geonames:Olympia } UNION { ?feature geo:defaultGeometry ?featureGeom . ?featureGeom geo:asWKT ?featureSerial . geonames:Olympia geo:defaultGeometry ?olGeom . ?olGeom geo:asWKT ?olSerial . FILTER (geof:sfWithin (?featureSerial, ?olSerial)) } UNION { ?feature geo:defaultGeometry ?featureGeom . ?featureGeom geo:asWKT ?featureSerial . geonames:Olympia geo:asWKT ?olSerial . FILTER (geof:sfWithin (?featureSerial, ?olSerial)) } UNION { ?feature geo:asWKT ?featureSerial . geonames:Olympia geo:defaultGeometry ?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)) }
  • 125. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 23 Conclusions  Geospatial data in the Semantic Web  The query language GeoSPARQL  Core  Topology vocabulary extension  Geometry extension  Geometry topology extension  Query rewrite extension  RDFS entailment extension  Next topic: Implemented RDF Stores with Geospatial Support
  • 126. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Bibliography 24 [Perry and Herring, 2012] Open Geospatial Consortium. OGC GeoSPARQL - A geographic query language for RDF data. OGC Candidate Implementation Standard (2012)
  • 127. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Implemented RDF Stores with Geospatial Support Presenter: Kostis Kyzirakos Reasoning Web 2012 Dept. of Informatics and Telecommunications National and Kapodistrian University of Athens Summer School
  • 128. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Outline  Relational DBMS with a geospatial extension  RDF stores with a geospatial component: • Research prototypes • Commercial systems 2
  • 129. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data  Geometries are not explicitly handled by query language (SQL)  Define datatypes that extend the SQL type system • Model geometries using Abstract Data Type (ADT) • Hide the structure of the data type to the user  The interface to an ADT is a list of operations  For spatial ADTs: Operations defined according to OGC Simple Features for SQL  Vendor-specific implementation irrelevant - extend SQL with geometric functionality independently of a specific representation/implementation How does an RDBMS handle geometries? (1/2) 3
  • 130. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Special indices needed for geometry data types How does an RDBMS handle geometries? (2/2) 4 Specialised query processing methods
  • 131. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Will examine following aspects:  Data model  Query language  Functionality exposed  Coordinate Reference System support  Indexing Mechanisms Implemented Systems 5
  • 132. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data  Strabon  Parliament  Brodt et al.  Perry Research Prototypes 6
  • 133. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data  Storage and query evaluation module for stSPARQL  Geometries represented using typed literals WKT & GML serializations supported  Spatial predicates represented as SPARQL functions OGC-SFA, Egenhofer, RCC-8 families exposed Spatial aggregate functions  Support for multiple coordinate reference systems  GeoSPARQL support Core Geometry Extension Geometry Topology Extension Strabon 7
  • 134. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Strabon - Implementation 8 stRDF graphs stSPARQL/ GeoSPARQL queries WKT GML Open Source, available from http://www.strabon.di.uoa.gr/
  • 135. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data  Storage Engine  Developed by Raytheon BBN Technologies  Implementation of GeoSPARQL • Geometries represented using typed literals WKT & GML serializations supported • Three families of topological functions exposed OGC-SFA Egenhofer RCC-8 • Multiple CRS support Parliament 9
  • 136. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data  Rule engine included  Paired with query processor  R-tree used Parliament - Implementation 10 Open Source, available from http://www.parliament.semwebcentral.org
  • 137. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data  Built on top of RDF-3X  Implemented at University of Stuttgart  No formal definitions of data model and query language given  Geometries expressed according to OGC-SFA Typed Literals WKT serialization supported Expressed in WGS84  Spatial predicates represented as SPARQL filter functions OGC-SFA functionality exposed Brodt et al. 11
  • 138. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Focus on spatial query processing and spatial indexing techniques for spatial selections e.g. "Retrieve features located inside a given polygon" Naive spatial selection operator Placed in front of the execution plan which the planner returns Spatial index (R-Tree) implemented Only utilized in spatial selections Brodt et al. - Implementation 12 Available upon request
  • 139. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data  Built on top of Oracle 10g  Implemented at Wright State University  Implementation of SPARQL-ST Upper-level ontology imposed  Geometries expressed according to GeoRSS GML  Spatial and temporal variables introduced  Spatial and temporal filters used to filter results with spatiotemporal constraints RCC-8 calculus Allen’s interval calculus Perry 13
  • 140. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data  Spatiotemporal operators implemented using Oracle's extensibility framework  Three spatial operators defined  Strictly RDF concepts implemented using Oracle’s RDF storage and inferencing capabilities  R-Tree used for indexing spatial objects Perry - Implementation 14 Available upon request
  • 141. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data  AllegroGraph  OWLIM  Virtuoso  uSeekM Commercial RDF Stores 15
  • 142. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data  Well-known RDF store, developed by Franz Inc.  Two-dimensional point geometries Cartesian / spherical coordinate systems supported  GEO operator introduced for querying Syntax similar to SPARQL’s GRAPH operator Available operations: Radius / Haversine (Buffer) Bounding Box Distance  Linear Representation of data  X and Y ordinates of a point are combined into a single datum  Distribution sweeping technique used for indexing • Strip-based index  Closed source, available from http://www.franz.com/agraph/allegrograph/ AllegroGraph 16
  • 143. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data  Semantic Repository, developed by Ontotext  Two-dimensional point geometries supported Expressed using W3C Geo Vocabulary Point Geometries WGS84  Spatial predicates represented as property functions Available operations: Point-in-polygon Buffer Distance  Implemented as a Storage and Inference Layer for Sesame  Custom spatial index used  Closed Source Free version available for evaluation purposes http://www.ontotext.com/owlim OWLIM 17
  • 144. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data  Multi-model data server, developed by OpenLink  Two-dimensional point geometries Typed literals WKT serialization supported Multiple CRS support  Spatial predicates represented as functions Subset of SQL/MM supported  R-Tree used for indexing  Spatial capabilities firstly included in Virtuoso 6.1  Closed Source Open Source Edition available from http://virtuoso.openlinksw.com/ Does not include the spatial capabilities extension Virtuoso 18
  • 145. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data  Add-on library for Sesame-enabled semantic repositories, developed by OpenSahara  Geometries expressed according to OGC-SFA WKT serialization Only WGS84 supported  Spatial predicates represented as functions OGC-SFA functionality exposed Additional functions e.g. shortestline(geometry,geometry)  Implemented as a Storage and Inference Layer (SAIL) for Sesame May be used with RDF stores that have a Sesame Repository/SAIL layer  R-tree-over-GiST index used (provided by PostGIS)  Open Source, Apache v2 License  Available from https://dev.opensahara.com/projects/useekm uSeekM 19
  • 146. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data System Language Index Geometries CRS support Comments on Functionality Strabon stSPARQL/ GeoSPARQL* R-tree-over- GiST WKT / GML support Yes • OGC-SFA • Egenhofer • RCC-8 Parliament GeoSPARQL R-Tree WKT / GML support Yes •OGC-SFA •Egenhofer •RCC-8 Brodt et al. (RDF-3X) SPARQL R-Tree WKT support No OGC-SFA Perry SPARQL-ST R-Tree GeoRSS GML Yes RCC-8 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) uSeekM SPARQL R-tree-over GiST WKT support No OGC-SFA
  • 147. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 21 Conclusions  Semantic Geospatial Systems:  Research Prototypes  Commercial Systems  Next topic: Geospatial information with description logics, OWL and rules
  • 148. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Bibliography 22 [Kyzirakos et al, 2010] K. Kyzirakos , M. Karpathiotakis, M. Koubarakis: Developing Registries for the Semantic Sensor Web using stRDF and stSPARQL (short paper). In: Proceedings of the 3rd International Workshop on Semantic Sensor Networks (SSN10) (2010) [Kyzirakos et al, 2012] K. Kyzirakos , M. Karpathiotakis, M. Koubarakis: Strabon: A Semantic Geospatial DBMS. In: Proceedings of the 11th International Semantic Web Conference (2012) [Battle and Kolas, 2011] Battle, R., Kolas, D.: Enabling the Geospatial Semantic Web with Parliament and GeoSPARQL (2011)
  • 149. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Bibliography 23 [Brodt et al, 2010] A. Brodt, D. Nicklas, and B. Mitschang. Deep integration of spatial query processing into native rdf triple stores. In ACM SIGSPATIAL, 2010. [Perry, 2007] Matthew Perry. A Framework to Support Spatial, Temporal and Thematic Analytics over Semantic Web Data. PhD thesis, Wright State University, 2008
  • 150. Geospatial Information with Description Logics, OWL, and Rules Presenter: Charalampos Nikolaou Reasoning Web 2012 Dept. of Informatics and Telecommunications National and Kapodistrian University of Athens Summer School
  • 151. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Outline §  Geospatial information with description logics and OWL §  OWL reasoners with geospatial capabilities §  Geospatial information with SWRL rules 2
  • 152. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Geospatial information with DLs and OWL Three main approaches: 1.  Use a DL as it is 2.  Define a spatial DL (concrete domain approach) 3.  Hybrid: OWL + Spatial ABox 3
  • 153. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Use a DL as it is 4
  • 154. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Use a DL as it is 5 Use OWL-DL §  Regions are represented by concepts §  Points are represented by individuals §  RCC-8 relations among regions expressed by DL axioms Translation of PO(X, Y) as X Y Z1 Z3 Z2 TBox ABox
  • 155. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Use a DL as it is 7 Use OWL-DL Discussion §  Impractical when implemented in a reasoner [Stocker-Sirin, OWLED’09] §  Unnatural modeling? §  Can we generalize the approach? §  For example, can we define the concept of a dream house as one that is located inside a forest? §  How do we express disjunctions of RCC-8 relations (indefinite information)?
  • 156. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Define a spatial DL (concrete domain approach) 11
  • 157. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Concrete domains §  Reason about specific domains (real numbers, time intervals, spatial regions) §  Formalization of a concrete domain using a first-order theory §  From roles to features: associate an individual to a value from a concrete domain §  Notation: 12
  • 158. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Concrete domains Examples: §  Reals with order ( ) Domain: the set of real numbers Predicates: < interpreted by the “less-than” relation §  Allen’s Interval Calculus Domain: the set of time intervals Predicates: Allen’s basic interval relations (before, starts, etc.) and Boolean combinations of them §  RCC-8 Calculus Domain: the set of non-empty, regular closed subsets of Predicates: basic RCC-8 relations (EQ, PO, etc.) and Boolean combinations of them 13
  • 159. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data TBox Concept equivalences/inclusions can include features and concrete domain predicates ABox Assertions can associate an individual to values from a concrete domain 14 Concrete domains
  • 160. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Two state of the art approaches §  : with RCC-8 calculus as the concrete domain §  extension of model-theoretic semantics of §  ω-admissibility property §  tableau-based technique 15 Concrete domains
  • 161. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Two state of the art approaches §  : with RCC-8 calculus as the concrete domain §  extension of model-theoretic semantics of §  ω-admissibility property §  tableau-based technique §  : DL-Lite with RCC-8 calculus as the concrete domain §  extension of model-theoretic semantics of DL-Lite §  FOL-rewritability for unions of conjunctive queries 16 Concrete domains
  • 162. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data An Example §  DreamHouse One that is located inside a pine forest and borders a lake 17
  • 163. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data An Example §  DreamHouse One that is located inside a pine forest and borders a lake 18
  • 164. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data An Example §  DreamHouse One that is located inside a pine forest and borders a lake 19
  • 165. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data An Example §  DreamHouse One that is located inside a pine forest and borders a lake 20
  • 166. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data An Example §  DreamHouse One that is located inside a pine forest and borders a lake 21
  • 167. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data An Example (classification) §  ABox 22
  • 168. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data An Example (classification) §  ABox §  Question: Is individual h a DreamHouse? 23
  • 169. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data An Example (classification) §  ABox §  Question: Is individual h a DreamHouse? §  Answer: Yes. 24
  • 170. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data An Example (classification) §  ABox §  Question: Is individual h a DreamHouse? §  Answer: Yes. §  Why? 25 ☐ ☐
  • 171. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data An Example (classification) §  ABox 26 ☐ ☐
  • 172. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data An Example (classification) §  ABox 27 ☐ ☐
  • 173. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data An Example (classification) §  ABox 28 ☐ ☐
  • 174. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data An Example (classification) §  ABox 29 ☐ ☐
  • 175. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Hybrid: OWL + Spatial ABox 30
  • 176. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Hybrid: OWL + Spatial ABox 31 General architecture KB TBox ABox DL DL Reasoning
  • 177. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Hybrid: OWL + Spatial ABox 32 General architecture KB TBox ABox DL DL Reasoning
  • 178. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Hybrid: OWL + Spatial ABox 33 General architecture KB TBox ABox DL DL Reasoning Spatial ABox Spatial Reasoning
  • 179. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Hybrid: OWL + Spatial ABox 34 1. Grutter et al. 2. Reasoner RacerPro (DL/OWL + Spatial ABox) 3. Reasoner PelletSpatial (DL/OWL + Spatial ABox)
  • 180. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Hybrid: OWL + Spatial ABox 35 Domain Knowledge (TBox) §  Introduction of roles (e.g., partiallyOverlaps) for RCC relations (e.g., PO) §  spatiallyRelated: top role for topological relations §  Role inclusion axioms for RCC relations Assertions (ABox) §  Assertion of the “connectsWith” relation, connectsWith(a, b), between two regions (individuals) [Grütter et al., ISWC‘08]
  • 181. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Hybrid: OWL + Spatial ABox 36 RCCBox §  Definition of RCC relations based on the “connectsWith” relation §  Axioms for composition tables of RCC Predicate C(x, y) corresponds to role connectsWith(x, y) in ABox [Grütter et al., ISWC‘08]
  • 182. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Hybrid: OWL + Spatial ABox 38 Application 1.  Input: a set of geometries (polygons in ) 2.  Compute assertions of the form connectsWith(a, b) 3.  Update ABox with new spatial relations according to definitions in RCCBox 1.  Should DC(a, b) be inferred in RCCBox, then 2.  the role assertion disconnectedWith(a, b) is inserted in ABox 4.  Check spatial consistency of ABox using path consistency on the RCC network constructed from the spatial role assertions of the ABox [Grütter et al., ISWC‘08]
  • 183. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data The reasoner RacerPro 39 §  Description Logic: §  Spatial Extension: the ABox is associated to a spatial representation layer (RCC substrate) §  RCC substrate: offers representation and querying facilities for RCC networks Features §  Representation of indefinite information: disjunctions of RCC relations can be used between two individuals §  Consistency checking of RCC networks §  Querying of asserted and entailed RCC relations using the query language nRQL [Möller et al.][Wessel-Möller, JAPLL’09] Available from http://www.racer-systems.com/products/racerpro/
  • 184. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 40 §  Spatial regions: a, b, and c §  Region a contains b (rcc-related a b ((:ntppi :tppi))) §  Region a is disjoint with c (rcc-related a c (:dc)) bX a c bX a RacerPro: ABox Reasoning
  • 185. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 41 §  Spatial regions: a, b, and c §  Region a contains b (rcc-related a b ((:ntppi :tppi))) §  Region a is disjoint with c (rcc-related a c (:dc)) (?) Which regions are disjoint? bX a c bX a RacerPro: ABox Reasoning
  • 186. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 42 §  Spatial regions: a, b, and c §  Region a contains b (rcc-related a b ((:ntppi :tppi))) §  Region a is disjoint with c (rcc-related a c (:dc)) ?(retrieve (?x ?y) (and (?x ?y :dc))) bX a c bX a RacerPro: ABox Reasoning
  • 187. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data RacerPro: ABox Reasoning 43 §  Spatial regions: a, b, and c §  Region a contains b (rcc-related a b ((:ntppi :tppi))) §  Region a is disjoint with c (rcc-related a c (:dc)) ?(retrieve (?x ?y) (and (?x ?y :dc))) (a, c) and (c, b) bX a c bX a
  • 188. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Dream House (definition) §  DreamHouse One that is located inside a pine forest and borders a lake 44
  • 189. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data §  DreamHouse One that is located inside a pine forest and borders a lake 45 (implies DreamHouse (and (all hasForest PineForest) (all hasLake Lake))) Dream House (definition)
  • 190. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data §  DreamHouse One that is located inside a pine forest and borders a lake 46 (implies DreamHouse (and (all hasForest PineForest) (all hasLake Lake))) ? Dream House (definition)
  • 191. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data §  ABox 47 Dream House (ABox reasoning)
  • 192. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data §  ABox §  Question: What are the houses that are threatened? 48 Dream House (ABox reasoning)
  • 193. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data §  ABox §  Question: What are the houses that are threatened? §  Answer: House h. 49 Dream House (ABox reasoning)
  • 194. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data §  ABox §  Question: What are the houses that are threatened? §  Answer: House h. §  Why? 50 Dream House (ABox reasoning)
  • 195. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 51 Dream House (ABox reasoning)
  • 196. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 52 NTPP Dream House (ABox reasoning)
  • 197. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 53 NTPP EC Dream House (ABox reasoning)
  • 198. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 54 NTPP NTPP EC Dream House (ABox reasoning)
  • 199. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 55 NTPP EC Composition of edge (vh, vn) and (vn, vf) NTPP Dream House (ABox reasoning)
  • 200. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 56 NTPP EC Composition of edge (vh, vn) and (vn, vf) NTPP Dream House (ABox reasoning)
  • 201. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 57 NTPP PO, TPP, NTPP EC NTPP Dream House (ABox reasoning)
  • 202. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 58 NTPP PO, TPP, NTPP EC NTPP Dream House (ABox reasoning)
  • 203. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data The reasoner PelletSpatial 59 §  Description Logic: OWL 2 ( ) §  Spatial Extension: Separate ABox for spatial data §  Spatial ABox: Topological relations are managed as a basic RCC-8 network (a single relation between two nodes) Features §  Representation of definite information only §  Consistency checking of basic RCC-8 networks (path consistency) §  Querying of asserted and entailed basic RCC-8 relations using a subset of SPARQL (BGPs and operator AND) [Stocker-Sirin, OWLED‘09] Available from http://clarkparsia.com/pellet/spatial
  • 204. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data SWRL Rules 60
  • 205. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Geospatial information with SWRL rules 61 Extension of OWL for the representation of qualitative and quantitative spatial information (SOWL) §  RCC-8 §  Directional relations (e.g., East, North-West), and §  Distance relations (e.g., “3Km away from Vienna”) [Batsakis et al., RuleML’11]
  • 206. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Modeling Geospatial information with SWRL rules 62 Footprint Polyline MBRLinePoint X Y Xmin Ymin Xmax Ymax Reg2 DistanceReg1- Reg2 Reg1 3 Location WestOf class instance datatype subclass property Legend [Batsakis et al., RuleML’11]
  • 207. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Geospatial information with SWRL rules 63 Spatial assertions §  RCC-8 relations between two regions §  Directional relations between two regions §  Distance relations between two regions §  Geometry of regions (in subclasses of Footprint) [Batsakis et al., RuleML’11]
  • 208. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Geospatial information with SWRL rules 64 Implementation of the previous framework using OWL 1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity for spatial relations [Batsakis et al., RuleML’11]
  • 209. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Geospatial information with SWRL rules 65 Implementation of the previous framework using OWL 1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity for spatial relations 2. SWRL rules to §  encode composition of spatial relations §  compute the intersection of two sets of spatial relations §  check spatial consistency (using Pellet) [Batsakis et al., RuleML’11]
  • 210. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Geospatial information with SWRL rules 66 Implementation of the previous framework using OWL 1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity for spatial relations 2. SWRL rules to §  encode composition of spatial relations §  compute the intersection of two sets of spatial relations §  check spatial consistency (using Pellet) [Batsakis et al., RuleML’11]
  • 211. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Geospatial information with SWRL rules 67 Implementation of the previous framework using OWL 1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity for spatial relations 2. SWRL rules to §  encode composition of spatial relations §  compute the intersection of two sets of spatial relations §  check spatial consistency (using Pellet) denotes disjunction of relations DC and EC [Batsakis et al., RuleML’11]
  • 212. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Geospatial information with SWRL rules 68 Implementation of the previous framework using OWL 1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity for spatial relations 2. SWRL rules to §  encode composition of spatial relations §  compute the intersection of two sets of spatial relations §  check spatial consistency (using Pellet) denotes disjunction of relations DC and EC [Batsakis et al., RuleML’11]
  • 213. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Geospatial information with SWRL rules 69 Implementation of the previous framework using OWL 1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity for spatial relations 2. SWRL rules to §  encode composition of spatial relations §  compute the intersection of two sets of spatial relations §  check spatial consistency (using Pellet) denotes disjunction of relations DC and EC [Batsakis et al., RuleML’11]
  • 214. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Geospatial information with SWRL rules 70 Implementation of the previous framework using OWL 1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity for spatial relations 2. SWRL rules to §  encode composition of spatial relations §  compute the intersection of two sets of spatial relations §  check spatial consistency (using Pellet) Current relation between regions x and y denotes disjunction of relations DC and EC [Batsakis et al., RuleML’11]
  • 215. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Geospatial information with SWRL rules 71 Implementation of the previous framework using OWL 1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity for spatial relations 2. SWRL rules to §  encode composition of spatial relations §  compute the intersection of two sets of spatial relations §  check spatial consistency (using Pellet) Composition of Rj with Rk Current relation between regions x and y denotes disjunction of relations DC and EC [Batsakis et al., RuleML’11]
  • 216. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Geospatial information with SWRL rules 72 Implementation of the previous framework using OWL 1. OWL 2 property axioms for expressing inverse, symmetry, and transitivity for spatial relations 2. SWRL rules to §  encode composition of spatial relations §  compute the intersection of two sets of spatial relations §  check spatial consistency (using Pellet) Composition of Rj with Rk Current relation between regions x and y New relation between x and y denotes disjunction of relations DC and EC [Batsakis et al., RuleML’11]
  • 217. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Geospatial information with SWRL rules 73 §  Implementation of SOWL is available at http://www.intelligence.tuc.gr/prototypes.php [Batsakis et al., RuleML’11]
  • 218. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Conclusions 75 §  We talked about §  Geospatial information with description logics and OWL §  OWL reasoners with geospatial capabilities §  Geospatial information with SWRL rules §  Next topic: conclusions, questions, discussion
  • 219. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Bibliography 76 [Katz et al., OWLED’05] Yarden Katz, Bernardo Cuenca Grau: Representing Qualitative Spatial Information in OWL-DL. OWLED 2005 [Lutz-Milicic, JAR‘07] Carsten Lutz, Maja Milicic: A Tableau Algorithm for Description Logics with Concrete Domains and General TBoxes. J. Autom. Reasoning (JAR) 38(1-3):227-259 (2007) [Özçep-Möller, DL‘12] Özgür L. Özçep, Ralf Möller: Combining DL-Lite with Spatial Calculi for Feasible Geo-thematic Query Answering. Description Logics 2012 [Grütter et al., ISWC‘08] Rolf Grütter, Thomas Scharrenbach, Bettina Bauer-Messmer: Improving an RCC-Derived Geospatial Approximation by OWL Axioms. International Semantic Web Conference 2008:293-306
  • 220. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data Bibliography 77 [Wessel-Möller, JAPLL’09] Michael Wessel, Ralf Möller: Flexible software architectures for ontology-based information systems. J. Applied Logic (JAPLL) 7(1): 75-99 (2009) [Stocker-Sirin, OWLED‘09] Markus Stocker, Evren Sirin: PelletSpatial: A Hybrid RCC-8 and RDF/ OWL Reasoning and Query Engine. OWLED 2009 [Batsakis-Petrakis, RuleML’11] Sotiris Batsakis, Euripides G. M. Petrakis: SOWL: A Framework for Handling Spatio-temporal Information in OWL 2.0. RuleML Europe 2011:242-249
  • 221. Conclusions Presenter: Manolis Koubarakis Reasoning Web 2012 Dept. of Informatics and Telecommunications National and Kapodistrian University of Athens Summer School
  • 222. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 2 What we talked about  Introduction  Background in geospatial data modeling  Geospatial data in the Semantic Web (extensions to RDF, stSPARQL and GeoSPARQL, spatial DLs, rules)  Implemented systems (RDF stores, spatial DL reasoners, rule-based)
  • 223. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 3 What we did not talk about: Tools • Tools for translating GIS data (e.g., shape files or tables from a geospatial DBMS) into the geospatial extensions of RDF that we presented.
  • 224. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 4 What we did not talk about: Representational issues • What are appropriate vocabularies and ontologies for representing geospatial information? (GeoSPARQL only) • Is the GeoSPARQL vocabularies/ontologies always appropriate? • Is using the WKT/GML encoding of a spatial object always a good idea?
  • 225. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 5 What we did not talk about: Theory • Semantics: How do we extend the semantics of SPARQL, to give semantics to stSPARQL and GeoSPARQL? • Computational complexity of query processing: What is the complexity of stSPARQL or GeoSPARQL querying? • Same questions for DLs, OWL and rules.
  • 226. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 6 Some open research questions • More efficient geospatial RDF stores (can you beat Strabon?) • Federations of geospatial RDF stores • More expressive/efficient spatial DL reasoners • Theory (extensions of SPARQL, extensions of DLs, extensions of SWRL) • OWL 2 and geospatial (e.g., new data types) • More efficient SWRL+spatial implementations
  • 227. Reasoning Web 2012 – Summer School Data Models and Query Languages for Linked Geospatial Data 7 Thank you for Attending! • Questions? • Feedback?