Qualitative Spatial Reasoning in RCC8 with OWL and SWRL
Stella Marc-Zwecker
1
, Franc¸ois de Bertrand de Beuvron
2
, Cecilia Zanni-Merk
2
and Florence Le Ber
3
1
ICube laboratory, BFO team, Strasbourg University, CNRS, Strasbourg, France
2
ICube laboratory, BFO team, INSA de Strasbourg, CNRS, Strasbourg, France
3
ICube laboratory, BFO team, Strasbourg University/ENGEES, CNRS, Strasbourg, France
Keywords:
Qualitative Spatial Reasoning, RCC8, CM8, OWL, SWRL.
Abstract:
The Region Connection Calculus (RCC), and particularly its RCC8 subset, have been extensively studied
and used for qualitative spatial reasoning. Some sets of computational operations have also been defined for
topological relations, as the CM8 set, that allows to compute the RCC8 relationships on raster images. In this
paper, we propose a reified representation of the RCC8 spatial relationships and of the CM8 primitives, within
a lattice of concepts, implemented in OWL (Ontology Web Language) in order to help the interpretation of
urban satellite images. Our approach allows for a straightforward representation of concepts corresponding
to conjuctions or disjunctions of RCC8 spatial relationships, and thus offers the advantage to overcome some
drawbacks of the existing approaches in OWL, where spatial relations are represented as roles. Indeed, the
OWL language does not allow the expression of the disjunction or of the conjunction of roles. We can then
implement a reasoning on the RCC8 relationships, which in particular allows to compute the composition table
and its transitive closure. As the reification of roles precludes the use of role’s properties, such as symmetry and
transitivity, we propose to implement RCC8 inferences through SWRL rules (Semantic Web Rule Language).
1 INTRODUCTION
The increasing availability of High Spatial Resolution
satellite images is an opportunity to characterize and
identify urban objects. Image analysis methods using
object-based approaches relying on the use of domain
knowledge are necessary to classify data. A major
issue in these approaches is domain knowledge for-
malization and exploitation. The use of formal on-
tologies seems a judicious choice to deal with these
issues. OWL (Grau et al., 2008) is a major language
to implement such ontologies.
We have developed an ontology concerning urban
objects (streets, houses, worker or residential hous-
ing, etc.) to assist the experts in their interpretation
of satellite images and to be included, in the future,
in a processing chain whose goal would be the auto-
matic interpretation of the semantics of satellite im-
ages (Cravero et al., 2012).
In our ontology, the urban objects are defined by
intension, that means they are derived from the con-
ceptualization of a dictionary defined by expert geog-
raphers. However, to take into account the actual data
from the image, it is necessary, also, to conceptualize
spatial relations among the objects. The RCC8 model
(Randell et al., 1992) defines eight basic topological
relations between the regions from the image. Our
proposition is to reify and implement these relations
in OWL, and to use the SWRL rules for reasoning on
spatial relation between objects and help the interpre-
tation of complex structures on urban satellite images.
The reification of the topological relations is
needed because of several drawbacks in OWL, as
highlighted by several authors (Wessel, 2001). (Katz
and Grau, 2005) presented one of the first attempts
to represent RCC8 in OWL, proposing to extend the
OWL reasoners with the functionality to operate with
reflexive roles. (Hogenboom et al., 2010) claimed that
OWL lacked essential features such as role negations,
conjunctions, disjunctions and role inclusion axioms,
to effectively represent RCC8. They proposed to use
a more specific logic to express some of those con-
structs. (Jitkajornwanich et al., 2011) formalized 2D
spatial concepts and operations into a spatial ontol-
ogy, implemented as a plug-in for Prot
´
eg
´
e
1
. Unfortu-
nately, the spatial relations retained by these authors
are not the RCC8 ones, although the querying pos-
sibilities using SWRL rules seem an interesting ap-
1
http://protege.stanford.edu
214
Marc-Zwecker S., de Bertrand de Beuvron F., Zanni-Merk C. and Le Ber F..
Qualitative Spatial Reasoning in RCC8 with OWL and SWRL.
DOI: 10.5220/0004543702140221
In Proceedings of the International Conference on Knowledge Engineering and Ontology Development (KEOD-2013), pages 214-221
ISBN: 978-989-8565-81-5
Copyright
c
2013 SCITEPRESS (Science and Technology Publications, Lda.)
proach, close to ours. (Batsakis and Petrakis, 2011)
proposed an ontology for representing and reason-
ing over spatio-temporal information in OWL. The
ontology enabled representation of static as well as
of dynamic information, such as objects whose po-
sition evolves in time and space.It was built upon
well established standards of the semantic web (OWL
2.0, SWRL), as the one we propose here. However,
our approach focuses mainly on the definition of the
RCC8 relations and gives a complete specification of
the TBox and ABox axioms and a minimal set of
SWRL rules allowing, in this way, complete reason-
ing over any composition table.
The paper is organized as follows. After recalling
the principles of the RCC8 theory, we present a set of
eight primitives, or computational operations (CM8) ,
that are calculated by image processing routines, and
that allow to establish the link with the actual data
from the image (problem known as the semantic gap).
In part 3, we present our proposition that is to reify the
RCC8 relationships and the CM8 primitives in a lat-
tice of concepts implemented in OWL. We then pro-
pose to use the SWRL rules (Horrocks et al., 2004)
in order to reason about these concepts, and in partic-
ular, in order to deduce the composition table of the
RCC8 relationships and its transitive closure. Part 4
is a conclusion.
2 THE RCC8 MODEL FOR
QUALITATIVE SPATIAL
REASONING
2.1 The RCC8 Set of Topological
Relations
The set of eight topological relations defined in the
RCC8 theory provides a conceptual basis for quali-
tative spatial reasoning (Randell et al., 1992). These
relations are binary and they apply to a couple of re-
gions x and y in a n-dimensional space. The elemen-
tary RCC8 relations are exhaustive and mutually ex-
clusive, which means that any configuration of two
spatial regions can be described by this set, and that if
one of these relations is true, then the others are false.
The eight RCC8 relations are:
EQ(x, y) x is identical to y
T PP(x, y) x is a tangential proper part of y
T PP
1
(x, y) y is a tangential proper part of x
NT PP(x, y) x is a non-tangential proper part of
y
NT PP
1
(x, y) y is a non-tangential proper part
of x
PO(x, y) x partially overlaps y
EC(x, y) x is externally connected with y
DC(x, y) x is disconnected from y
The following mathematical operations are useful
to make inferences on topological relations:
the inverse relation of a relation r is the relation
r
1
such that x, y, r(x, y) r
1
(y, x)
the relations r1 and r2 are disjoint if
x, y, r1(x, y) ¬r2(x, y)
the complement of a relation r is the relation rc
such that: r and rc are disjoint and x, y, r(x, y)
rc(x, y) is true.
given three spatial regions x, y, z, and a pair of re-
lations r1 and r2, the composition of r1(x, y) and
r2(y, z) is the disjunction r(x, z) of all the possible
relations holding between x and z.
The composition relation is particularly interest-
ing because it allows the inferences of the possible
relations between regions x and z from the known re-
lations holding between the regions x and y on the one
hand, and between the regions y and z on the other
hand.
The rules of composition on the topological RCC8
relations are represented in composition tables (Ran-
dell et al., 1992).
2.2 The CM8 Set of Computational
Operations
In many situations, methods are needed to check topo-
logical relations on images or spatial databases. Com-
putational operations have been defined in (Egen-
hofer, 1989; Clementini et al., 1993). They are based
on the interiors and boundaries of spatial regions and
are linked to formal models of topological relations.
In (Egenhofer, 1989), a method is defined to deal
with vector data, that are mainly used in geographi-
cal information systems. A n dimensional x region is
characterized by its x
interior set (same dimension)
and its x boundary set (n 1 dimension). Intersect-
ing these sets for two regions allows to define four
operations: x y, x
y
, x y
et x
y. A topo-
logical relation between two regions is then charac-
terized in a unique way by the result values of the
four operations. More recently, (Deng et al., 2007)
proposed another set of operations based on the re-
gions themselves, their interior and their boundary
sets. The so-called ID-model uses set intersections,
x
y
, x y, and set differences x y, y x.
QualitativeSpatialReasoninginRCC8withOWLandSWRL
215
These approaches are very interesting since they
allow to express the RCC8 relations in terms of nec-
essary and sufficient conditions on the regions. How-
ever a characterization of the regions in terms of inte-
rior and boundary is needed and this is a problem on
raster images. When the raster representation is con-
sidered on its own, the boundary of a region can be
defined by the pixels that are externally connected to
the region but this definition does not meet the notion
of connection that underlies RCC8 relationships: in-
deed, two disconnected regions may share a boundary
point and thus could be considered as connected.
In (Le Ber and Napoli, 2003) the boundary is de-
fined by abstract pixels, standing across four real pix-
els, as shown in Figure 1. The boundary intersec-
tion of two regions is then easily obtained, but re-
lies on two images, the original image –containing
the regions– and the boundaries image. Based on this
representation four computational operations were in-
troduced: the intersection of the interior sets, x
y
;
the intersection of the boundary sets, x y; the two
differences of the interior sets, x
y
and y
x
.
(a) (b) (c)
Figure 1: Defining the boundary of a region: (a) the interior
of a region is made of real pixels (hatched); (b) the bound-
ary of the region is made of abstract pixels standing across
the real pixels (inverse hatched); (c) the combination of the
interior and the boundary (Le Ber and Napoli, 2003).
From these four operations were derived the eight
following conditions, called CM8 primitives (Le Ber
and Napoli, 2003):
x
y
=
/
0, x is a part of y, denoted by P(x, y)
x
y
6=
/
0, x is not a part of y, denoted by
NP(x, y)
y
x
=
/
0, x contains y, denoted by P
1
(x, y)
y
x
6=
/
0, x does not contain y, denoted by
NP
1
(x, y)
x
y
=
/
0, x is discrete y, denoted by DR(x, y)
x
y
6=
/
0, x overlaps y, denoted by O(x, y)
x y =
/
0, x does not share a boundary with y,
denoted by NA(x, y)
x y 6=
/
0, x shares a boundary with y, denoted
by A(x, y)
The CM8 primitives are expressed in terms of the
RCC8 relationships, and vice versa, as shown in Ta-
ble 1. Indeed, this table can be interpreted in the fol-
lowing way :
Table 1: Correspondence between the RCC8 relationships
and the CM8 primitives.
P NP P
1
NP
1
DR O NA A
EQ 1 0 1 0 0 1 0 1
NT PP 1 0 0 1 0 1 1 0
T PP 1 0 0 1 0 1 0 1
NT PP
1
0 1 1 0 0 1 1 0
T PP
1
0 1 1 0 0 1 0 1
PO 0 1 0 1 0 1 0 1
EC 0 1 0 1 1 0 0 1
DC 0 1 0 1 1 0 1 0
according to the lines: any RCC8 relation is ex-
pressed as a conjunction of CM8 primitives. For
instance, EQ P P
1
O A , means that two
regions x and y are equal, if and only if, x is a part
of y, AND y is a part of x, AND x and y overlap,
AND the intersection between the boundaries of x
and y is non empty.
according to the columns : any CM8 primitive is
expressed as a disjunction of RCC8 relations. For
instance, P EQ NT PP T PP, means that x
is a part of y, if and only if, x is equal to y, OR
x is a tangential proper part of y, OR x is a non-
tangential proper part of y.
3 IMPLEMENTATION OF A
QUALITATIVE SPATIAL
REASONING USING OWL AND
SWRL
As shown in section 1, the existing approaches for
reasoning on spatial qualitative relations outline the
lack of expressiveness of OWL for the negation, con-
junction or disjunction of roles. However, these fea-
tures are essential to implement the composition rules
of the RCC8 relations. In this section, we first present
the principle of reification and we show how it is used
to implement a lattice of RCC8 and CM8 concepts.
We then introduce a set of SWRL rules, allowing to
compute the relation composition.
3.1 Reification of Spatial Relations
Reification is widely used in conceptual modelling.
Reifying a relation means viewing it as an entity, that
describes the relation’s characteristics.
Although RCC8 relationships are simple binary
relations, there are other spatial relations that require
additional attributes. A simple example, used in our
KEOD2013-InternationalConferenceonKnowledgeEngineeringandOntologyDevelopment
216
satellite image analysis application, is the distance be-
tween objects (either minimal distance or distance be-
tween barycentres) that requires a numeric value. A
coherent processing of all the spatial relations will re-
quire to reify them all.
Moreover, reasoning on RCC8 relationships
causes the creation of new relations, which are built
from the eight basic RCC8 relations, by applying con-
junction or disjunction. However, conjunction or dis-
junction of roles are beyond the expressive power
of OWL. This is why many specific extensions have
been proposed, as shown in section 1.
In our approach, spatial relations are represented
by concepts of the ontology. Let us note SR, the
top concept of the hierarchy of spatial relations. It
is straightforward to combine the concepts of this hi-
erarchy by using the complete set of logic operators
(and, or, not), which are already available in the ALC
description logics. Each instance of the SR concept
represents a relation between two geographical ob-
jects. As RCC8 relations are generally not symmet-
ric, we associate two distinct functional roles to the
SR concept: a spatial relation takes place f rom a first
geographical object to a second geographical object.
SR v ¬GeoOb ject
(objects and spatial relations are disjoint)
SR v (= 1 f rom.GeoOb ject) u (= 1to.GeoOb ject)
(any spatial relation associates exactly two objects)
We now define the general RCC8 concept, in-
cluded in SR, which subsumes all the concepts result-
ing from the combination of the RCC8 basic relations.
The eight elementary RCC8 relations form a com-
plete and disjoint partition of the RCC8 concept.
The CM8 primitives are defined as disjunctions of
the RCC8 basic relations. For example, the primitives
denoted by P (inclusion) and O (overlapping) are ex-
pressed in the following way :
P EQ t NT PP t T PP
O EQ t NT PP t T PP t NT PP
1
t T PP
1
t PO
The reification of spatial relations among objects
provokes no particular problems, although the nota-
tion is slightly more complex. For example, we want
to state that a workers housing estate consists of a set
of adjoining houses within an urban area.
uArea v GeoOb ject, House v GeoOb ject
Without reification (Pr and ECr are roles corre-
sponding to the P and EC spatial relations):
wHousing GeoOb ject u Pr.uAreau
Pr
1
.(¬House t ECr.House)
After reification (P and EC are RCC8 sub-
concepts corresponding to the P and EC spatial re-
lations):
wHousing GeoOb jectu
f rom
1
.(P u to.uArea)u
to
1
.(¬P t f rom.(¬Houset
to
1
.(EC u f rom.House)
The reified expressions are cumbersome, but the
translation from the non-reified form to the reified
form can be easily automated.
At ABox level, additional individuals must be cre-
ated to represent the reified spatial relation between
every couple of objects (see Algorithm 2).
Figure 2 gives the ABox corresponding to an ur-
ban area containing one workers housing wh1, con-
taining two adjacent houses h1 and h2. sr
i
individuals
represent the reified spatial relations. Undefined spa-
tial relations (of RCC8 type) are omitted for brevity.
Our representation allows a precise description of
spatial relationships between individuals. For exam-
ple:
o
1
: (= 2 f rom
1
.¬DC), exactly two objects are
connected with o
1
. The precise nature of the con-
nection (EQ, NT T P, P . . . ) is unknown (for exem-
ple, the image analysis system has not been able
to determine it)
o
2
: (<= 3 f rom
1
.O)u f rom
1
.P, at most three
objects overlap with o
2
, at least one of them con-
tains o
2
.
We have presented so far the good properties of
our model, deliberately leaving aside its disadvan-
tages, some of which are significant. First, there is
no way to express the correspondence between a spa-
tial relation and its inverse: in the previous example,
we stated that house h1 was adjacent (EC) to house
h2, But we cannot deduce the fact, however obvious,
that h2 is adjacent to h1. If spatial relations were rep-
resented by roles, this problem could be solved by
declaring the role as symmetric in OWL.
There is also no way to handle transitivity: in our
example, the house h1 is included (P) in the workers’
housing wh1; wh1 itself is included in the urban area
ua1. No valid inference will deduce the obvious fact
that h1 is included in ua1 (transitivity of inclusion).
These disadvantages can be overridden by the use of
SWRL rules.
3.2 Using SWRL Rules to Simulate Role
Properties
Two types of rules must be defined to reflect respec-
tively inverse relations and the composition table. The
QualitativeSpatialReasoninginRCC8withOWLandSWRL
217
h1 : House,h2 : House, wh1 : wHousing, ua1 : uArea
sr
1
: EC, f rom(sr
1
, h1), to(sr
1
, h2)
sr
2
: P, f rom(sr
2
, h1), to(sr
2
, wh1)
sr
3
: P, f rom(sr
3
, h2), to(sr
3
, wh1)
sr4 : P, f rom(sr4, wh1), to(sr4, ua1)
Figure 2: An ABox for an urban area containing only two
houses within a worker’s housing.
inverse relations were not a problem before reifica-
tion, since OWL allows the definition of inverse, sym-
metric and transitive roles. Unfortunately, after reifi-
cation, it is no longer possible to express the cor-
respondences between a relation and its inverse in
OWL. We therefore propose to use rules. As we
have seen in section 2, it is straightforward to express
RCC8 inverse relations in First Order Logic:
o
1
o
2
EQ(o
1
, o
2
) EQ(o
2
, o
1
)
(symmetric relation)
o
1
o
2
T PP(o
1
, o
2
) T PP
1
(o
2
, o
1
) :
(explicit inverse relation)
After reification, spatial relations become objects
of the logical universe, and the above rules must be
expanded as:
r
1
r
2
o
1
o
2
EQ(r
1
) f rom(r
1
, o
1
) to(r
1
, o
2
)
f rom(r
2
, o
2
) to(r
2
, o
1
) EQ(r
2
)
r
1
r
2
o
1
o
2
T PP(r
1
) f rom(r
1
, o
1
) to(r
1
, o
2
)
f rom(r
2
, o
2
) to(r
2
, o
1
) T PP
1
(r
2
)
The same principle is used to represent the RCC8
composition of relations. For example, the result of
composing PO with T PP is either
2
T PP, NT PP or
PO. After reification, this should be represented by:
r
1
r
2
r
3
o
1
o
2
o
3
PO(r
1
) f rom(r
1
, o
1
) to(r
1
, o
2
)
T PP(r
2
) f rom(r
2
, o
2
) to(r
2
, o
3
)
f rom(r
3
, o
1
) to(r
3
, o
3
)
T PP(r
3
) NT PP(r
3
) PO(r
3
)
SWRL is based on Horn clauses. However, the
head of a Horn clause can not be a disjunction. So,
2
PO(x, y) T PP(y, z) T PP(x, z) NT PP(x, z)
PO(x, z)
in order to represent disjunctions, a new concept is
created each time a specific disjunction appears in the
conclusion of a composition rule. For the rule exam-
ple above :
T PP
NT PP
PO T PP t NT PP t PO
The SWRL rule simply becomes (in human read-
able SWRL syntax):
PO(?r
1
) f rom(?r
1
, ?o
1
) to(?r
1
, ?o
2
)
T PP(?r
2
) f rom(?r
2
, ?o
2
) to(?r
2
, ?o
3
)
f rom(?r
3
, ?o
1
) to(?r
3
, ?o
3
)
T PP
NT PP
PO(?r
3
)
More formally, we need to determine the set of
rules to ensure complete reasoning over the composi-
tion table. We will denote by ER the set of elemen-
tary spatial relations and by R = 2
ER
the power set
of ER , where each set in R denotes a disjunction of
elementary spatial relations. We will note er
i
ER
the elementary spatial relations, and sr
i
R the dis-
junctive spatial relations. An elementary composition
table EC T is a function ECT : ER × ER R . A
generalized composition table CT : R × R R can
be derived from ECT by :
CT (sr
1
, sr
2
) =
G
er
1
sr
1
G
er
2
sr
2
EC T (er
1
, er
2
)
A subset S R is closed under a composition table
CT if sr1, sr2 S : C T (sr1, sr2) S. From any
subset S R , it is straightforward to compute its clo-
sure C
CT
(S) by repeatedly applying C T rules.
The generalized composition table C T has to be
translated into a set of SWRL rules, where each rule
is a triple [sr
1
, sr
2
, sr
3
= C T (sr
1
, sr
2
)]. Since each sr
i
is a disjunction of elementary RCC8 relations, some
rules in C T may be logicaly redundant. More pre-
cisely, a rule r1 = [sr
1
1
, sr
1
2
, sr
1
3
] is more general than a
rule r2 = [sr
2
1
, sr
2
2
, sr
2
3
], noted r2 r1, if and only if :
r2 r1
sr
2
1
sr
1
1
sr
2
2
sr
1
2
sr
1
3
sr
2
3
We will denote by G
(CT ) the set of greatest ele-
ments of CT for the partial order .
Depending on the application, one may want to
consider only a subset UR R of spatial relations.
In our approach, UR corresponds to the set of RCC8
relationships augmented by the set of CM8 primitives.
Therefore, given a qualitative reasoning system
defined by a set of elementary relations ER and an
elementary composition table ECT , the set of rules
for a user defined subset UR 2
ER
is given by:
G
CT
C
CT
(UR )
KEOD2013-InternationalConferenceonKnowledgeEngineeringandOntologyDevelopment
218
where f
A
denotes the restriction of f to the domain
A. The corresponding algorithm is given in Algo-
rithm 1.
In our application, a set of 94 SWRL rules is gen-
erated for the creation of the composition table and its
transitive closure. It is interesting to note that the con-
sideration of the CM8 primitives slightly decreases
the number of SWRL rules generated (100 rules for a
lattice with only the RCC8 relationships). Indeed, the
introduction of the CM8 primitives allows the factori-
sation of some rules (according to the partial order
between the rules).
For example, in the initial RCC8 composition ta-
ble, there are three rules stating that, for three spa-
tial objects o
1
, o
2
, o
3
, if o
1
is disconnected (DC)
from o
2
and o
3
is either identical (EQ), a tangen-
tial (T PPi
3
) or non-tangential (NT PPi) proper part
of o
2
, then o
1
is disconnected from o
3
. As Pi
EQNT PPiT PPi, these three rules will be factored
into the single SWRL rule of Figure 3.
Figure 3: a SWRL rule for the composition of DC and Pi.
Figure 4 presents the lattice of concepts contain-
ing the eight RCC8 relations, the CM8 primitives al-
lowing to compute RCC8 relations from the image,
as well as all intermediate concepts generated by the
rules that implement the transitive closure of the com-
position table. We can note that the lattice’s hierar-
chy reflects the correspondence between the RCC8
relationships and the CM8 primitives (see Table 1) :
a RCC8 relation is a conjunction of its CM8 ances-
tors (e.g. EQ P PI O A ), and a CM8 prim-
itive is a disjunction of its RCC8 descendants (e.g.
P EQ NT PP T PP).
3.3 Reasoning
Let us continue the example introduced in section 4.1
to show how our model can be effectively used to in-
fer new information linking spatial reasoning to the
domain ontology. The definition of a workers hous-
ing estate (wHousing) as a set of adjoining houses
within an urban area is presented in Figure 5 using the
Manchester OWL Syntax of Prot
´
eg
´
e. Suppose now
that the wh1 instance has not been associated with
3
In general, for every spatial relation SR, SRi represents
its inverse.
Figure 4: The lattice of the RCC8 spatial relations, with the
CM8 primitives.
wHousing in the ontology ie :
h1 : House,h2 : House, ua1 : uArea
wh1 : GeoOb ject,
QualitativeSpatialReasoninginRCC8withOWLandSWRL
219
Figure 5: Workers housing estate definition.
Figure 6: wh1 is inferred to be a workers housing estate.
Any sound OWL reasoner will not recognize wh1
as an instance of wHousing. This negative result
would be surprising if working with an object ori-
ented database, but it is consistent with the OWL-DL
semantics which is based on the open world assump-
tion. Actually, the OWL-DL reasoner infers that h1
and h2 are adjoining houses, but with the open world
assumption, the existence of another house h3 cannot
be excluded. Indeed, if we had postulated that h3 was
within wh1 but not adjacent to h1 nor h2, then wh1
would not have been a wHousing.
Therefore in our example, the image recognition
software must state that the houses h1 and h2 are the
only objects included in wh1. For this purpose, the
wh1 instance description must be extended with this
knowledge by a cardinality constraint (see Figure 6).
The reasoner (Hermit 1.3.6) now correctly infers that
wh1 actually is a workers housing estate.
Suppose we introduce a third house in our workers
housing:
isolatedHouse : House
sr5 : P, f rom(sr5, isolatedHouse), to(sr5, wh1)
Remember that reasoning in OWL is under the
open world assumption: our isolated house is not ex-
plicitly adjacent to another house in the ABox, but
neither is it explicitly defined that it is not adjacent to
h1 or h2, or even to any other house which is not de-
fined in the ABox. Therefore, the ABox is still con-
sistent, even if we have required that all the houses
must have at least one adjacent house in the defini-
tion of the wHousing concept. Fortunately, cardinal-
ity constraints on roles allow to simulate closed world
reasoning. If we are sure that the house is isolated, we
can for example add in the ABox:
isolatedHouse : 0 f rom
1
.EC
This time the ABox is inconsistent.
Algorithm 1: RCC8 TBox creation.
Given a set of Elementary Spatial Relation
ESR = {NT PP, NT PP
1
, T PP, T PP
1
, PO, EQ, EC, DC}
Given a function creating disjunction names
dis junctName : 2
conceptName
conceptName
Given a composition table
compTable : ESR × ESR 2
ESR
Given an initial set UR 2
ESR
(UR = ESR
F
CM8)
Assert RCC8 top concept
Assert UR concepts as a disjunction of ESR concepts
Assert functional roles to and f rom and their inverses to
1
and f rom
1
for all SR {PO, EQ, EC, DC} do
assert SWRL rule: /* symmetrical relations*/
SR(?r
1
) f rom(?r
1
, ?o
1
) to(?r
1
, ?o
2
)
f rom(?r
2
, ?o
2
) to(?r
2
, ?o
1
) SR(?r
2
)
end for
for all [SR, SRi]
[T PP, T PP
1
], [NT PP, NT PP
1
]
do
assert SWRL rules: /* inverse relations */
SR(?r
1
) f rom(?r
1
, ?o
1
) to(?r
1
, ?o
2
)
f rom(?r
2
, ?o
2
) to(?r
2
, ?o
1
) SRi(?r
2
)
SRi(?r
1
) f rom(?r
1
, ?o
1
) to(?r
1
, ?o
2
)
f rom(?r
2
, ?o
2
) to(?r
2
, ?o
1
) SR(?r
2
)
end for
CSR ESR /* CSR set of all created concepts */
NewConceptCreated true
while (NewConceptCreated) do
NewConceptCreated false
for all [SR1, SR2] CSR ×CSR do
D
F
er1SR1
F
er2SR2
compTable(er1, er2)
NSR dis junctName(D)
if NSR 6∈ CSR then
Assert concept NSR
F
SRD
SR
CSR CSR
F
{NSR} ;
NewConceptCreated true
let r = {SR1, SR2, NSR}
if 6 r
0
= {SR1
0
, SR2
0
, NSR
0
} such that
SR1 SR1
0
SR2 SR2
0
NSR
0
NSR then
assert SWRL rule: /* factorization */
SR1(?r
1
) SR2(?r
2
)
f rom(?r
1
, ?o
1
) to(?r
1
, ?o
2
)
f rom(?r
2
, ?o
2
) to(?r
2
, ?o
3
)
f rom(?r
3
, ?o
1
) to(?r
3
, ?o
3
) NSR(?r
3
)
end if
end if
end for
end while
4 CONCLUSIONS
In this paper we have described the implementation of
a qualitative spatial reasoning on topological RCC8
relationships, based on OWL.
Our approach copes with the lack of expressive-
ness of OWL for implementing the negation, conjunc-
tion or disjunction of roles. This approach relies on
the reification of roles, and is completed by the use of
SWRL rules to overcome the loss, due to reification,
KEOD2013-InternationalConferenceonKnowledgeEngineeringandOntologyDevelopment
220
Algorithm 2: RCC8 ABox preprocessing.
Given the set OS of SpatialObject individuals
Given a function creating individual names for spatial re-
lations:
SR
Name
: OS × OS individualName
for all o
1
OS do
for all o
2
OS do
if o
1
= o
2
then
Assert individual: SR
Name
(o
1
, o
2
) : EQ
else
Assert individual: SR
Name
(o
1
, o
2
) : RCC8
end if
end for
end for
of some roles properties in OWL, such as symmetry
or transitivity.
A disadvantage of this approach is the additional
complexity induced by the process of reification,
which causes the creation of n
2
instances of spatial
relations for n geographic objects. Thus, a reasoner
that would be optimized for executing SWRL rules
involving many instances would be required.
However, the interest of our proposal is twofold.
On the one hand, we have demonstrated the feasibil-
ity of the implementation based on OWL and SWRL,
of a complete reasoning for calculating the composi-
tion table of the RCC8 relationships and its transitive
closure. On the other hand, our model integrates the
expression of the RCC8 relationships in terms of the
CM8 computational primitives: this opens interesting
perspectives for the extraction of the topological rela-
tions existing among image objects, in the context of
satellite images recognition. Other sets of primitives
could be included as well.
Furthermore, we plan to implement the CM8 com-
putational primitives, and to integrate them in the im-
age classification software that has been developed in
our research team (the MUSTIC platform
4
).
REFERENCES
Batsakis, S. and Petrakis, E. G. M. (2011). SOWL: A
Framework for Handling Spatio-temporal Information
in OWL 2.0. In RuleML Europe, pages 242–249.
Clementini, E., Felice, P. D., and Oosterom, P. v. (1993).
A small set of formal topological relationships suit-
able for end-user interaction. In Proceedings of the
Third International Symposium on Advances in Spa-
tial Databases, SSD 93, pages 277–295, London, UK.
Springer-Verlag.
Cravero, M., Zanni-Merk, C., de Bertrand de Beuvron, F.,
and Marc-Zwecker, S. (2012). A Description Logics
4
http://icube-bfo.unistra.fr/fr/index.php/Plateformes
Geographical Ontology for Effective Semantic Anal-
ysis of Satellite Images. In 16th International Confer-
ence on Knowledge-Based and Intelligent Information
& Engineering Systems, KES2012, volume 243, pages
1573–1582. IOS Press.
Deng, M., Cheng, T., Chen, X., and Li, Z. (2007). Multi-
level Topological Relations Between Spatial Regions
Based Upon Topological Invariants. GeoInformatica,
11:239–267.
Egenhofer, M. J. (1989). A Formal Definition of Binary
Topological Relationships. In Litwin, W. and Schek,
H., editors, Foundations of Data Organization and
Algorithms, FODO 1989, Paris, France, LNCS 367,
pages 457–472. Springer Verlag.
Grau, B. C., Horrocks, I., Motik, B., Parsia, B., Patel-
Schneider, P., and Sattler, U. (2008). OWL 2: The
next step for OWL. Web Semantics: Science, Services
and Agents on the World Wide Web, 6(4):309 322.
Semantic Web Challenge 2006/2007.
Hogenboom, F., Borgman, B., Frasincar, F., and Kaymak,
U. (2010). Spatial Knowledge Representation on the
Semantic Web. In Proceedings of the 2010 IEEE
Fourth International Conference on Semantic Com-
puting, ICSC’10, pages 252–259, Washington, DC,
USA. IEEE Computer Society.
Horrocks, I., Patel-Schneider, P. F., Boley, H., Tabet, S.,
Grosof, B., and Dean, M. (2004). SWRL: A Semantic
Web Rule Language Combining OWL and RuleML.
W3c member submission, World Wide Web Consor-
tium.
Jitkajornwanich, K., Elmasri, R., Li, C., and McEnery, J.
(2011). Formalization of 2-D spatial ontology and
OWL/Prot
´
eg
´
e realization. In Proceedings of the In-
ternational Workshop on Semantic Web Information
Management, SWIM’11, pages 9:1–9:7, New York,
NY, USA. ACM.
Katz, Y. and Grau, B. C. (2005). B.C.: Representing Qual-
itative Spatial Information in OWL-DL. In Proceed-
ings of OWL: Experiences and Directions.
Le Ber, F. and Napoli, A. (2003). Design and comparison
of lattices of topological relations for spatial represen-
tation and reasoning. Journal of Experimental & The-
oretical Artificial Intelligence, 15(3):331–371.
Randell, D. A., Cui, Z., and Cohn, A. G. (1992). A spatial
logic based on regions and connection. In Proceedings
3rd International Conference on Knowedge Represen-
tation and Reasoning.
Wessel, M. (2001). Obstacles on the Way to Qualitative
Spatial Reasoning with Description Logics: Some
Undecidability Results. In Proceedings of the In-
ternational Workshop in Description Logics 2001
(DL2001), pages 96–105.
QualitativeSpatialReasoninginRCC8withOWLandSWRL
221