18
Multi-granularity and metric spatial reasoning Shengsheng Wang a , Yiting Liu a,, Dayou Liu a , Bolou Bolou Dickson a , Xinying Wang b a College of Computer Science and Technology, Key Laboratory of Symbolic Computing and Knowledge Engineering of Ministry of Education, Jilin University, 130012 Changchun, China b College of Computer Science and Engineering, Changchun University of Technology, 130012 Changchun, China article info Keywords: Qualitative spatial reasoning Multi-granularity spatial reasoning Metric spatial reasoning Weak composition Oriented point relation algebra abstract Composition reasoning is a basic reasoning task in qualitative spatial reasoning (QSR). It is an important qualitative method for robot navigation, node localization in wireless sensor networks and other fields. The previous composition reasoning works dedicated in single granularity framework. Multi-granularity spatial relation is not rare in real world, and some qualitative spatial relation models are multi-granular- ity models, such as RCC, STAR m , CDC m and OPRA m . Although multi-granularity composition reasoning is very useful in many applications, it has not been systematically studied before. A special case of multi- granularity composition reasoning, referred to as metric spatial reasoning, is also discussed here. The general frameworks and basic theories for multi-granularity and metric spatial reasoning are put forward here. Furthermore, we redefine the spatial relation models for distance, topology and direction under the proposed multi-granularity and metric frameworks. We add metric representation for the OPRA m . The multi-granularity and metric reasoning tasks are studied for these four models for the first time. Finally we perform some experiments on OPRA m with encouraging results to verify our theories. Multi-granular- ity and metric spatial reasoning tasks are new problems in QSR and quite different from the previous works. Our works can be potentially applied in robot navigation, wireless sensor networks and other applications. Ó 2013 Elsevier Ltd. All rights reserved. 1. Introduction Qualitative spatial reasoning (QSR) (Cohn and Renz, 2008) has been one of the most active topics in Artificial Intelligence for its numerous potential application fields, such as Geographical Infor- mation System, robotics, content-based image retrieval, CAD, traf- fic engineering (Glez-Cabrera et al., 2013) etc. Typically, a binary spatial relation model is proposed to capture the relative relation- ship between two spatial objects from a certain viewpoints such as topology, direction and distance. Then spatial reasoning tasks are studied based on a spatial relation model. Composition reasoning is a basic reasoning task in QSR. Given the relation between spatial objects A and B, and the relation be- tween B and C, the composition reasoning will determine the pos- sible relations between A and C. Composition reasoning is an important qualitative method for robot navigation (Moratz et al., 2005; Moratz, 2006), node localization in wireless sensor networks (WSN) (Mengual et al., 2013) and other fields. The previous composition reasoning works are dedicated to the single granularity framework. However, dozens of spatial relations models are developed with granularity parameters. For instance, the famous topological model: Region Connection Calculus (RCC, for short) (Randell et al., 1992) has two well-known granularities: RCC 8 and RCC 5 ; most direction models are multi-granularity models, like STAR m (Renz and Mitra, 2004), Cardinal Direction Calculus (CDC m )(Moratz and Wallgrün, 2012) and Oriented Point Relation Algebra (OPRA m )(Moratz, 2004). In many applications, spatial rela- tions models with different granularities exist in one scene, which are caused by some aspects, such as the accuracy of detection which varies according to the distance between two objects, the informa- tion acquisition technologies which are diversified and information fusion which merges isomerous data together. Although, there are also some works devoted to multi-granularity spatial/temporal rela- tion models (Bettini and Sibi, 2000; Lago and Montanari, 2001; Stell, 2003; Wang and Liu, 2004), the main purpose of these works is to convert relations between different granularities. Most of the previ- ous qualitative spatial reasoning works only used single granularity spatial relations models. Although composition reasoning for multi- granularity spatial relation model (referred to as multi-granularity spatial reasoning later in this paper) is very useful in real world, it has not been systematically studied before. A special case of multi-granularity spatial reasoning is also pro- posed in this paper. In some spatial relation models, we can use precise values to describe the relations. Literature (Gerevini and Renz, 2002) gives a metric size relation which is defined by the amount of difference between two areas. A metric distance can be applied to explain RCC 8 (Sridhar et al., 2011). In this paper, 0957-4174/$ - see front matter Ó 2013 Elsevier Ltd. All rights reserved. http://dx.doi.org/10.1016/j.eswa.2013.10.042 Corresponding author. E-mail address: [email protected] (Y. Liu). Expert Systems with Applications 41 (2014) 3116–3133 Contents lists available at ScienceDirect Expert Systems with Applications journal homepage: www.elsevier.com/locate/eswa

Multi-granularity and metric spatial reasoning

  • Upload
    xinying

  • View
    213

  • Download
    1

Embed Size (px)

Citation preview

Expert Systems with Applications 41 (2014) 3116–3133

Contents lists available at ScienceDirect

Expert Systems with Applications

journal homepage: www.elsevier .com/locate /eswa

Multi-granularity and metric spatial reasoning

0957-4174/$ - see front matter � 2013 Elsevier Ltd. All rights reserved.http://dx.doi.org/10.1016/j.eswa.2013.10.042

⇑ Corresponding author.E-mail address: [email protected] (Y. Liu).

Shengsheng Wang a, Yiting Liu a,⇑, Dayou Liu a, Bolou Bolou Dickson a, Xinying Wang b

a College of Computer Science and Technology, Key Laboratory of Symbolic Computing and Knowledge Engineering of Ministry of Education, Jilin University, 130012 Changchun, Chinab College of Computer Science and Engineering, Changchun University of Technology, 130012 Changchun, China

a r t i c l e i n f o

Keywords:Qualitative spatial reasoningMulti-granularity spatial reasoningMetric spatial reasoningWeak compositionOriented point relation algebra

a b s t r a c t

Composition reasoning is a basic reasoning task in qualitative spatial reasoning (QSR). It is an importantqualitative method for robot navigation, node localization in wireless sensor networks and other fields.The previous composition reasoning works dedicated in single granularity framework. Multi-granularityspatial relation is not rare in real world, and some qualitative spatial relation models are multi-granular-ity models, such as RCC, STARm, CDCm and OPRAm. Although multi-granularity composition reasoning isvery useful in many applications, it has not been systematically studied before. A special case of multi-granularity composition reasoning, referred to as metric spatial reasoning, is also discussed here. Thegeneral frameworks and basic theories for multi-granularity and metric spatial reasoning are put forwardhere. Furthermore, we redefine the spatial relation models for distance, topology and direction under theproposed multi-granularity and metric frameworks. We add metric representation for the OPRAm. Themulti-granularity and metric reasoning tasks are studied for these four models for the first time. Finallywe perform some experiments on OPRAm with encouraging results to verify our theories. Multi-granular-ity and metric spatial reasoning tasks are new problems in QSR and quite different from the previousworks. Our works can be potentially applied in robot navigation, wireless sensor networks and otherapplications.

� 2013 Elsevier Ltd. All rights reserved.

1. Introduction

Qualitative spatial reasoning (QSR) (Cohn and Renz, 2008) hasbeen one of the most active topics in Artificial Intelligence for itsnumerous potential application fields, such as Geographical Infor-mation System, robotics, content-based image retrieval, CAD, traf-fic engineering (Glez-Cabrera et al., 2013) etc. Typically, a binaryspatial relation model is proposed to capture the relative relation-ship between two spatial objects from a certain viewpoints such astopology, direction and distance. Then spatial reasoning tasks arestudied based on a spatial relation model.

Composition reasoning is a basic reasoning task in QSR. Giventhe relation between spatial objects A and B, and the relation be-tween B and C, the composition reasoning will determine the pos-sible relations between A and C. Composition reasoning is animportant qualitative method for robot navigation (Moratz et al.,2005; Moratz, 2006), node localization in wireless sensor networks(WSN) (Mengual et al., 2013) and other fields.

The previous composition reasoning works are dedicated to thesingle granularity framework. However, dozens of spatial relationsmodels are developed with granularity parameters. For instance,the famous topological model: Region Connection Calculus (RCC,

for short) (Randell et al., 1992) has two well-known granularities:RCC8 and RCC5; most direction models are multi-granularity models,like STARm (Renz and Mitra, 2004), Cardinal Direction Calculus(CDCm) (Moratz and Wallgrün, 2012) and Oriented Point RelationAlgebra (OPRAm) (Moratz, 2004). In many applications, spatial rela-tions models with different granularities exist in one scene, whichare caused by some aspects, such as the accuracy of detection whichvaries according to the distance between two objects, the informa-tion acquisition technologies which are diversified and informationfusion which merges isomerous data together. Although, there arealso some works devoted to multi-granularity spatial/temporal rela-tion models (Bettini and Sibi, 2000; Lago and Montanari, 2001; Stell,2003; Wang and Liu, 2004), the main purpose of these works is toconvert relations between different granularities. Most of the previ-ous qualitative spatial reasoning works only used single granularityspatial relations models. Although composition reasoning for multi-granularity spatial relation model (referred to as multi-granularityspatial reasoning later in this paper) is very useful in real world, ithas not been systematically studied before.

A special case of multi-granularity spatial reasoning is also pro-posed in this paper. In some spatial relation models, we can useprecise values to describe the relations. Literature (Gerevini andRenz, 2002) gives a metric size relation which is defined by theamount of difference between two areas. A metric distance canbe applied to explain RCC8 (Sridhar et al., 2011). In this paper,

A B

C

DMetricG1G21

2Gr

11Gr

?

1Mr

?

Fig. 2. Multi-granularity and metric spatial reasoning tasks for indoor robots.

S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133 3117

the relation represented by precise values is called metric spatialrelation which means that the quantitative information is avail-able. Metric spatial relation is a special granularity, which is thefinest granularity. The process of deducing spatial relations in a hy-brid framework which includes both qualitative and metric spatialrelation models can be referred to as metric spatial reasoning inthis paper.

Multi-granularity spatial reasoning and metric spatial reasoningare quite different from classical composition reasoning problems oreven other new topics discussed recently. Fig. 1(a) is an iconic repre-sentation for the classical composition problems, most of whichwere proved to be weak composition. It can be extended to a quali-tative constraint satisfaction problem (QCSP). Combining two differ-ent spatial relations on the same set of variables, known as the jointsatisfaction problem (JSP), has received extensive attentions.Fig. 1(b) shows the JSP for three variables. The constraint satisfactionproblem involving landmarks is proposed in Liu and Li (2012), Liuet al. (2011). In that reasoning task, the geometric information ofsome variables (i.e., the landmarks) and the qualitative spatial rela-tions for all the variables are given. An illustration of landmark prob-lem is shown in Fig. 1(c), where one variable can only choose fourvalues, and the other two variables are free. The multi-granularityand metric spatial reasoning problems studied here are quite differ-ent from the ones mentioned above. As shown in Fig. 1(d), r1

m and r1n

are two basic relations under the same model but with differentgranularities. We need to compute their composition which is a mul-ti-granularity spatial reasoning task. For the metric spatial reason-ing, such as Fig. 1(e), r1

m is a qualitative spatial relation, and r1� is a

metric spatial relation (formal definition will be given later), this isa metric spatial reasoning task. Thus, the multi-granularity spatialreasoning and the metric spatial reasoning are quite different fromthe other three reasoning tasks.

We use a real world scenario to explain the potential applica-tions of the above two reasoning tasks. There are some indoor ro-bots (like the Pioneer2) which can communicate to each other.Their exact locations cannot be acquired, but within a certain dis-tance they can detect the spatial relations between each other bysonar and laser sensors (Falomir et al., 2013). The spatial relationsare estimated according to the sensor readings. The reasoningproblem is to deduce the undetectable relations from the detect-able relations. Classical composition reasoning is enough for theenvironment with three robots and single granularity relationsframework (Moratz et al., 2005). However the granularity of spatialrelation may be varied. There are at least two reasons which causethe multi-granularity spatial relation in this scene. First, the hard-ware equipments for the robots may be different, and then a bettersensor results in a finer granularity of spatial relation. Second, ifthe precision ratio of sensor is depending on the distance, whenthe distance between two robots becomes farther, the accuracy

r1 r2

?

(a)

r1 r2

r3

(b)

s1 s2

s3

r1 r2

r3

(c)

1mr

?

(d) (e)

1nr

1mr

?

1*r

Fig. 1. Reasoning tasks for three spatial variables.

of sensors will decline, thus we can only get the coarser granularityspatial relation. In this paper, we assume the robots have unifiedequipments and granularity of spatial relation is depending onthe distance (see Fig. 2). We assume that a robot can detect themetric relation in the red circle, detect the G1 granularity relationbetween the green and the red circles, and it can detect G2 granu-larity (coarser than G1) between the blue and the green circles, andit cannot detect objects outside the blue circle. Then relation be-tween A and C cannot be detected directly, but it can be deducedby G2 relation between A and B, and G1 relation between B andC. This is a multi-granularity spatial reasoning task. The undetect-able relation between A and D can be deduced by G2 relation be-tween A and B, and metric relation between B and D. This is ametric spatial reasoning task. In our experiments, we will showthat if we use traditional composition reasoning to solve this prob-lem, the results will be wrong.

Based on the above motivations, we study the reasoning tasksfor multi-granularity and metric spatial relations in this paper.General theories about multi-granularity and metric spatial rela-tion models are introduced first. Furthermore, we study conversionamong granularities, weak composition operations under multi-granularity and metric spatial relations. Furthermore, to explainour theories, we redefine the spatial relation models for distance,topology and direction under the proposed multi-granularity andmetric frameworks, and all of the three models are easy to beunderstood. And then we investigate a complicated case: multi-granularity and metric reasoning for OPRAm. Algorithms for mul-ti-granularity and metric spatial reasoning on OPRAm are proposedbased on the previous OPRAm works and our frameworks. Finally,we perform some experiments on simulated data with the pro-posed algorithms on OPRAm. The results show that our methodssolve some problems which cannot be correctly calculated by pre-vious methods. The experiments also show that our theories can bepotentially applied to Ambient Intelligence or other applications.

The remaining part of this paper is organized as follows: In Sec-tion 2 we introduce the fundamental theories for multi-granularityand metric spatial reasoning, multi-granularity and metric spatialreasoning for OPRAm is studied in Section 3. Experiments are success-fully conducted on simulation data and encouraging results areshown in Section 4. Finally, Section 5 draws a conclusion of this work.

2. Fundamental theories for multi-granularity and metricspatial reasoning

In this section, we first give general definitions for multi-gran-ularity and metric spatial relations, and then introduce reasoning

3118 S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133

frameworks for multi-granularity and metric spatial reasoning. Inorder to demonstrate our proposed theories, we present three mul-ti-granularity and metric spatial relation models for topology, dis-tance and direction, which will facilitate clear understanding of ourtheory. Although some previous spatial relation models for topol-ogy, distance and direction have been proposed before, but noneof them are unified models for multi-granularity and metric spatialrelations. Our new models are similar to some previous models,but the formalizations follow the general framework for multi-granularity and metric spatial relation models that are proposedhere. In the next section, a relatively complicated model (OPRAm)will be discussed.

2.1. Spatial relation and spatial reasoning

General formalizations for multi-granularity and metric spatialrelation models are introduced in this subsection. Following thegeneral formalizations, three models (topology, distance anddirection) which support representing and reasoning with multi-granularity and metric spatial relation are proposed.

2.1.1. Spatial relation modelIn QSR, a binary spatial relation model under a single granular-

ity is commonly defined as follows.

Definition 1 (Spatial relation model). Suppose D is the set of all thespatial objects we are concerned with, and R is a binary spatialrelation model on D. The binary spatial relation of any two objectscan be described by a certain basic relation rj. Let UR be the finiteset of all the basic relations, i.e., UR = {r1, r2, . . . , rk}, where, k is thenumber of the basic relations.

R is a jointly exhaustive and pairwise disjoint (JEPD) relationmodel iff each pair of objects in DR � DR can be described by oneand only one basic relation in UR. Note that we assume all theconsidered spatial relation models in this paper are JEPD relationmodels.

In this paper, a spatial relation model name R is also thefunction name which returns the basic relation between twospatial objects i.e.,

8o1; o2 2 D and o1 – o2; 9rj 2 UR : Rðo1; o2Þ ¼ rj ð1Þ

where R(o1,o2) returns the basic R relation between objects o1 ando2.

To extend R to a multi-granularity spatial relation model, asubscript f, indicating a special granularity, is added to R.

Definition 2 (Multi-granularity spatial relation model). Suppose DR

is the universe of spatial objects. Rf (f is a variable) is a multi-gran-ularity spatial relation model iff f has more than one constant valueand for each value i (i is a constant), Ri is a spatial relation model onDR. Let URi

¼ r1i ; r

2i ; . . . ; rk

i

� �be the finite set of all the basic spatial

relations of Ri. Function Ri(o1,o2) returns the basic Ri relationbetween objects o1 and o2.

Note that if f is a variable, Rf stands for a multi-granularityspatial relation model (a group of relation models). If i is aconstant, Ri stands for a single relation model and i indicates itsgranularity. For example, RCCf is a multi-granularity spatial rela-tion model and RCC5, RCC8 are spatial relation models which belongto RCCf, 5 and 8 indicate the granularities. The expression RCC5(-o1,o2) = {DC} means that the basic RCC relation of two objects o1, o2

under granularity 5 is {DC}. In the rest of this paper, the subscriptof a relation model name is always a constant unless we declarethat it is a variant. So Rn is a spatial relation model and Rm (m is avariable) is a multi-granularity spatial relation model which is agroup of spatial relation models.

Here we propose a new kind of spatial relation which can beregarded as a special granularity (the metric or the finest granu-larity, indicated by ‘‘*’’).

Definition 3 (Metric spatial relation). R⁄ is a metric spatial relationmodel iff R�ðo1; o2Þ ¼ x; x 2 UR� , where x is a real number or a realnumber vector and UR� is infinite set.

For example, DRCC⁄ is a metric spatial relation, and DRCC⁄(-a,b) = (5,3,2) is the metric spatial relation between objects a and b,DRCC⁄ will be defined later in this paper.

As a matter of clarity, it is convenient to define reverse relationas: R�f ðo1; o2Þ ¼ Rf ðo2; o1Þ, for any basic relation of Rf, there exists areverse relation in URf

.

Composition reasoning is the basic relation task in QSR. It is thefoundation for advanced reasoning tasks such as QCSP. Composi-tion reasoning studies the constraint of spatial relations on threeobjects. As a major result of QSR, most composition operations areweak composition (Renz and Ligozat, 2005). Similar to the defini-tion of weak composition on qualitative spatial reasoning, thedefinition of weak composition is given under single granularity.The weak composition on multi-granularity will be discussed inSection 2.3.

Definition 4 (Weak composition on single granularity).

rif �½Rf �r

jf ¼ rk

f j9o1 ; o2 ; o3 2 DR ;Rf ðo1 ; o2Þ ¼ rif and Rf ðo2 ; o3Þ ¼ rj

f and Rf ðo1 ; o3Þ ¼ rkf

n oð2Þ

Based on the above frameworks, we will introduce three newmodels later.

2.1.2. DRCCi

The model RCC (Randell et al., 1992) is a well-known classicaltopological model, and it is a multi-granularity model. RCC allowsboth complex and simple spatial objects but its metric representa-tion (Sridhar et al., 2011) is only suitable for simple objects. Todemonstrate our theories on a unified topological relation model,we present a multi-granularity and metric topological model ofdisk in 2D space and we call it DRCCi(i is a variable) since it is a re-stricted RCC model.

Let DDRCC be the set of all nonempty regular disks in the 2Dplane, and then we can define the metric and multi-granularityrelations of DRCCi as follows:

Definition 5 (Metric topological relation DRCC⁄). Given two disks a,b 2 DDRCC, the metric topological relation DRCC⁄(a,b) can be repre-sented by a tuple (r1,r2,d). Where r1, r2 are the radii of disks a and b,respectively, and d is the distance between the centers of a and b.Thus, UDRCC� ¼ fðr1; r2; dÞjr1; r2 2 Rþ; d 2 Rþ [ f0gg.

Table 1 shows the relationship between DRCC8 and DRCC⁄.

Definition 6 (Multi-granularity topological relation DRCC8, DRCC5

and DRCC2). The relation DRCC8 is the set of eight topological rela-tions {DC, EC, PO, EQ, TPP, TPPi, NTPP, NTPPi} which are defined inTable 1. Thus UDRCC8 ¼ fDC;EC;PO;EQ ;TPP;TPPi;NTPP;NTPPig. Anillustration is shown in Fig. 3. DRCC5 is the set of the five relations{DR, PO, EQ, PP, PPi} where DR = DC [ EC, PP = TPP [ NTPP,PPi = TPPi [ NTPPi. UDRCC5 ¼ fDR;PO;EQ ;PP;PPig. And DRCC2 isthe set of the two relations {D, O}, where D = DR = DC [ EC,O = PO [ EQ [ PP [ PPi = PO [ EQ [ TPP [ TPPi [ NTPP [ NTPPi.UDRCC2 ¼ fD; Og.

Table 1Topological interpretation of basic DRCC8 relations in DDRCC, where r1, r2 are the radii for disk a and b, respectively, and d is the distancebetween two centers of the disks.

DRCC8 Metric Relation DRCC8 Metric Relation

DC r1 > 0, r2 > 0 and d > r1 + r2 TPP r1 > 0, r2 > 0, r1 < r2 and 0 < d = r2 � r1

EC r1 > 0, r2 > 0 and d = r1 + r2 NTPP r1 > 0, r2 > 0, r1 < r2 and 0 6 d = r2 � r1

PO r1 > 0, r2 > 0 and 0 < d < r1 + r2 TPPi r1 > 0, r2 > 0, r1 > r2 and 0 < d = r1 � r2

EQ r1 = r2 > 0 and d = 0 NTPPi r1 > 0, r2 > 0, r1 > r2 and 0 6 d = r1 � r2

a

b

a

b

a=b

a

b

a

b

a

b

b

a

b

a

DC EC PO EQ TPP NTPP TPPi NTPPi

PP PPi

DRCC8

DRCC5

DRCC2

DR PO EQ

D O

Fig. 3. Illustration of basic relations in DRCC2/DRCC5/DRCC8.

S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133 3119

The composition reasoning for DRCCi is similar to RCC, inaddition, DRCC8 has the same composition table as RCC8 (Randellet al., 1992). Composition tables for DRCC2 and DRCC5 can bededuced from the composition table of DRCC8.

2.1.3. DISd

A multi-granularity qualitative distance relation model waspresented in Clementini et al. (1997). The metric spatial reasoningfor distance relation was not reported before. Here, we give a dis-tance model with multi-granularity and metric representation, andthen the reasoning tasks on it are studied based on our proposedframework. Our distance model and reasoning algorithms are more

i�½DISd �j ¼

½1; k�; i ¼ k&&j ¼ k

½maxðminðji� jþ 1j; ji� jjÞ;1Þ; k�; i ¼ k

½maxðminðji� j� 1j; ji� jjÞ;1Þ; k� j ¼ k

½maxðminðminðji� jj; ji� jþ 1jÞ; ji� j� 1jÞ;1Þ;minðiþ j; kÞ�; otherwise

8>>><>>>:

ð5Þ

concise when compared with Clementini et al. (1997), and this isthe first time that metric reasoning for distance relation is studiedin in-depth.

Definition 7 (Metric distance relation DIS⁄). Let DDIS be the set of allpoints in 2D space. Given two points a, b 2 DDIS, dis(a,b) is theEuclidean distance between a and b. Then the metric distancerelation between a and b is DIS⁄(a, b) = dis(a,b), andUDIS� ¼ f0g [ Rþ.

Definition 8 (Multi-granularity distance relation DISd). UDIS� is par-titioned into k ¼ DISmax

d

� �sectors by a parameter d ðd 2 RþÞ and a

constant DISmax. The parameterd stands for the granularity. LetUDISd

¼ f1;2; . . . ; kg, and each basic distance relation is defined as:

If (i � 1)d 6 dis(a,b) < id and i 2 {1,2, . . . ,k � 1} thenDIRd(a,b) = i;

Otherwise (dis(a,b) P (k � 1)d), DISd(a,b) = k.We further present the composition operation for single granu-

larity DISd. Suppose i; j 2 UDISd, then i�½DISd �j can be calculated

according to the triangle inequality jdis(a,b) � dis(b,c)j 6dis(a,c) 6 dis(a,b) + dis(b,c):

maxða; bÞ ¼a; a P b

b; otherwise

�ð3Þ

minða; bÞ ¼a; a 6 b

b; otherwise

�ð4Þ

where, k ¼ DISmaxd

� �.

2.1.4. DIRm

Some direction relation models for points with multi-granular-ity have been proposed. For instance, STAR calculus allows us todefine basic relations on an arbitrary fixed level of granularity,STARm in Renz and Mitra (2004), the odd regions may not be uni-form. Another direction relation is in Moratz and Wallgrün(2012), where CDCm is introduced with the ‘0’ direction alwayspointing up or north, and the granularity parameter m is restrictedto even numbers. But metric relation is not involved in any of theabove works.

In this paper, we give a new multi-granularity direction model(DIRm) for points which is similar to STARm and CDCm. However, the

3120 S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133

formalization of DIRm follows the above general framework and itis slightly different from the previous direction models. Metricdirection relation (DIR⁄) is also included in DIRm.

Let DDIR be all points in 2D space, for two arbitrary pointsa,b 2 DDIR, we have the following definitions:

Definition 9 (Metric direction relation DIR⁄).

(1) If a – b, the relation DIR⁄(a, b) = a where a is the anglebetween the positive y-axis and the half-line ab startingform a through b anticlockwise, see Fig. 4 (a);

(2) If a = b, the relation DIR⁄(a, b) = ⁄.Thus, UDIR� ¼ ½0;2pÞ [ f�g. Then the reverse of the relationrDIR� 2 UDIR� is:

ReverseDIR� ðrDIR� Þ ¼�; if rDIR� ¼ �pþ rDIR� ; if rDIR� < prDIR� � p; otherwise

8><>: ð6Þ

We now proceed to defining multi-granularity directionrelation models, which are defined by segmenting UDIR� withdifferent granularities.

Definition 10 (Multi-granularity direction relation DIRm). UDIR� ispartitioned into 4m + 1 sectors by granularity m, and each basicdirection relation is defined as follows. Suppose DIR�ða; bÞ ¼ rDIR� ,then the multi-granularity direction relation DIRmða; bÞ¼ DIRmðrDIR� Þ is defined as (see Fig. 4(b)):

DIRmðrDIR� Þ ¼�; if rDIR� ¼ �j; if 9j; rDIR� ¼ 2p

4m j and j is eveni; otherwise we have 2p

4m ði� 1Þ < rDIR� <2p4m ðiþ 1Þ and i is odd

8><>: ð7Þ

Thus UDIRm ¼ f0;1; . . . ;4m� 1g [ f�g. The reverse of the relationrDIRm 2 UDIRm is:

ReverseDIRm ðrDIRm Þ ¼�; if rDIRm ¼ �2mþ rDIRm ; if rDIRm < 2m

rDIRm � 2m; otherwise

8><>: ð8Þ

Algorithm CC-DIRm is proposed to compute the weak compositionð�½DIRm �Þ for DIRm.

Algorithm 1. Computing the composition for DIRm (CC-DIRm)Input: m, granularity parameter, i; j 2 UDIRm

Output: K, the set of the qualitative direction relations ofi�½DIRm �j

If i = ⁄ then K={j};If j = ⁄ then K={i};If j = i then K={i};If j ¼ ReverseDIRm ðiÞ then

If i is even, then K={i, j,⁄};Else, then K ¼ UDIRm ;

If i < =2m, thenIf j < i, then

If i is odd & & j is even, then K=(j, i];If i is odd & & j is odd, then K=[j, i];If i is even & & j is even, then K=(j, i);Else K=[j, i);

ElseIf i is odd & & j is even, then K=[i, j);If i is odd & & j is odd, then K=[i, j];

If i is even & & j is even, then K=(i, j);Else K=(i, j];

ElseIf j < (i + 2m) mod 4m, then

If i is odd & & j is even, then K=[i,4m) [ [0, j);If i is odd & & j is odd, then K=[i, j];If i is even & & j is even, then K=(i, j);Else K=(i, j];

Else if j < i, thenIf i is odd & & j is even, then K=(j, i];If i is odd & & j is odd, then K=[j, i];If i is even & & j is even, then K=(j, i);Else K=[j, i);

ElseIf i is odd & & j is even, then K=[i, j);If i is odd & & j is odd, then K=[i, j];If i is even & & j is even, then K=(i, j);Else K=(i, j];

Theorem 1. Algorithm 1 returns i�½DIRm �j.

Proof. We prove that Algorithm 1 is complete by a casedistinction.

(1) In the cases i = ⁄, j = ⁄ and j = i, it is apparently right.(2) In the case j ¼ ReverseDIRm ðiÞ, if i is even, c can be only in

regions i, j of a and c = a, thus, K={i, j,⁄}. If i is odd, c can bein any position of region j which also contains a, thusK ¼ UDIRm . Fig. 5(a) is an illustration for this case, c can bein any position in region 5 of b, i.e., c can be in any regionof a, and c and acan be at the same position.

(3) In other cases, we should distinguish whether i and j are oddor even, if i or j is even, according to Definition 10, c willnot be in the region i or j of a. Then we have the followingcases:

(I) Case i < =2m and j < i.(II) Case i < =2 m and j > i.

(III) Case i > 2 m and j < ReverseDIRm ðiÞ.(IV) Case i > 2 m and j < i.(V) Other cases.

Here, we only treat the case (I), since the other cases are similar.If i is odd and j is even, then c will not be in the j region of a, it is

because the line in which j region of b is parallel to that of a. And ccan be any position of j region of b and b is in i region of a. Thus,i�½DIRm �j ¼ ðj; i�. If i is odd and j is odd, then c can be in any position ofj region of b. This means c can be in the regions j to i of a. Then,i�½DIRm �j ¼ ½j; i�. If i is even and j is even, then c will not be in theregions i and j of a. Thus c can be in the regions (j + 1) to (i-1) of a,i.e., i�½DIRm �j ¼ ðj; iÞ. Other cases, c will not be in the region i of a, butonly in the regions j to (i-1), i.e., i�½DIRm �j ¼ ½j; iÞ. For example, see,Fig. 5(b), if m = 4, 5�½DIR4 �3 ¼ f3;4;5g, because both i = 5 and j = 3are odd.

In Fig. 5(c)–(f) are the illustrations of cases (II), (III), (IV) and (V),respectively.

From the above discussions, The Algorithm 1 is right. h

To get the whole composition table for DIRm, Algorithm 1should be performed (4m + 1)2 times.

The output of the input (m, i, j) of the Algorithm 1 is same as thatof the input (m, j, i). Thus, we have:

y-axis

a

a

0

4

62

17

53

b

(a) The relation in DIR* is DIR*(a,b)= α (b) the relation in DIR2 is DIR2(a,b)= 7

Fig. 4. The configurations of DIR⁄ and DIR2.

a

012

345

6 78

15

13

01 15

11b5

ca

012

3 5

8

15

13

01

11b5

c

6

a

012

3 57

8

15

13

01

11b5 c

611

(a)4 4[ ]13 5DIR DIRU= (b)

4[ ]5 3 {3,4,5}DIR = (c)4[ ]5 11 { | 5 11}DIR k k= ≤ ≤

a

012

345

6 78

13

01 15

11b

3c

a

012

345

6 78

13

01 15

11b

9c

a

012

345

6 78

13

01 15

11b

9

c

(d)4[ ]13 3 [13,16) [0,3]DIR = ∪ (e)

4[ ]13 9 { | 9 13}DIR k k= ≤ ≤ (f)4[ ]13 15 {13,14,15}DIR =

Fig. 5. Illustrations of the compositions for DIR4.

S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133 3121

Lemma 1. i�½DIRm �j ¼ j�½DIRm �i, where i; j 2 UDIRm .

fR1fr

2fr

3fr

4fr

5fr

gR1gr

2gr

3gr

4gr

5gr

6gr

hR1hr

2hr

3hr

4hr

5hr

6hr

7hr

8hr

9hr

10hr

Fig. 6. An example of the product of granularities (Rf Rg = Rh).

Then by Lemma 1, we can reduce the number of times in com-puting the compositions to (4m + 1)(2m + 1).

2.2. Granularity conversion

This subsection discusses the method of conversion betweenspatial relations with different granularities.Definition 11Granular-ity conversionGiven a multi-granularity spatial relation model Rm

(m is a variable), suppose Rf, Rg are two spatial relation in Rm,and they are not metric spatial relations. If ri

f is a basic relationof Rf relations ri

f 2 URf

� �, then the Rg relations corresponding to

rif are defined by a tuple.

rif ’ ½J1; J2� ð9Þ

where J1 ¼ rjg jrj

g 2 URg and 8o1; o2 2 DR;Rgðo1; o2Þn

¼ rjg ! Rf ðo1; o2Þ

¼ rif �g is the lower bound, and J2 ¼ rj

g jrjg

n2 URg and 9o1; o2½

2 DR;Rgðo1; o2Þ ¼ rjg and Rf ðo1; o2Þ ¼ ri

f �g is the upper bound.

If J1 = J2 then rif ¼ J1.

To convert a metric relation to a qualitative relation, the abovedefinition also works well. In most cases, a metric relation valuecorresponds to a single basic qualitative relation. R⁄ is a metricspatial relation and Rf is a spatial relation model. If

8x 2 UR� ;9rif 2 URf

; x ’ /; rif

h i, then write Rf ðxÞ ¼ ri

f as the function

which converts a metric relation to a qualitative relation.

Definition 12 (Product of granularities). If 8rif 2 URf

; 9H # URh;

rif ¼ H then Rf � Rh, i.e., Rh is finer than Rf.

If Rf � Rh, Rg � Rh and jURhj is minimum then Rh is the product of

Rf and Rg, and write Rf Rg = Rh.

For example, as shown in Fig. 6, URf¼ r1

f ; . . . ; r5f

n o;

URg ¼ r1g ; . . . ; r6

g

n o;URh

¼ r1h; . . . ; r10

h

� �, then Rf � Rh, Rg � Rh and

Rf Rg = Rh.

By the definition of DRCCi, it can be proven that DRCC2

� DRCC5 � DRCC8 directly. Then we have the following theorems:

Theorem 2. DRCCf DRCCg = DRCCmax{f,g}, where f, g 2 {2, 5, 8}. Bythe definition of DRCCi, it is straightforward.

Theorem 3. Suppose DISs and DISt are two relation models in multi-granularity relations model DISd (d is a variable) and s; t 2 Nþ. ThenDISs DISt = DISgcd(s, t), where gcd (s, t) returns the greatest commondivisor of s, t.

3122 S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133

Proof. Let h = gcd (s, t). We will prove that DISs � DISh. For8rs 2 UDISs , if rs = ks where ks ¼ DISmax

s

� �, then rs = kh where

kh ¼ DISmaxh

� �; else let H ¼ frhj sðrs�1Þ

h < rh 6srsh g, then we have rs = H

by Definition 11. So DISs � DISh. By the same way, we have DISt -� DISh, thus DISs DISt = DISgcd (s, t). h

Theorem 4. Suppose DIRs, DIRt are two relation models in multi-granularity relations model, DIRm(m is a variable), and s; t 2 Nþ. ThenDIRs DIRt = DIRlcm(s, t), where lcm(s,t) returns the least common mul-tiple of s, t.

Proof. Let h = lcm(s, t). We will just prove that DIRs � DIRh, DIRt -� DIRh is similar. 8rs 2 UDIRm , if rs = ⁄, then rs = rh = ⁄. If rs is even,then rs = rh; else let H ¼ frhj hs ðrs � 1Þ < rh <

hs ðrs þ 1Þg, then rs = H.

By Definition 11, DIRs � DIRh. And DIRt � DIRh, thus, by Definition12, DIRs DIRt = DIRlcm(s, t). h

L ¼

max jid1�jd2jd1

l m;1

� �; k1

h i; if i ¼ k1&&j ¼ k2

max minðjid1�ðj�1Þd2j;jid1�jd2jd1

l m;1

� �; k1

h i; if i ¼ k1

max minðjði�1Þd1�jd2j;jid1�jd2jd1

l m;1

� �;min id1þjd2

d1

l m; k1

� �h i; if j ¼ k2

max minðminðjði�1Þd1�ðj�1Þd2j;jði�1Þd1�jd2jÞ;minðjid1�jd2j;jid1�ðj�1Þd2jÞÞd1

l m;1

� �;min id1þjd2

d1

l m; k1

� �h i; otherwise

8>>>>>>>><>>>>>>>>:

ð10Þ

2.3. Composition reasoning under multi-granularity

The weak composition under multi-granularity is defined asfollows.

Definition 13 (Multi-granularity weak composition).

rif �½Rf ;Rg;Rh �r

jg ¼ rk

hj9o1 ;o2 ;o3 2D; Rf ðo1 ;o2Þ¼ rif and Rgðo2;o3Þ¼ rj

g and Rhðo1 ;o3Þ¼ rkh

n o;

where, Rf, Rg, Rh 2 Rm(m is a variable).Although the above definition covers all the combinations of

granularity, it is a common sense that we are not looking forwardto producing any new granularity with the weak composition. Sothere are only two common types of multi-granularity weakcomposition, �½Rf ;Rg;Rf � and �½Rf ;Rg;Rg �. But we only consider �½Rf ;Rg ;Rf �,since the other is similar.

To convert rif to Rg relations or convert rj

g to Rf relations, wecannot guarantee that exact equal relations can be gotten. In ageneral case, the result is an upper and lower bounds, it isimportant to note that if the upper and lower bounds are not equal,then �½Rf ;Rg ;Rf � cannot be solved with �½Rf � or �½Rg �.

Lemma 2. If rif ¼ I; I # URfg

; rjg ¼ J, J # URfg

and I�½Rfg �J ¼ K, thenri

f �½Rf ;Rg ;Rfg �rjg ¼ K.

Proof.

Rif � Rj

g ¼ RIfg � RJ

fg ¼ RKfg : �

Theorem 5. Given rif ¼ I; I # URfg

; rjg ¼ J, J # URfg

; I�½RfRg �J ¼ K, then

rif �½Rf ;Rg ;Rf �r

jg ¼ L, where, L ¼ fl 2 URf

j9k 2 K; k # lg.

Proof.

8l 2 L; 9k 2 K; k l

9o1; o2; o3 Rf ðo1; o2Þ ¼ rif and Rgðo2; o3Þ ¼ rj

g and Rf Rgðo1; o3Þ ¼ k

Rf ðo1; o3Þ ¼ l: �

According to the above theorem, if Rf Rg granularity existsthen �½Rf ;Rg ;Rf � can be solved with �½RfRg �. According to Theorem 5,�½Rf ;Rg ;Rf � for DIRm and DRCCi can be solved with the compositionoperation under the single granularity.

However, if Rf Rg granularity does not exist, we should give anindependent algorithm for �½Rf ;Rg ;Rf �. Take DISdðd 2 RþÞ as anexample, DISd1 DISd2 granularity does not exist if d1, d2 are irra-tional numbers. The weak composition under the multi-granularityfor DISd can be solved by the following methods.

Given i 2 UDISd1and j 2 UDISd2

. Let DISid1�½DISd1 ;DISd2 ;DISd1 �DISj

d2 ¼ DISLd1

where, L UDISd1, and by the triangle inequality constraint we have

the following:

where, k1 ¼ DISmaxd1

� �, k2 ¼ DISmax

d2

� �.

2.4. Composition reasoning with metric spatial relation

If metric relation is involved in weak composition, the abovequalitative reasoning strategy may no longer work well, in such acase new algorithm is required for the metric relation reasoning.In this paper, two typical reasoning tasks for metric relation arediscussed.

Definition 14 (Type 1 Metric Reasoning). Type 1 Metric Reasoningof R⁄,Rf is defined as:

x�½R� ;Rf ;Rf �rif ¼ J; where x 2 UR� ; r

if 2 URf

; J # URfð11Þ

Another class of metric reasoning �½R� ;Rf ;Rf � can be deduced to Type 1Metric Reasoning by the following lemma.

Lemma 3. rif �½Rf ;R� ;Rf �x ¼ x��½R� ;Rf ;Rf � ri

f

� ��� ��where r� is the reverse

relation of r.

Definition 15 (Type 2 Metric Reasoning). Type 2 Metric Reasoningof R⁄,Rf is defined as:

x�½R� ;R� ;Rf �y ¼ J; where x; y 2 UR� ; J # URf: ð12Þ

If 8x 2 UR� ;8rif 2 URf

; x�½R� ;Rf ;Rf �rif ¼ Rf ðxÞ�½Rf �r

if then the Type 1

Metric Reasoning of R⁄, Rf is qualitatively solvable, which meansthat �½R� ;Rf ;Rf � can be solved with �½Rf �. Otherwise, the Type 1 MetricReasoning of R⁄,Rf is not qualitatively solvable, then an indepen-dent algorithm for �½R� ;Rf ;Rf � is necessary.

S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133 3123

If 8x 2 UR� ;8y 2 UR� ; x�½R� ;R� ;Rf �y ¼ Rf ðxÞ�½Rf �Rf ðyÞ then the Type 2Metric Reasoning of R⁄,Rf is qualitatively solvable, otherwise theType 2 Metric Reasoning of R⁄,Rf is not qualitatively solvable andwe need a new algorithm for �½R� ;R� ;Rf �.

It is important to know that if the Type 1 Metric Reasoning ofR⁄,Rf is not qualitatively solvable then the Type 2 Metric Reasoningof R⁄,Rf is also not qualitatively solvable. In the same vein, if theType 2 Metric Reasoning of R⁄,Rf is qualitatively solvable then theType 1 Metric Reasoning of R⁄, Rf is equally qualitatively solvable.

Theorem 6. Type 1 Metric Reasoning of DRCC⁄, DRCCi(i 2 {2,5,8}) isqualitatively solvable.

Proof. We need to prove that a mixed relation tuple [(r1, r2,d), dr2, dr3] can be satisfied (by three disks on 2D plane) if and onlyif [dr1, dr2, dr3] can be satisfied, where dr1 = DRCC⁄((r1, r2, d)).

If [(r1, r2, d),dr2, dr3] can be satisfied, apparently [dr1, dr2, dr3]can be also satisfied.

If [dr1, dr2, dr3] can be satisfied then we can find three diskswhich satisfy [(r1, r2, d), dr2, dr3] by the following method. We willonly consider DRCC8 here, as the discussions for DRCC5 and DRCC2

are similar.We can find three disks which satisfy [dr1, dr2, dr3], their centers

are a, b and c, respectively. DRCC8(Diska, Diskb) = dr1, DRCC8(Diskb,Diskc) = dr2 and DRCC8(Diska, Diskc) = dr3. Actually, there are manydisks with centers a, b and c that satisfy [dr1, dr2, dr3], all we need isthat the order of the interactions on the line of two centers is right.The interaction is the boundary of the disk and the line crossing thetwo centers. For instance, see Fig. 7, the DRCC8 relations of Diska

and Diskb depend on the order of two blocks and two triangles onthe line ab.

Now we replace dr1 with (r1, r2, d), then the distance of eachinteraction on the line ab is fixed. Also, the distance between twoblocks on the line ac is fixed, so is the distance between twotriangles on the line bc. See the yellow lines in Fig. 7, the position ofc and radius of Diskc are all free. It is easy to satisfy the order ofinteractions on the line bc and the line ac. So we can build Diskc,and satisfy [(r1, r2, d),dr2, dr3], then we prove the theorem. h

As shown in Example 1, Type 2 Metric Reasoning of DRCC⁄,DRCCi (i 2 {2,5,8}) is not qualitatively solvable.

Example 1. Suppose DRCC⁄(a,b) = (r1,r2,d1), DRCC⁄(b,c) =(r2,r3,d2) and d2 > 2(d1 + r1 + r2 + r3). By the definition of DRCC8,we have DRCC8(a,b) = DRCC8(b,c) = {DC}. According to the compo-sition table of DRCC8, fDCg�½DRCC8 �fDCg ¼ UDRCC8 , but we can onlyget DRCC8(a,c) = {DC} by the distance constraint.

ab

c

Fig. 7. Three disks satisfied both [(r1,r2,d),dr2,dr3] and [dr1,dr2,dr3].

The Type 2 Metric Reasoning of DRCC⁄, DRCCi(i 2 {2,5,8}) can besolved by the following methods. Given DRCC⁄(a,b) = (r1,r2,d1) andDRCC⁄(b,c) = (r2,r3,d2), then DRCC⁄(a,c) = (r1,r3,d3), and d1,d2,d3

satisfy the triangle inequality. Let ðr1; r2; d1Þ�½DRCC� ;DRCC� ;DRCCi �ðr2; r3; d2Þ ¼ L, we can get L by discussing all the possible valuesthat satisfy the above constraints.

Example 2 shows that Type 1 Metric Reasoning of DIS⁄, DISd isnot qualitatively solvable.

Example 2. Given three points a, b, c 2 DDIS, suppose DISd(b,c) = 2and DIS�ða; bÞ ¼ 100kdðk ¼ DISmax

d

� �Þ, then from the weak composi-

tion of DISd, we have DISd(100kd) = k, k�½DISd �2 ¼ ½maxðk� 2;1Þ; k�.But in this case, we can only get DISd(a,c) = k.

The Type 1 Metric Reasoning of DIS⁄,DISd can be solved by thefollowing methods.

Let dis�½DIS� ;DISd;DISd �j ¼ L where dist 2 UDIS� ; j 2 UDISdand L # UDISd

.According to the triangle inequality, we have:

L ¼max min jdist�jdj

d

l m; k

� �;1

� �; k

h i; if j ¼ k

max min minðjdist�jdj;jdist�ðj�1ÞdjÞd

l m; k

� �;1

� �; k

h i; otherwise

8><>:

ð13Þ

where, k ¼ DISmaxd

� �.

It is not hard to find examples to prove that the Type 2 MetricReasoning of DIS⁄,DISd is not qualitatively solvable.

Let dis1�½DIS�;DIS� ;DISd �dis2 ¼ L where dist1; dist2 2 UDIS� andL # UDISd

, and then:

L ¼ max minjdist1� dist2j

d

�; k

� ;1

� ;min

dist1þ dist2d

�; k

� � �ð14Þ

where k ¼ DISmaxd

� �.

Theorem 7. Type 1 Metric Reasoning of DIR⁄, DIRm is qualitativelysolvable.

Proof. Three points a, b, c 2 DDIR, DIR⁄ (a,b) = a and DIRm(b,c) = j aregiven. DIRm(a) = i.

That is to prove that 8a 2 UDIR� ;8j 2 UDIRf;a�½DIR� ;DIRm ;DIRm �

j ¼ i�½DIRm �j ¼ K. We prove it by the following case distinctions.

(1) In the cases a = ⁄, j = ⁄, DIRm(a) = j, it is apparent that K issame as that in Algorithm 1.

(2) In the case j ¼ ReverseDIRm ðiÞ, if i is even, then K = {i, j,⁄}, elseK ¼ UDIRm , then K is same as that in Algorithm 1.

(3) In other cases, K depends on whether i and j are odd or even,to be certain we have the following cases to consider:(I) case a 6 p and j < i. (II) case a 6 p and j > i. (III) case a > pand j < ReverseDIRm ðiÞ.(V) case a > p and j < i. (VI) other cases. All of these cases cor-respond to that in Algorithm 1 and a�½DIR� ;DIRm ;DIRm �j ¼ i�½DIRm �j ¼ K. Due to the limitation of space, we just provecase (I) here, other cases are analogous. If i is even, a ¼ 2p

4m i,then if j is even, a�½DIR� ;DIRm ;DIRm �j ¼ ðj; iÞ ¼ K , elseK ¼ a�½DIR� ;DIRm ;DIRm �j ¼ ½j; iÞ; else if 2p

4m ði� 1Þ < a < 2p4m ðiþ 1Þ,

then if j is even, K ¼ a�½DIR� ;DIRm ;DIRm �j ¼ ðj; i�, else,K ¼ a�½DIR� ;DIRm ;DIRm �j ¼ ½j; i�. From Algorithm 1, K ¼ i�½DIRm �j.

From the above discussions, a�½DIR� ;DIRm ;DIRm �j ¼ i�½DIRm �j ¼ K , i.e.,Type 1 Metric Reasoning of DIR⁄, DIRm is qualitatively solvable. h

As shown in the Example 3, Type 2 Metric Reasoning of DIR⁄,DIRm is not qualitatively solvable.

3124 S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133

Example 3. Let m = 4, if DIR⁄(a,b) = 60� and DIR⁄ (b,c) = 250�, thenit meansDIR4(60�) = 3 and DIR4 (250�) = 11. By Algorithm 1,3�½DIR4 �11 ¼ UDIR4 , but in this circumstance, c can just be in theregions [0, 3] [ (Mengual et al., 2013; Moratz, 2004) of a.

Let a�½DIR� ;DIR� ;DIRm �b ¼ L, where, a; b 2 UDIR� and L # UDIRm , thenthe pseudo-code of Type 2 Metric Reasoning of DIR⁄, DIRm isdescribed in Algorithm 2.

Algorithm 2. Type 2 Metric Reasoning of DIR⁄, DIRm

Input: m, a, b// DIR⁄(a,b) = a, DIR⁄(b,c) = bOutput: L//a�½DIR� ;DIR� ;DIRm �b ¼ L; L ¼ fljl 2 a�½DIR�;DIR� ;DIRm �bg

i = DIRm(a);j = DIRm(b)Let DIR⁄(a,c) = c.If a = ⁄ then L = {j};If b = ⁄ then L = {i};If a = b then L = {i};If a + b = 2p then L = {i, j,⁄};If a < = p then

If b < a then c 2 (b,a), thusIf i is odd & & j is even then L = (j, i];If i is odd & & j is odd then L = [j, i];If i is even & & j is even then L = (j, i);Else K=[j, i);

Else, c 2(a,b), thusIf i is odd & & j is even then L=[i, j);If i is odd & & j is odd then L=[i, j];If i is even & & j is even then L=(i, j);Else L=(i, j];

ElseIf b < 2p � a, then c 2 (a,b), thus

If i is odd & & j is even then L = [i,4m) [ [0,j);If i is odd & & j is odd then L = [i, j];If i is even & & j is even then L = (i, j);Else L = (i, j];

Else if 2 p � a < b < = a then c 2 (b,a), thusIf i is odd & & j is even then L = (j, i];If i is odd & & j is odd then L = [j, i];If i is even & & j is even then L = (j, i);Else L = [j, i);

Else c 2 (a,b), thusIf i is odd & & j is even then L = [i, j);If i is odd & & j is odd then L = [i, j];If i is even & & j is even then L = (i, j);Else L=(i, j];

The correctness proof of Algorithm 2 follows the similar way ofTheorem 1.

3. Multi-granularity and metric spatial reasoning for OPRAm

a

2π/3

5π/4

b aφbφ

bπ/3

aaφ

(a) 2 /3* 5 /4( , )OPRA a b π

π= (b) * ( , ) ( / 3)OPRA a b π=

Fig. 8. Two configurations of o-points a and b for OPRA⁄. The orientation of the twopoints is depicted by the arrows starting from a and b, respectively.

3.1. OPRA

The Oriented Point Relation Algebra OPRAm(m is a variable),introduced in Moratz (2004), is a binary orientation calculus withadjustable granularity parameter m. The domain of OPRAm is theset of oriented points (o-points), which are in the plane with anadditional orientation. This orientation can be given as an anglewith respect to an axis (x-axis). An o-point s in the plane can be de-scribed by an ordered pair of a point ps(represented by its Cartesiancoordinates xs and ys, with xs; ys 2 R) and an orientation /s.

s ¼ ðps;/sÞ; ps ¼ ðxs; ysÞ; /s 2 ½0;2pÞ:

Thus the domain of OPRA is DOPRA ¼ R2 � ½0;2pÞ, which is the setof points with an orientation in the plane.

In this section, we firstly give the metric representation of OPRA,and the multi-granularity OPRAm relation is redefined by followingthe above framework. Then the multi-granularity and metric rea-soning for OPRAm are discussed.

3.1.1. OPRA⁄The original OPRAm is an inherent multi-granularity model

which is based on discretizing relative position angle and movingdirection angle with granularity parameter m. Here we separatethe quantitative representing for the angles from OPRAm, and buildthe formalization of OPRA⁄.

The metric spatial relation for two oriented points is defined inthis subsection. Given two oriented points a, b, with pa – pb, wedefine:

uab ¼u0ab; if u0ab P 02pþu0ab; otherwise

�ð15Þ

where u0ab ¼ atan2ðyb � ya; xb � xaÞ, here, normalized to the interval[0,2 p). atan2(y,x) is the angle between the positive x-axis and thepoint (x,y). Then we get uba:

uba ¼uab þ p; if uab < puab � p; otherwise

�: ð16Þ

Definition 16 (Metric relation OPRA⁄). Let the angle intervalZ� ¼ ½0;2pÞ. Given two o-points a,b 2 DOPRA, the metric relationsbetween a and b can be represented by:

(1) If pa– pb then relation OPRA�ða; bÞ ¼ ]ba, where the angle

between the half-line ab and the orientation /a is represented by a,i.e., a = /ab � /a, and the angle between the half-line ba and theorientation /b is represented by b, i.e., b = /ba � /b, see Fig. 8(a).

(2) If pa=pb(called ‘‘same’’ case) then relation OPRA⁄(a,b) = ]a,where a is the angle between /b and /a, i.e., a = /b � /a, seeFig. 8(b).

According to the above definition, we have UOPRA� ¼ f]baja;

b 2 Z�g [ f]aja 2 Z�g. Fig. 8 shows the illustrations for the OPRA⁄.It depicts the relations OPRA�ða; bÞ ¼ ]

2p=35p=4 and OPRA⁄(a,b) = ](p/

3), respectively.Reverse relations in OPRA⁄ can be obtained by interchanging the

direction components for the non-same cases and 2p minus theangle for the same cases. The reverse of ]

ba is ]a

b and the reverse of]a is ](2p � a), for instance, ð]p=2

4p=3Þ�¼ ]

4p=3p=2 and (](p/

3))� = ](5p/3).

3.1.2. OPRAm

To perform the multi-granularity and metric reasoning onOPRAm with our theories, the original definition of OPRAm has to

012

34

5

6 7 89 10

13

1415

013

7

8 9 11

13

15

a

b

a

b01

7 3

0

1

3 5

4

6

7

2

2a

b

1

0

2

4

5

6

7

3

(a) m=2: 32 2 7( , )OPRA a b = ∠ (b) m=4: 7

4 4 13( , )OPRA a b = ∠ (c) a and b coincide:

2 2( , ) 7OPRA a b = ∠

Fig. 9. Three configurations of two o-points a and b under different instances of OPRAm.

S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133 3125

be revised. Here, we give an equivalent definition for OPRAm (m is aconstant) based on OPRA⁄ following our general frameworks ofmulti-granularity.

The set of basic relations distinguished in OPRAm depends on thegranularity parameter m 2 Nþ. Suppose a 2 Z�, and Qm(a) standsfor the qualitative value of a, we have:

QmðaÞ ¼

0; if a ¼ 04m a

2p ; if 4m a2p ¼ 4m a

2p

� �� �^ 4m a

2p

� �mod 2 ¼ 0

4m a2p

� �; if 4m a

2p > 4m a2p

� �� �^ 4m a

2p

� �mod 2 ¼ 0

4m a2p

� �; otherwise

8>>><>>>:

ð17Þ

Then we define the inverse function of Qm(a), [i]m maps aqualitative value to an interval.

½i�m ¼2p i�1

4m ;2p iþ14m

� �; if i is odd

f2p i4mg; if i is even

(ð18Þ

The partitions for cases m = 2(a) and m = 4(b) are shown inFig. 9. Then a qualitative relative relation between two o-pointshas the following definition. Z� is partitioned into 4m sectors,{0,1,. . ., 4m-1}, by granularity m, let Z4m = {0,1, . . . ,4m � 1}. It canbe seen that each element of Z4m corresponds to a range of anglesby mapping functions Qm(a) and [i]m.

Definition 17 (Relations in OPRAm). Given two o-points a and b,and the granularity parameter m, the qualitative relative relationbetween a and b is defined as:

OPRAmða; bÞ ¼m\k; if OPRA�ða; bÞ ¼ ]c and k ¼ QmðcÞm\

ji ; if OPRA�ða; bÞ ¼ ]b

a and i ¼ Q mðaÞ and j ¼ QmðbÞ

(

ð19Þ

where, a;b; c 2 Z� and i; j; k 2 Z4m.Using those notations, a simple manipulation of parameters

yields the reverse operations m\ji

� ��¼ m\

ij and (m\i)� =

m\(4m � i).Thus, the examples in Fig. 9 depict the relation

OPRA2ða; bÞ ¼ 2\37 (a), OPRA4ða; bÞ ¼ 4\

713 (b) and OPRA2(a,b) = 2\7

(c), respectively. Then the set of the base relations of OPRAm isUOPRAm ¼ fm\

jiji; j 2 Z4mg [ fm\iji 2 Z4mg. Altogether we can obtain

jUOPRAm j ¼ 4mð4mþ 1Þ different base relations with respect to thegranularity parameter m and these relations are jointly exhaustiveand pairwise disjoint (JEPD).

Note that we work with the angle interval Z� and the cyclicgroup Z4m, reflecting the cyclic order of the directions. All anglesare normalized to Z�. It is important to note that, in the case where

a < 0, then a stands for 2p + a, i.e., a � 2p + a, and in the casewhere i < 0, then i stands for 4m + i, i.e., i � 4m + i (mod 4m).Moreover, in the case where [i, j], [i, j] stands forfkji 6 k 6 j; k 2 Nþg, and if i > j, then the open interval (i, j) standsfor (i,4m) [ [0,j).

3.2. Single granularity spatial reasoning for OPRAm

There are some previous works which mainly focused on theweak composition reasoning of OPRAm calculus. These works aredefinitely based on single granularity. In Moratz et al. (2005), thereare methods under development to directly computeOPRAmða; bÞ�½OPRAm �OPRAmðb; cÞ. And in Moratz (2006), a fairly simpletwo-procedure algorithm is presented, however, it is incompletebecause it does not cover the ‘‘same’’ cases, i.e., the relations m\i,and it contains errors. A correct algorithm is provided in Fromm-berger et al. (2007), however, it is based on a complicated case dis-tinction with dozens of cases according to whether the threeinvolved relations involve even or odd numbers. Literature (Mossa-kowski and Moratz, 2012) presents an algorithm which is based onsimple geometric rules, the algorithm is both correct and simplerthan the two algorithms in Moratz (2006) and Frommbergeret al. (2007), and proves its correctness.

3.3. Multi-granularity spatial reasoning for OPRAm

In this subsection, we discuss the multi-granularity spatial rea-soning for OPRAm with the above framework. Firstly, we prove thatthe production of any two granularities in OPRAm exists.

Lemma 4. Suppose OPRAm, OPRAn(m and n are constants) are twoOPRA models, and then OPRAm OPRAn = OPRAlcm(m, n), where,lcm(m,n) returns the least common multiple of m, n.

Proof. Let h = lcm(m,n). We prove that OPRAm � OPRAh, for OPRAn

� OPRAh, it is analogous.

8rm 2 UOPRAm , if rm = m\i, then if i is even, rm = rh = h\k, where,k ¼ h

m i,else, H ¼ h\kj h

m ði� 1Þ < k < hm ðiþ 1Þ

� �;

else, i.e., rm ¼ m\ji, then if both i and j are even, then

H ¼ h\lkjk ¼ h

m i; l ¼ hm j

n o;

else if i is even and j is odd, thenH ¼ h\

lkjk ¼ h

m i; hm ðj� 1Þ < l < h

m ðjþ 1Þn o

;

else if i is odd and j is even, thenH ¼ h\

lkj h

m ði� 1Þ < k < hm ðiþ 1Þ; l ¼ h

m jn o

;

3126 S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133

else, H ¼ h\lkj h

m ði� 1Þ < k < hm ðiþ 1Þ; h

m ðj� 1Þ < l < hm ðjþ 1Þ

n o.

Then, by Definition 11, we have rm = H, and by Definition 12,OPRAm � OPRAh.

From the above discussions, by Definition 12, we have OPRAm OPRAm = OPRAlcm(m, n). h

Secondly, we give the conversion function between differentgranularities. Given a qualitative value j 2 Z4n, the functionTU(n,m, j) maps j to a subset of Z4m.

TUðn;m; jÞ ¼ fQ mð2p j4nÞg; if j is even

½o;p�; otherwise

(ð20Þ

where,if Qm 2p j�1

4n

� �mod 2 = 0 then o ¼ Q m 2p j�1

4n

� �þ 1, otherwise

o ¼ Qm 2p j�14n

� �;

if Q m 2p jþ14n

� �mod 2 = 0 then p ¼ Qmð2p jþ1

4n Þ � 1, otherwise

p ¼ Qm 2p jþ14n

� �.

It is apparent that j # TU(n,m, j). Then j ’ [I1, I2], where, I2 -= TU(n,m, j) and I1 can be gotten from TU(n,m, j) making I1 # j # I2.

We can prove that the upper boundary of the OPRAm relationscorresponding to OPRAn relation, can be determined by TU(n,m, j).

n\j ’ ½J1; J12� where J1

2 ¼ fn\kjk 2 TUðn;m; jÞg; and

n\ij ’ ½J1; J

22� where J1

2 ¼ n\lkjk 2 TUðn;m; jÞ; l 2 TUðn;m; iÞ

n o

If m ¼ tnðt 2 ZþÞ stands that the corresponding OPRAm relationsare exactly determined by the following formulae:

TEðn;m; jÞ ¼ftjg; if j is evenðtðj� 1Þ; tðjþ 1ÞÞ; otherwise

�ð21Þ

TGOPRAðn;m; rnÞ ¼fm\kjk 2 TEðn;m; iÞg; if rn ¼ n\i

fm\lkjk 2 TEðn;m; iÞ; l 2 TEðn;m; jÞg; if rn ¼ n\

ji

(ð22Þ

Finally, based on the above discussions, we know that the mul-ti-granularity composition of the OPRAm(i.e., �½OPRAm ;OPRAn ;OPRAm �Þ canbe solved by single granularity composition (i.e., �½OPRAlcmðm;nÞ �). Inaddition, it can be performed with the weak composition in Mossa-kowski and Moratz (2012) and the granularity conversion functionin formula (22).

3.4. Metric spatial reasoning for OPRAm

In this section, we discuss the metric spatial reasoning ofOPRAm. Two algorithms for Type 1 and Type 2 metric reasoningare given in Sections 3.4.2 and 3.4.3, respectively. The twoalgorithms are both based on some basic rules defined in Section3.4.1.

3.4.1. Simple geometric rules for metric spatial reasoning for OPRAm

In this subsection, we present some simple geometric rulesangle1_turn, angle 2_turn and angle_triangle which are similar to

α

j

k

α

β

k

(a) 1_ , ,mangle turn j kα ( ) (b) 2 _ , ,mangle turn kα β ( )

Fig. 10. Two transformations of turnm(i, j,k)

turn and triangle in Mossakowski and Moratz (2012), respectively,for computing the Type 1 and Type 2 Metric Reasoning of OPRA⁄,OPRAm.

The rule angle1_turnm(a, j,k) ensures that the metric angle valuea and the qualitative angle values j, k form a turn (see Fig. 10(a)).Here a belongs to the angle interval Z� and j, k belong to the cyclicgroup Z4m. Accordingly, we conveniently use �1 as synonym for4m-1. The rule angle1_turnm(a, j,k) is defined as:

angle1 turnmða;j;kÞ¼true; if QmðaÞþ jþk2f�1;0;1g and QmðaÞ and j are both oddtrue; if QmðaÞþ jþk¼0 and j is even or Qm ðaÞ is even and j is oddfalse; otherwise

8><>:

ð23Þ

Similarly, as shown in Fig. 10(b), the metric angle values a, band the qualitative angle value k form a turn (see Fig. 10(a)) iffangle2_turnm(a,b,k) = true.

angle2 turnmða; b; kÞ ¼true; if Qmðaþ bÞ þ k ¼ 0false; otherwise

�ð24Þ

Propositions 1–3 prove that three angle values can successfullyform a turn, if they satisfy any of the above two rules.

Proposition 1. angle1_turnm(a, j,k) is true, if and only if $b 2 [j]m,$c 2 [k]m making a + b + c = 0.

Proof. We prove this statement by a case distinction. Let i = Qm(a).

case 1. j is even: This means that ½j�m ¼ 2p j4m

n o. Hence,

9b 2 ½j�m; c 2 ½k�m; aþ bþ c ¼ 0

iff 9c 2 ½k�m; aþ 2p j4mþ c ¼ 0

iff 9c 2 ½k�m; c ¼ �a� 2p j4m

iff iþ jþ k ¼ 0; i:e:;Q mðaÞ þ jþ k ¼ 0

iff angle1 turnmða; j; kÞ:

case 2. i is even and j is odd. This means that a ¼ 2p i4m and

½j�m ¼ 2p j�14m ;2p jþ1

4m

� �. Hence,

9b 2 ½j�m; c 2 ½k�m; aþ bþ c ¼ 0

iff 9c 2 ½k�m; �2p i4m� c 2 2p j� 1

4m;2p jþ 1

4m

iff 9c 2 ½k�m; c 2 2p�i� j� 14m

;2p�i� jþ 14m

iff 9c 2 ½k�m; c 2 ½�i � j�m

iff k ¼ �i � j; i:e:;Q mðaÞ þ j þ k ¼ 0

iff angle1 turnmða; j; kÞ:

Case 3. Both i and j are odd. This means that a 2 ½i�m ¼2p i�1

4m ;2p iþ14m

� �and ½j�m ¼ 2p j�1

4m ;2p jþ14m

� �. Hence,

9b 2 ½j�m; c 2 ½k�m; aþ bþ c ¼ 0

Iff 9c 2 ½k�m; c 2 �aþ 2p�j� 14m

;2p�jþ 14m

¼ �aþ 2p�j� 14m

;�aþ 2p�jþ 14m

# 2p�i� j� 24m

;2p�i� jþ 24m

S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133 3127

iff 9c 2 ½k�m; c 2 ½�i � j � 1�m [ ½�i � j�m[ ½�i � jþ 1�m; i:e:;Q mðaÞ þ j þ k 2 f�1; 0;1g:

iff angle1 turnmða; j; kÞ: �

Proposition 2. angle2_turnm(a,b, k) is true, if and only if $ c 2 [k]m

making a + b + c = 0.

Proof. The second statement is straightforward Let i = Qm(a + b).

i ¼ Q mðaþ bÞ; 9c 2 ½k�m; aþ bþ c ¼ 0

iff 9c 2 ½k�m; c ¼ �a � b:

iff 9c 2 ½k�m; c 2 ½�i�m; i:e:;Q mða þ bÞ þ k ¼ 0

iff angle2 turnmða; b; kÞ: �

Proposition 3. angle1_turnm (a, j, k) and angle2_turnm (a,b, k) bothimply that for any choice of one of the three angles in its correspondingintervals, a suitable choice for the other two exits such that all threeadd up to 0.

Proof. The statement is straightforward when inspecting theabove proofs of Propositions 1 and 2.

Furthermore, we present the angle_triangle rule to checkwhether three angles could form a triangle. Since the triangle inMossakowski and Moratz (2012) checks three qualitative anglevalues and the third angle can be deduced by other two metricangle values, we only define angle_trianglem(a, j,k) here, wherea 2 Z� and j; k 2 Z4m. In a triangle, the sum of angles is always p, soangle_triangle can be expressed via angle1_turn, when addinganother p (i.e., 2m in the abstract representation). All angles shouldhave the same sign (expressed as signm(Qm(a)) = signm(j) = signm(-k)). In addition, it includes the degenerate case where two anglesare 0 and the remaining one is p, but this eliminates the case ofthree angles being p (this is geometrically unrealizable). Toexpatiate, we have the following definitions

signmðiÞ ¼0; if ði mod 4m ¼ 0Þ _ ði mod 4m ¼ 2mÞ1; if ði mod 4m < 2mÞ�1; otherwise

8><>: ð25Þ

angle trianglemða; j; kÞ ¼true; if angle1 turnmða; j; kþ 2mÞ ^ ða; j; kÞ– ðp;2m;2mÞ^

signmðQmðaÞÞ ¼ signmðjÞ ¼ signmðkÞfalse; otherwise

8><>:

ð26Þ

Here the angle p also has sign 0, which corresponds togeometric intuition and to the fact that the choice between 0 and2 p to represent this angle is rather arbitrary. h

From the above discussions, then it is straightforward to under-stand that:

Proposition 4. angle_trianglem (a, j, k) is true, if and only if $b 2 [j]m,c 2 [k]m, there exits a triangle with angles a, b, c.

3.4.2. Type1 Metric Reasoning for OPRAm

As shown in Example 4, Type 1 Metric Reasoning of OPRA⁄,OPRAm is not qualitatively solvable.

Example 4. Let m = 4, if OPRA�ða; bÞ ¼ ]110�

290� and OPRA4ðb; cÞ

¼ 4\711, then OPRA4ða; bÞ ¼ 4\

513. By the algorithm which computes

the single granularity spatial reasoning of OPRAm in Mossakowski

and Moratz (2012), then, 4\513�½OPRA4 �4\

711 ¼ 4\

lkjk 2 ½9;10�;

nl 2 ½7;9�g [ 4\

lkjk 2 ½11;13�; l 2 ½7;11�

n o. But in this case, the rela-

tions between a and c with respect to each other just can be

4\lkjk 2 ½11;13�; l 2 ½7;9�

n o.

Based on the simple geometric rules in Section 3.4.1, Algorithm3 is a complete algorithm for computing Type 1 Metric Reasoningof OPRA⁄, OPRAm. The algorithm computes the composition ofmetric OPRA⁄ and qualitative OPRAm relations, i.e., it judges if Tbelongs to the weak composition R�½OPRA� ;OPRAm ;OPRAm �S. And it Thealgorithm uses a case distinction whether a relation belongs to the‘‘same’’ cases, thus the algorithm has eight cases totally. Whether Tbelongs to the weak composition R�½OPRA� ;OPRAm ;OPRAm �S or not, isdetermined by the simple geometric rules including trianglem,turnm (proposed in Mossakowski and Moratz (2012)) andangle1_turnm (defined above).

Algorithm 3. Computing the Type 1 Metric Reasoning forOPRAm

Input: R, S, T, where R 2 UOPRA� ; S; T 2 UOPRAm

Output: True or False, if T 2 R�½OPRA� ;OPRAm ;OPRAm �S then returnTrue, else return False

If R = ]aandS = m\k andT = m\s thenIf angle1_turnm(a,k,�s) then Return True;Else Return False;

Else if R ¼ ]a and S ¼ m\k and T ¼ m\ts then

Return False;

Else if R ¼ ]ba and S ¼ m\k and T ¼ m\s then

Return False;Else if R ¼ ]a and S ¼ m\

lk and T ¼ m\s then

Return False;Else if R ¼ ]a and S ¼ m\

lk and T ¼ m\

ts then

If t = l ^ angle1_turnm(a,k,�s) then Return True;Else Return False;

Else if R ¼ ]ba and S ¼ m\k and T ¼ m\

ts then

If s = Qm(a) ^ angle1_turnm(�b,k, t) then Return True;Else Return False;

Else if R ¼ ]ba and S ¼ m\

lk and T ¼ m\s then

If k = Qm(b) ^ angle1_turnm(a,�l,�s) then Return True;Else Return False;

Else if R ¼ ]ba and S ¼ m\

lk and T ¼ m\

ts then

If$0 6 u,v,w < 4m,angle1_turnm(�a,s,u) ^ angle1_turnm(b,v,�k)^

turnm(w,�t, l) ^ trianglem(u,v,w)then Return True;

Else Return False;

Theorem 8. Algorithm 3 returns True iff T belongs to the compositionR�½OPRA� ;OPRAm ;OPRAm �S, where R 2 UOPRA� ; S; T 2 UOPRAm .

Proof.

Case R = ]aandS = m\k andT = m\s. In this case, three o-points a,b and cshare the same position, their directions must beadded to a complete angle1_turn. To be more precise, theconfiguration OPRA⁄(a,b) = a, OPRAm(b,c) = m\k and OPRAm

ab

a

bc

α

( )c aφ φ− −

c bφ φ−

Fig. 11. The case pa = pb = pc.

3128 S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133

(a,c) = m\s is realizable iff there are a, b, c with pa=pb=pc, /b

� /a = a, /c � /b 2 [k]m and /c � /a 2 [s]m. For such that a, b,c, a + (/c � /b) � (/c � /a) = 0, by Proposition 1, this isequivalent to angle1_turnm(a,k,�s), an illustration is shownin Fig. 11.

Case R ¼ ]a and S ¼ m\k and T ¼ m\ts, case R ¼ ]b

a and S ¼m\k and T ¼ m\s and case R ¼ ]a and S ¼ m\

lk and T ¼

m\s. It is very important to know that, due to the fact of‘‘sameness’’ of points being transitive, these cases in realworld are not realizable.

Case R ¼ ]a and S ¼ m\lk and T ¼ m\

ts. In this case, the configura-

tion of OPRA�ða; bÞ ¼ ]a;OPRAmðb; cÞ ¼ m\lk and OPRAmða; bÞ

¼ m\ts is realizable iff

α

bc bφ φ−

pa ¼ pb; /b � /a ¼ a;/bc � /b 2 ½k�m; /cb � /c 2 ½l�m;/ac � /a 2 ½s�m and /ca � /c 2 ½t�m:

9>=>; ð1� IÞ

c ( )ac aφ φ− −

Fig. 12. The case pa ¼ pb – pc .

Now, we prove that (1-I) is equivalent to

t ¼ l and angle1 turnmða; k;�sÞ:

Assume (1-I). By pa=pb, we have /bc = /ac and /ca = /cb; from thelatter, we also get t = l. Additionally, a + (/bc � /b) � (/ac � /a) = 0is an angle1_turn and by Proposition 1, we get angle1_turnm

(a,k,�s). On the contrary, assume t = land angle1_turnm(a, k,�s),also by Proposition 1, there are three angles a, c, g with a 2 Z�,c 2 [k]m and g 2 [�s]m. Choose a arbitrarily, then define b with pb=-pa and /b = a + /a. Furthermore, choose pc on the half-line startingfrom pa and have angle c to b and -g to a. Ultimately, Choose /c

such that /ca � /c = /cb � /c 2 [l]m = [t]m. This can ensure the con-ditions of (1-I), Fig. 12 illustrates this case.

Case R ¼ ]ba and S ¼ m\k and T ¼ m\

ts and case R ¼ ]b

a and S¼ m\

lk and T ¼ m\s. Here, we only treat the case

R ¼ ]ba and S ¼ m\k and T ¼ m\

ts; the other case is similar.

The configuration of OPRA�ða; bÞ ¼ ]ba, OPRAm(b,c) = m\k

and OPRAmða; bÞ ¼ m\ts is realizable iff

there are three o-points a; b and c withpb ¼ pc ; /ab � /a ¼ a;/ba � /b ¼ b; /c � /b 2 ½k�m ;/ca � /c 2 ½t�m and /ac � /a 2 ½s�m :

9>>>=>>>;ð1-IIÞ

We now present (1-II) is equivalent to

s ¼ Q mðaÞ and angle1 turnmð�b; k; tÞ:

Assume (1-II), By pb=pc, we have /ab = /ac and /ba = /ca; from theformer, we also get s = Qm (a). Besides, �b + (/c � /b) + (/ca -� /c) = 0 is a turn with one angle, and by Proposition 1, so we canobtain angle1_turnm(�b,k, t). On the other hand, assume s = Qm (a)and angle1_turnm(�b,k, t), also, by Proposition 1, there are angles�b 2 Z� (�b � 2p � b, mod 2p), c 2 [k]m, k 2 [t]m. Choose a arbi-trarily and as well, choose pb on the half-line starting from pa andhaving angle a to a. Then choose /b satisfying /ba � /b = b, i.e., /b -= /ba � b and lastly, define c by pb=pc with /c � /b 2 [k]m and /ca

� /c 2 [t]m. This ensures the conditions of (1-II), and Fig. 13 is anexample which shows this case.

Case R ¼ ]ba and S ¼ m\

lk and T ¼ m\

ts. We present that a configu-

ration of OPRA�ða; bÞ ¼ ]ba, OPRAmðb; cÞ ¼ m\

lk and OPRAm

ða; bÞ ¼ m\ts is realizable, which is equivalent to

90 6 u;v ;w < 4m:

angle1 turnmð�a; s;uÞ ^ angle1 turnmðb; v;�kÞ^turnmðw;�t; lÞ ^ trianglemðu; v;wÞ

9>=>; ð1� IIIÞ

In this case, if OPRA�ða; bÞ ¼ ]ba, OPRAmðb; cÞ ¼ m\

lk and

OPRAmða; bÞ ¼ m\ts are given, then

/ab � /a ¼ a; /ba � /b ¼ b;

/bc � /b 2 ½k�m; /cb � /c 2 ½l�m;/ac � /a 2 ½s�m and /ca � /c 2 ½t�m:

Let r1, r2, r3 be the angles of the triangle, papb pc (see Fig. 14), thatis,

r1 ¼ /ab � /ac;

r2 ¼ /bc � /ba;

r3 ¼ /ca � /cb:

Let u;v;w 2 Z4m be such that r1 2 [u]m, r2 2 [v]m, r3 2 [w]m, i.e.,u, v and w satisfy the trianglem(u,v,w) (Mossakowski and Moratz,2012), then at the corners of the triangle papb pc, the followingcomplete angle1_turns and turn can be formed (see Fig. 14):

At pa: �(/ab � /a) + (/ac � /a) + r1 = 0 is an angle1_turn, corre-sponding to angle1_turnm(�a,s,u) by Proposition 1.

At pb: (/ba � /b) + r2 � (/bc � /b) = 0 is corresponding toangle1_turnm(b,v,�k) and at pc: r3 � (/ca � /c) + (/cb � /c) = 0 isa turn, defined in Mossakowski and Moratz (2012), correspondingto turnm(w,�t, l).

From the above discussion, (1-III) is shown, conversely, assume(1-III), by trianglem(u,v,w) in Mossakowski and Moratz (2012), andby Proposition 3, we can choose pa, pb, pc such that:

/ab � /ac 2 ½u�m;/bc � /ba 2 ½v �m;/ca � /cb 2 ½w�m:

Given angle1_turnm(�a,s,u) and by Proposition 1, we can findqa, ra and sa such that qa + ra + sa = 0, qa = �a, ra 2 [s]m andsa 2 [u]m. And Proposition 3 implies that it is possible to chooseqa = /a � /ab. Put /a = /ab � a, then /ab � /a = a and /ab � /a =(/ab � /a) � (/ab � /ac) = a � ra = sa 2 [u]m, finally, /b and /c

can be chosen similarly. h

a

b

c

α

βγ t

−β

Fig. 13. The case pa – pb ¼ pc .

S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133 3129

3.4.3. Type2 Metric Reasoning for OPRAm

Type 2 Metric Reasoning of OPRA⁄,OPRAm is also not qualita-tively solvable. However, we do not give an example here, due tolimitation of space. In this subsection, we proposed Algorithm 4,based on simple geometric rules discussed in Section 3.4.1, forcomputing Type 2 Metric Reasoning of OPRA⁄,OPRAm. The algo-rithm judges if T belongs to the composition R�½OPRA� ;OPRA� ;OPRAm �S, interms of the definitions angle2_turnm, angle1_turnm, angle1_trian-glem and function signm discussed in Section 3.4.1. It also has eightcases.

Algorithm 4. Computing Type 2 Metric Reasoning for OPRAm

Input: R, S, T, R; S 2 UOPRA� , T 2 UOPRAm

Output: True or False, if T 2 R�½OPRA� ;OPRA� ;OPRAm �S thenreturnTrue, else return False

If R = ]aandS = ] candT = m\s thenIf angle2_turnm(a,c,�s) then Return True;Else Return False;

Else if R ¼ ]a and S ¼ ]c and T ¼ m\ts then

Return False;Else if R ¼ ]a and S ¼ ]d

c and T ¼ m\s thenReturn False;

Else if R ¼ ]ba and S ¼ ]c and T ¼ m\s then

Return False;Else if R ¼ ]a and S ¼ ]d

c and T ¼ m\ts then

If t = Qm(d) ^ angle2_turnm(a,c,�s) then Return True;Else Return False;

Else if R ¼ ]ba and S ¼ ]c and T ¼ m\

ts then

If s = Qm(a) ^ angle2_turnm(�b,c, t) then Return True;Else Return False;

Else if R ¼ ]ba and S ¼ ]d

c and T ¼ m\s thenIf c = b ^ angle2_turnm(a,�d,�s) then Return True;Else Return False;

Else if R ¼ ]ba and S ¼ ]d

c and T ¼ m\ts then

If $s 2 [0,2p),$u,v,w,0 6 u,v,w < 4m,s = b � c ^ v = Qm(s)^angle2_turnm(�c,b,v) ^ angle1_turnm

(�a,s,u) ^ angle2_turnm(�c,b,v)^angle1_turnm(d,w,�t) ^ angle_trianglem (s,u,w) then

Return True;Else Return False;

Theorem 9. Algorithm 4 returns True iff T belongs to the compositionR�½OPRA� ;OPRA� ;OPRAm �S, where R; S 2 UOPRA� ; T 2 UOPRAm .

Proof. This theorem is similar to Theorem 8, so the case distinc-tion is analogous as some other ones mentioned above. Hence,we just give two cases: case R ¼ ]a and S ¼ ]d

c and T ¼ m\ts and

case R ¼ ]ba and S ¼ ]d

c and T ¼ m\ts.

Case R ¼ a and S ¼ ]dc and T ¼ m\

ts. The configuration of OPRA⁄

(a, b) = a, OPRA�ðb; cÞ ¼ ]dc and OPRAmðb; cÞ ¼ m\

ts is realizable iff

pa ¼ pb; /b � /a ¼ a;/bc � /b ¼ c; /cb � /c ¼ d

/ac � /a 2 ½s�m; and /ca � /c 2 ½t�m:

9>=>; ð2� IÞ

We now show that (2-I) is equivalent to

t ¼ Q mðdÞ and angle2 turnmða; c;�sÞ:

Assume (2-I). By pa=pb, we have /bc = /ac and /ca = /cb; from thelatter, we can get t ¼ ROPRAm ðdÞ. Furthermore, (/b � /a) + (/bc

� /b) � (/ac � /a) = 0 is anangle2_turn, and by Proposition 2, wegetangle2_turnm(a,c,�s). Inversely, assuming t ¼ ROPRAm ðdÞ andangle2_turnm(a,c,�s), then, by Proposition 3, there are anglesa 2 Z� c 2 Z�, g 2 [�s]m. Choose a arbitrarily, then define b bypa=pb and /b = a + /a. Then choose pc on the half-line starting frompa and having angle c to b and -g to a. At length, choose /c with /ca

� /c = /cb � /c = d 2 [t]m, i.e., t = Qm(d), these satisfy the conditionsof (2-I). An illustration is shown in Fig. 15.

Case R ¼ ]ba and S ¼ ]d

c and T ¼ m\ts. We should prove that the

realization of a configuration of OPRA�ða; bÞ ¼ ]ba;OPRA�ðb; cÞ ¼ ]d

cand OPRAmðb; cÞ ¼ m\

ts is equivalent to

9s 2 ½0;2pÞ; 90 6 u;v ;w < 4m:

s ¼ c� b ^ v ¼ Q mðsÞ ^ angle2 turnmð�c; b;vÞ^angle1 turnmð�a; s;uÞ ^ angle1 turnmðd;w;�tÞ^angle1 trianglemðs;u;wÞ

9>>>=>>>;ð2� IIÞ

If OPRA�ða; bÞ ¼ ]ba;OPRA�ðb; cÞ ¼ ]d

c and OPRAmðb; cÞ ¼ m\ts are

given, then

/ab � /a ¼ a; /ba � /b ¼ b;

/bc � /b ¼ c; /cb � /c ¼ d;

/ca � /a 2 ½s�m and /ca � /c 2 ½t�m:

Let r1, r2, r3 be the angles of the triangle papb pc (see Fig. 16), thatis:

r1 ¼ /ab � /ac;

r2 ¼ /bc � /ba;

r3 ¼ /ca � /cb:

Where, r2 = /bc � /ba = (/bc � /b) � (/ba � /b) = c � b, let s = r2,i.e., s = r2 = c � b. Let u; v;w 2 Z4m be such that r1 2 [u]m, r2 -= s 2 [v]m, r3 2 [w]m, then v = Qm (s), thus s, u, w satisfy angle_trian-glem(s,u,w). At the corners of the triangle papb pc, the following: oneangle2_turn and two angle1_turns can be formed (see Fig. 16):

At pb: �(/bc � /b) + b + (/bc � /ba) = 0, corresponds toangle2_turnm(�c,b,v) by Proposition 2.

At pa: �(/ab � /a) + (/ac � /a) + r1 = 0, corresponds toangle1_turnm(�a,s,u), by Proposition 1.

At pc: d + r3 � (/ca � /c) = 0, corresponds toangle1_turnm(d,w,�t).

The above discussions show (2-II), on the contrary, assume (2-II), By angle_trianglem(s,u,w) and Proposition 4, we can choose pa,pb, pc such that

/ab � /ac 2 ½u�m;/bc � /ba ¼ s;/ca � /cb 2 ½w�m:

v = Qm(s). Given Since angle2_turnm(�c,b,v), by Proposition 2, wecan find gbsuch that � c + b + gb = 0 and gb 2 [v]m. Proposition3 implies that it is possible to choose � c = /b � /bc.Put /b =/ba � b, then /ba � /b = b, and/bc � /ba = � (/b � /bc) � (/ba �/b) = c � b 2 [v]m. Given angle1_turnm(�a, s, u), by Proposition

α ab

c

γ

δ

−s

Fig. 15. The case pa ¼ pb – pc .

c

ab

r1r2

r3

αac aφ φ−

– α

b bcφ φ−

c caφ φ−cb cφ φ−

β

c

a

b aφ

r2

r3

abφX-axis

acφ

Fig. 14. The case pa – pb – pc: two angle 1_turn s and one turn. The right hand side diagram illustrates the definitions of /ab and /ac, as well as the geometric interpretation of/a.

c

ab

r1r2

r3

αac aφ φ−

– αβ

γ

δ

− γ

c caφ φ−

Fig. 16. The case pa – pb – pc .

3130 S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133

1, we can find ra and ga such that � a + ra + ga = 0 and ra 2 [s]m,ga 2 [u]m. Proposition 3 implies that it is also possible to choosega = /ab � /ac, which is in [u]m. Put /a = /ab � a, then /ab � /a = a,and /ac � /a = (/ab � /a) � (/ab � /ac) = a � ga = ra 2 [s]m, /c

can be chosen similarly. h

4. Experiments

In order to test the proposed theories, we performed experi-ments with OPRAm in a simulated scenario which is similar toFig. 2, we assumed there were three robots in a 100m � 100msquare. Although, the precise position of each robot could not begot, they could detect each other within 30m. OPRAm was used todescribe the relative position and moving direction for two robots.Metric relation OPRA⁄can be acquired for the robots within 20m,OPRA4 relation be acquired for the robots from 20m to 25m andOPRA3 relation can be acquired for the robots from 25m to 30m.Any information cannot be acquired if the distance is larger than30m. The experiment environment is built with MATLAB 7.0 inWindows XP, and the algorithms in Section 3 are implementedwith MATLAB. We tested single granularity, multi-granularityand metric compositions on OPRAm with six datasets. In each

dataset, we assumed that three robots run on given trajectories,see Fig. 17.

For each group of dataset, we picked continuous sample with acertain time interval (1s), but the lengths of samples were variant.For every time point in each dataset, there were totally nine possi-ble cases, listed in Table 2.

To unify the result, weak compositions under multi-granularityresult in coarser relation which is OPRA3 for all cases. This isslightly different from the definition of �½Rf ;Rg;Rf �. Type 1 reasoningtask results are in OPRA3 or OPRA4 relations, which depend onthe qualitative relation in the Type 1 reasoning. All Type 2 reason-ing tasks results are in OPRA3 relations and we choose this granu-larity because it is the coarsest granularity in experiments.

The error rate for performing single granularity reasoning onmulti-granularity scene is defined as:

ER-MGSG ¼ b1 � a1

b1ð27Þ

where a1 is the number of the resulting base relations with weakcomposition under multi-granularity and b1 is the number of theresulting base relations with weak composition under single granu-larity. To calculate b1, we convert all the relations to coarser granu-larity which is always OPRA3here. From the above discussion, weknow that multi-granularity reasoning may be more precise thansingle granularity reasoning, thus a1 6 b1. When ER-MGSG isgreater than zero, it means that multi-granularity reasoning cannotbe replaced by single granularity reasoning. And the bigger ER-MGSG means the more necessary multi-granularity reasoning is.

The error rate for performing single granularity reasoning onType 1 reasoning scene is defined as:

ER-T1SG ¼ b2 � a2

b2ð28Þ

where a2 is the number of the resulting base relations with Type 1reasoning and b2 is the number of the resulting base relations withweak composition under single granularity. To calculate b2, we con-vert the metric relation to the qualitative relation.

The error rate for performing single granularity reasoning onType 2 reasoning scene is defined as:

ER-T2SG ¼ b3 � a3

b3ð29Þ

where a3 is the number of the resulting base relations with Type 2reasoning and b3 is the number of the resulting base relations withweak composition under OPRA3. To calculate b3, we convert themetric relation to OPRA3.

Fig. 17. Simulated trajectories of robots.

Table 2All possible cases at a time point.

Case Condition Reasoning tasks

3 M All of the three relations are metric. Not necessary for reasoning.1Q2M Two relations are metric, and one relation is qualitative.2Q1M One relation is metric, and two relations are qualitative.3Q All of the three relations are qualitative.SG Two relations are qualitative relations with the same granularities, and the third relation

is not available.The other relation is deduced by weak composition under singlegranularity.

MG Two relations are qualitative relations with different granularities and the third relation isnot available.

The third relation is deduced by weak composition under multi-granularity.

T1 One relation is metric, another relation is qualitative, and the third relation is notavailable.

The third relation is deduced by Type 1 metric reasoning.

T2 Two relations are metric, and the third relation is not available. The third relation is deduced by Type 2 metric reasoning.NO At least two relations are not available. Can not perform reasoning.

Table 3The statistic items in the experiments.

Item Meaning Item Meaning

CNT The number of total time points AER-MGSG The average value of ER-MGSGC3M The number of 3 M cases. MinER-MGSG The minimum value of ER-MGSGC1Q2M The number of 1Q2M cases. MaxER-MGSG The maximum value of ER-MGSGC2Q1M The number of 2Q1M cases. AER-T1SG The average value of ER-T1SGC3Q The number of 3Q cases. MinER-T1SG The minimum value of ER-T1SGCSG The number of SG cases. MaxER-T1SG The maximum value of ER-T1SGCMG The number of MG cases. AER-T2SG The average value of ER-T2SGCT1 The number of T1 cases. MinER-T2SG The minimum value of ER-T2SGCT2 The number of T2 cases. MaxER-T2SG The maximum value of ER-T2SGCNO The number of NO cases.

S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133 3131

Table 4The statistical results for six datasets.

Cases Statistic items (a) (b) (c) (d) (e) (f)

All CNT 80 93 80 90 90 903 M C3M 0 0 0 4 14 101Q2M C1Q2M 24 8 10 36 15 82Q1M C2Q1M 8 0 10 0 2 73Q C3Q 2 0 3 0 0 0SG CSG 8 5 4 5 10 0MG CMG 16 23 7 5 10 5

AER-MGSG 0.3004 0.4012 0.4061 0.47059 0.58824 0.35294MinER-MGSG 0.19048 0.28571 0.2581 0.47059 0.58824 0.35294MaxER-MGSG 0.43243 0.5098 0.5349 0.47059 0.58824 0.35294

T1 CT1 4 36 19 29 34 14AER-T1SG 0.36364 0.4012 0.3892 0.36364 0.3934 0.36364MinER-T1SG 0.36364 0.36364 0.23333 0.36364 0.36364 0.36364MaxER-T1SG 0.36364 0.47619 0.47619 0.36364 0.47619 0.36364

T2 CT2 10 12 3 11 5 3AER-T2SG 0.2026 0.18182 0.4762 0.18182 0.4935 0.90909MinER-T2SG 0.18182 0.18182 0.28571 0.18182 0.18182 0.90909MaxER-T2SG 0.28571 0.18182 0.57143 0.18182 0.57143 0.90909

NO CNO 18 9 24 0 0 43

Table 5Summarize the related works.

Spatial Relation RelationModel

Multi-granularityRelation

Metric Relation Single Granularity Composition Multi-granularityComposition

Metric Composition

Topological relation forregions

RCC (Randellet al., 1992)

RCC8, RCC5(Randellet al., 1992)

metric distancemodel (Sridharet al., 2011)

weak composition table (Randell et al.,1992)

– –

DRCC DRCCi DRCC⁄ same as RCC can be solved withDRCC8

composition

Theorem 6 for Type 1;Type 2 is discussed inSection 2.4

Distance relation QD(Clementiniet al., 1997)

QD – combining QD and orientation combining QD andorientation

DIS DISd DIS⁄ Discussed in Section 2.1.3 can be solved withTheorem 5

discussed in Section2.4

Direction relation forpoints

CDC (MoratzandWallgrün,2012)

CDCm - composition table – –

STAR (Renzand Mitra,2004),

STARm - composition table – –

DIR DIRm DIR⁄ Algorithm 1 can be solved withTheorem 5 andAlgorithm 1

Theorem 7 for Type 1;Algorithm 2 for Type2

Direction relation fororiented points

OPRA(Moratz,2004)

OPRAm OPRA⁄ weak composition in Moratz et al. (2005,2006), Frommberger et al. (2007),Mossakowski and Moratz (2012)

discussed inSection 3.3

Algorithms 3 and 4

3132 S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133

For each dataset, we calculate the statistic items in Table 3, andthe results are listed in Table 4. From Table 4, we can infer the fol-lowing results:

(1) The total proportion for MG, T1 and T2 cases are 12.62%,25.5% and 8.38%, respectively. It means that the cases suitable formulti-granularity reasoning, Type 1 reasoning and Type 2 reason-ing are not rare in this experiments.

(2) For all the MG cases, both multi-granularity reasoning andsingle granularity reasoning were performed for comparison.According to the above discussion, the result of multi-granularityreasoning will be a subset of single granularity reasoning i.e., theresult will be more precise. ER-MGSG indicates how much percentof the basic relations are mistakenly put in the result by singlegranularity reasoning. From Table 4, we can see that the MinER-MGSG is at least 0.19048, it means that single granularity reason-ing yielded wrong results in all the MG cases. The MaxER-MGSGreaches 0.58824, so in the worst case, more than half of the resultsof the single granularity reasoning are wrong.

(3) For Type 1 and Type 2 reasoning tasks, the minimum errorrates are 0.36364 and 0.18182, respectively. In the worst cases,the error rates are 0.47619 and 0.90909, respectively.

From the experiments, we know that multi-granularity reason-ing and metric reasoning are quite necessary for the compositionreasoning with OPRAm. Because in the cases suitable for multi-granularity reasoning or metric reasoning, the composition reason-ing definitely results in wrong result and these cases are not rare.

5. Conclusions

Two new reasoning tasks in QSR, multi-granularity and metriccomposition reasoning, are studied systematically in this paper.As shown in Fig. 1, these tasks are quite different from other spatialreasoning tasks. We put forward the framework for multi-granu-larity and metric spatial relation model and defined the composi-tion operations for them. Furthermore, we applied our methodsto some spatial relation models. Table 5 compares our works with

S. Wang et al. / Expert Systems with Applications 41 (2014) 3116–3133 3133

the previous works, and the dark cells are the works proposed inthis paper. As it shows, only qualitative distance has the previousworks on multi-granularity composition reasoning, and the differ-ent frames of reference problems in literature (Clementini et al.,1997) is not exactly the same as the one as the multi-granularitycomposition reasoning in this paper. The metric composition rea-soning is a quite new problem, and it has not been studied before.Multi-granularity and metric composition reasoning for OPRAm andthree new models are well solved in this paper.

According to the experiments on OPRAm, the scenarios for mul-ti-granularity and metric composition reasoning are not rare(12.62% for multi-granularity reasoning and 33.88% for metric rea-soning in our experiments). And replacing multi-granularity ormetric composition reasoning with traditional composition rea-soning will certainly cause wrong result (minimum error rate isgreater than zero for all cases).

Our works can be potentially applied in robot navigation, WSNand other applications. Take robot navigation for example, thehardware and environment are similar as Falomir et al. (2013),and we have explained the necessity for multi-granularity andmetric composition reasoning in Section 1 by an example (Fig. 2).

In our future works, we will extend multi-granularity and met-ric composition reasoning to QCSP for multi-granularity and metricrelations. We only considered three variables here. To solve QCSP,we will extend it to n variables. Another future work is to applythis technology to some applications, like indoor robot navigation,indoor node localization in WSN etc.

Acknowledgments

This work is supported by the National Natural Science Founda-tion of China under Grants 61133011, 61303132 and 61103091,the Scientific Research Foundation for the Returned Overseas Chi-nese Scholars, State Education Ministry of China, OutstandingYouth Science Foundation of Jilin University and the Science Foun-dation for Youths of the Science and Technology Department of Ji-lin Province (201201131).

References

Bettini, C., & Sibi, R. D. (2000). Symbolic representation of user-defined timegranularities. Annals of Mathematics and Artificial Intelligence (30), 53–92.

Clementini, E., Felice, P. D., & Hernández, D. (1997). Qualitative representation ofpositional information. Artificial Intelligence, 95(2), 317–356.

Cohn, A. G., & Renz, J. (2008). Qualitative spatial representation and reasoning. InFoundations of artificial intelligence. Handbook of knowledge representation (vol. 3,pp. 551–596). Elsevier.

Falomir, Z., Museros, L., Castelló, V., & Gonzalez-Abril, L. (2013). Qualitativedistances and qualitative image descriptions for representing indoor scenes inrobotics. Pattern Recognition Letters, 34, 731–743.

Frommberger, L., Lee, J. H., Wallgrün, J. O., & Dylla, F. (2007). Composition in OPPAm.Tech. rep., SFB/TR 8, University of Bremen.

Gerevini, A., & Renz, J. (2002). Combining topological and size information forspatial reasoning. Artificial Intelligence, 137(1-2), 1–42.

Glez-Cabrera, F. J., Álvarez-Bravo, J. V., & Díaz, F. (2013). QRPC: A new qualitativemodel for representing motion patterns. Expert Systems with Applications (40),4547–4561.

Lago, U. D., & Montanari, A. (2001). Calendars, time granularities, and automata.Advances in Spatial and Temporal Databases, Lecture Notes in Computer Science(2121), 279–298.

Liu, Weiming, & Li, Sanjiang (2012). Here, there, but not everywhere: An extendedframework for qualitative constraint satisfaction. ECAI, 2012, 552–557.

Liu, Weiming, Wang, Shengsheng, Li, Sanjiang, & Liu, Dayou (2011). Solvingqualitative constraints involving landmarks. Principles and Practice of ConstraintProgramming – CP, Lecture Nodes in Computer Science (6876), 523–537.

Mengual, L., Marbán, O., Eibe, S., & Menasalvas, E. (2013). Multi-agent locationsystem in wireless networks. Expert Systems with Applications (40), 2244–2262.

Moratz, R. (2004). Qualitative spatial reasoning about oriented points. TechnicalReport 003-10/2004, SFB/TR8 Spatial Cognition.

Moratz, R. (2006). Representing relative direction as a binary relation of orientedpoints. Proc. of ECAI-2006, In Frontiers in artificial intelligence and applicationsvol. 141 (pp. 407–411).

Moratz, R., Dylla, F., & Frommberger, L. (2005). A relative orientation algebra withadjustable granularity. In IJCAI-2005 workshop on cognitive robotics.

Moratz, R., & Wallgrün, J. O. (2012). Spatial reasoning with augmented points:Extending cardinal directions with local distances. Journal of Spatial InformationScience (5), 1–30.

Mossakowski, T., & Moratz, R. (2012). Qualitative reasoning about relative directionof oriented points. Artificial Intelligence (180–181), 34–45.

Randell, D. A., Cui, Z., & Cohn, A. G. (1992). A spatial logic based on regions andconnection. In: Principles of knowledge representation and reasoning: Proceedingsof the third international conference (KR’92) (pp. 165–176).

Renz, J., & Ligozat, G. (2005). Weak composition for qualitative spatial and temporalreasoning. In Proceedings of the eleventh international conference on principles andpractice of constraint programming (CP’05) (pp. 534-548).

Renz, J., & Mitra, D. (2004). Qualitative direction calculi with arbitrary granularity.In Proceedings of the 8th pacific rim international conference on artificialintelligence (pp. 65–74).

Sridhar, M., Cohn, A. G., & Hogg, D. C. (2011). From video to RCC8: Exploiting adistance based semantics to Stabilise the interpretation of mereotopologicalrelations. In Spatial information lecture notes in computer science (vol. 6899,pp. 110–125). Springer.

Stell, J. G. (2003). Qualitative extents for spatio-temporal granularity. SpatialCognition and Computation, 3(2–3), 119–136.

Wang, Shengsheng, & Liu, Dayou (2004). Spatio-temporal database with multi-granularities. Advances in Web-Age Information Management, Proceedings ofLecture Notes in Computer Science (3129), 137–146.