Spatial Reasoning with Augmented Points: Extending Cardinal Directions with Local Distances

We present an approach for supplying existing qualitative direction calculi with a distance component to support fully fledged positional reasoning. The general underlying idea of augmenting points with local reference properties has already been applied in the OPRA m calculus. In this existing calculus, point objects are attached with a local reference direction to obtain oriented points and able to express relative direction using binary relations. We show how this approach can be extended to attach a granular distance concept to direction calculi such as the cardinal direction calculus or adjustable granularity calculi such as OPRA m or the Star calculus. We focus on the cardinal direction calculus and extend it to a multi-granular positional calculus called EPRA m. We provide a formal specification of EPRA m including a composition table for EPRA 2 automatically determined using real algebraic geometry. We also report on an experimental performance analysis of EPRA 2 in the context of a topological map-learning task proposed for bench-marking qualitative calculi. Our results confirm that our approach of adding a relative distance component to existing calculi improves the performance in realistic tasks when using algebraic closure for consistency checking. c by the author(s) Licensed under Creative Commons Attribution 3.0 License CC 2 MORATZ, WALLGR¨UN


Introduction
The way humans as researchers (e.g., physicists) and engineers geometrically model physical space differs fundamentally from human spatial concepts involved in reasoning about everyday situations.In particular, they rely on quantitative representations based on measures that assess properties in relation to established units of measurement, which have to be generally available.In contrast, humans in everyday situations perform spatial reasoning to accomplish routine tasks in a timely and efficient manner.A key element in this process is to make a decision between a small set of possible actions.Human thinking is therefore known to leave out unnecessary details to speed up the inference process [12,38].Condensed representations are employed that only represent relevant features of the environment.Such qualitative representations provide mechanisms which characterize essential properties of objects or configurations and only make relatively coarse distinctions between spatial relations and configurations, and typically rely on relative comparisons rather than measuring.
Qualitative spatial and temporal calculi are formally defined and investigated in the research area of qualitative spatial reasoning (QSR) [4,5,44].QSR aims to model human commonsense reasoning about space and time using qualitative relations for different spatial aspects, such as topology (e.g., "included in"), direction ("to the left of"), and position as a combination of direction and distance, holding between elementary spatial entities such as points or regions.Coarse spatial knowledge can be used to represent incomplete and under-determined knowledge in a systematic way.This is especially useful if the task is to describe features of classes of configurations rather than features of individual configurations.As an example, the observation that the goalkeeper usually stands in front of the goal is true for a variety of ball games.A more specific expression about his or her position typically would have to refer to the corresponding configuration of a specific sport.In a similar way, descriptions of allowed or desired spatial behavior are abstractions that map infinite sets of possible quantitative configurations or trajectories to a single qualitative description.For instance consider a sea navigation rule such as "When two power-driven vessels are meeting head-on or nearly head-on courses so as to involve risk of collision, each shall alter her course to starboard so that each shall pass on the port side of the other."(example taken from [8]).Qualitative spatial calculi have been shown to be able to express and formalize the relevant spatial knowledge in such scenarios as well as perform high-level symbolic reasoning with it [27,39,53,55].
The focus in research on QSR and qualitative spatial calculi over the past decades has been on topological reasoning about regions [9,40,43] and positional reasoning about point configurations [10,11,21,29,36,42].Qualitative calculi for positional reasoning are concerned with direction and distance relations.A recent trend in this area is the usage of parameterized multi-granular calculi [29,36,42] that allow for adapting the directional or distance resolution to make finer distinctions whenever this is required in a particular application.The possibility to use finer qualitative distinctions can be viewed as a stepwise transition to quantitative knowledge.The idea of using context-dependent direction and distance intervals for the representation of spatial knowledge can be traced back to Clementini, di Felice, and Hernandez [3].However, only limited cases of reasoning were considered in their work.Finer distinctions based on continuous interval borders were suggested in previous work by the authors of this paper [33,34].But again only limited cases of reawww.josis.orgsoning were supported by this approach.In contrast, the calculus we will propose in this paper will make direct use of general purpose constraint propagation.
Qualitative spatial calculi for topological aspects (e.g., the 9-intersection approach [9] and RCC-8 [40]) and cardinal direction (e.g., the models in [10,16,21,42]), make use of binary relations ("contained-in" or "north-of") to express spatial knowledge and the defined relation algebraic operations to perform elementary reasoning form relation algebras or non-associative algebras over binary relations [18,22,47].In contrast, aspects such as relative direction or distance [2,11,17,20,31] are typically more naturally expressed using ternary relations, e.g., "object C is to the left of object B as seen from A" or "C is more distant from A than B." Our aim in this paper is to extend multi-granular directional qualitative reasoning formalisms with a granular distance concept for fully fledged positional reasoning, while staying within the framework of binary qualitative spatial reasoning.The method we propose is a generalization of the approach already taken in the OPRA m calculus [29,36], in which point objects are augmented with an internal reference direction to obtain oriented points as basic entities.Even if the spatial objects are, from a geometrical point of view, infinitesimally small points, locally available reference measures are attached.The same principle works also with local reference distances which we call elevations.We refer to the general approach of attaching reference features to points as hidden feature attachment and the points with attached hidden features as augmented points.We apply the hidden feature attachment approach to design an extended version of the Cardinal Direction Calculus [10,21] called EPRA m , supporting positional reasoning based on absolute direction as well as distance information.We also discuss how other directional calculi such as OPRA m [29,36] or the Star calculus [42] can be extended using the same approach.
In the second part of the paper, we focus on the investigation of EPRA m as a calculus for performing positional reasoning with absolute direction and relative distance information.This part comprises the derivation of a formal specification of EPRA with its converse and composition operations as well as an experimental analysis using a proposed benchmark application for qualitative calculi, involving the task of deriving the global layout of indoor environments from local observations [50].We also demonstrate that algebraic closure is not sufficient to decide consistency of atomic networks.Nevertheless, our benchmarking experiments show an improved performance of EPRA 2 over the Cardinal Direction Calculus.

Background
QSR aims at capturing human-level concepts of space using finite sets of relations abstracting from quantitative details but preserving the information relevant for spatial decision processes and reasoning [13,14].In this section, we recapitulate the most important concepts and definitions of QSR and qualitative spatial calculi; introduce the notations used in the remainder of the text; and provide an overview on related work forming the motivation for our approach.
In the context of this work, a qualitative spatial calculus is formally defined as a triple C = (D, B, O).The domain D is the potentially infinite set of spatial objects considered by the calculus, e.g., the sets of all points, lines, or regions in the plane.B is a set of n-ary relations over D referred to as base relations.For an n-tuple of objects from D exactly one relation from B holds, meaning B is jointly-exhaustive and pairwise-disjoint (JEPD).O is a set of operations defined on B that will be explained further below.
For instance, the Cardinal Direction Calculus (CDC) [10,21], which will play an important role in this paper, is a calculus over binary relations between points in the plane (D = Ê 2 ).For two points A, B in the 2D plane, the CDC distinguishes the nine qualitative direction relations that are depicted in Figure 1.Point A induces linear sectors n, w, s, and e corresponding to north, west, south, east in the absolute cardinal direction reference system.On the other hand, ne, se, sw, and nw are 2-dimensional quadrants.Each relation corresponds to one of these mutually exclusive areas around point A in which B can be located.For Figure 1, the relation B nw A holds (e.g., this corresponds to the natural language expression "B is north-west of A").The case in which point B coincides with point A is denoted by the base relation same (also referred to as equal or eq in the literature).
The set of base relations of a qualitative calculus C induces another set of relations R called the general relations.It consists of all unions of relations of base relations including the empty relation (union of no base relations) and the universal relation (union of all base relations).We follow the often used notation of writing general relations as sets of the constituent base relations, e.g., {n, nw, w}.The empty relation is written as ∅, while U is used as an abbreviation for the universal relation.General relations can express incomplete or uncertain information on a qualitative level.For instance, B{n, nw}A means that B is either to the north or to the northwest of A.
A set of spatial facts using general relations from a given qualitative calculus holding between a set of spatial objects can be depicted as a qualitative constraint network (QCN) as shown in Figure 2 The last component of a qualitative calculus is the set O of operations defined on the general set of relations R. In the case of a binary calculus (a calculus over binary relations), it consists of five operations O = (∩, ∪,¯, ∼ , •). ∩, ∪, and ¯are the standard set operations of intersection, union, and complement (with respect to D 2 ).The converse operation ∼ is a unary operation that transposes the arguments of the tuples in a relation r and, hence, is formally defined as r ∼ = {(A, B) | (B, A) ∈ r}.Clearly, in the cardinal direction calculus, the converse of n is s, the converse of nw is se, etc.
The binary composition operation • allows for inferring the relation between two objects A and C by combining the relation r holding between A and B with the relation s holding between B and C: r In the cardinal direction calculus, the composition of n and nw is nw and the composition of nw and ne is the universal relation U.The composition is the fundamental operation for propagating spatial information and inferring new knowledge in QSR as well as the underlying mechanism in the most common consistency checking approaches.Both, inferring new knowledge and consistency checking are traditionally based on a procedure called algebraic closure or path consistency algorithm [25,28,48] running in O(n 3 ) time.This algorithm performs the following operation for all triples of variables O i , O j , O k in a QCN to refine the constraint holding between O i and O k : . This is done until a fixpoint is reached or a resulting relational constraint becomes the empty relation which indicates that the input network is inconsistent.For certain calculi, no occurrence of the empty relation means the network is consistent.For most calculi, however, this is only the case if the input network is a scenario and a backtracking search has to be employed to split the constraints and then apply the algebraic closure procedure potentially exploiting previously identified maximal tractable subsets [19,37,43].
In a qualitative spatial calculus defined in this way, the intersection, union, and complement operations are always closed over the set of general relations R. Whether this also holds for the converse and composition operations depends on the definition of the base relations.If this is not the case, these operations need to be redefined as weaker versions in order to enforce closure with respect to R. This is achieved by taking the union of the smallest set of base relations that contains the result of the strong operation.The weak converse operation ∼ w is then defined as r ∼ w = {B ∈ B | B ∩ (r ∼ ) = ∅} and the weak composition operation as r Weak operations may lead to information loss when applying a sequence of operations and a reduction in the effectiveness of the mentioned standard techniques for checking consistency.While the converse operation is strong in almost all binary spatial calculi, the composition operation, typically defined as a look-up table called a composition table, is often weak.As as result, the algebra formed by the five operations in O together with ∅ and U becomes a non-associative relation algebra [22,23,26] instead of a full relation algebra in the sense of Tarski [18,47].
In ternary qualitative calculi such as the Singlecross or Doublecross calculus [11] or the Flipflop calculus [20], the intersection, union, and complement operations are defined analogously to the binary case.The converse operation, which has the purpose of generating permutations of object tuples, has to be replaced by multiple operations for generating all possible permutations of a triple.Traditionally, ternary spatial calculi only define a single binary composition operation.However, it has been argued in [7] that the generalization of composition to the ternary case as a binary operation is insufficient and that the correct generalization is a ternary operator taking three relations as input.We do not go any further into the details of ternary calculi here as the focus of this paper is the development of qualitative positional reasoning in a binary relational framework.

Adding relative distance to binary point calculi
Fully fledged qualitative positional reasoning requires representational formalisms, i.e., qualitative spatial calculi, that combine direction information-either in absolute or relative form-with distance information.We start our design of suitable calculi with a contemplation of the developments that led to the OPRA m calculus: a calculus that supports reasoning about relative direction but does not include distance information.
Figure 3 shows three representatives of spatial calculi able to express relative direction in the chronological order in which they have been invented.Arguably the most natural way to express relative direction is by using ternary relations describing where object C is with respect to object B when seen from A (where A, B, C here are assumed to be points in the plane).This approach has, for instance, been taken in Freksa's Doublecross calculus [11] shown in Figure 3(a) which distinguishes 15 base relations (assuming that A and B do not coincide).Other examples following this approach are the Flipflop calculus [20] and its refinements [46] and the Singlecross calculus [11].
The Dipole calculus [30,32] shown in Figure 3(b) proposed approximately 10 years later1 is able to express the relative direction of extended objects with an intrinsic direction represented by oriented straight line segments called dipoles.Details about the distinguished dipole relations can be found in [32].In the context of this work, the important point is that the Dipole calculus is a binary calculus.However, it can only be applied when the objects involved can be adequately represented by dipoles.In many potential application scenarios, the objects do not have a meaningful length feature and are best represented as points.The OPRA m calculus [29,36] (see Figure 3(c)) addresses this issue by attaching intrinsic orientations to point objects leading to the concept of oriented points.It is also an example of a multi-granular calculus in which a granularity parameter m can be used to instantiate relational schemes with different resolutions.Given the granularity parameter m, a partitioning of the plane into 4m direction sectors is established for each of the two oriented points A and B involved in a relation.The respective relations are written as A m∠ b a B where a is the direction sector of A that contains B and b is the direction sector of B that contains A (cf. again Figure 3(c)).Oriented points can be seen as dipoles with an infinitely small length.In this conceptualization, the length of the objects involved no longer has any importance and objects without an intrinsic orientation can be provided with one, for instance pointing towards a particular other object.
Essentially, this method attaches a feature which is used as a local reference to an object in the 2D-plane which is geometrically still a featureless point.We call this principle hidden feature attachment and the extended point objects augmented points.This approach can be adapted to other modalities than direction.In the following, we employ it to introduce the concept of elevated points able to represent distance information.We then develop new spatial calculi by extending existing approaches, in particular the CDC, with a distance concept.

Elevated point and basic distance relations
In analogy to the attachment of a reference direction to a featureless point, we can extend point-based binary direction calculi with a local reference distance and then express relative distance relations by comparing these reference distances.We refer to these reference distances as elevations due to an analogy with local basic perceptions of a cognitive agent forming the basis for establishing distance categories: we imagine that the point standing for a particular location is elevated above the 2D-plane (see point A in Figure 4) representing, for instance, the viewpoint of a human observer who visually perceives the environment.From this observer perspective, Gibson's insights about natural perspective [15] motivate the availability of depth clues which let the observer distinguish local distances based on a comparison of their distance with this elevation or height value.Although this analogy makes use of three-dimensional space, our model refers to the 2D plane.We can interpret the elevation as describing a circle around the point providing a reference distance, when projected to the ground plane.As an abstraction, every salient location/point (e.g., the second point B in Figure 4) can be assigned such a reference distance.This elevation can also be unspecified or unknown leading to disjunctions in the distance relations defined in the following.We refer to such points with an attached elevation feature as elevated points, or simply e-points.
Distances between two e-points A and B can now be locally compared using the projections of their elevations onto the 2D plane and considering the resulting partitioning of the ground plane into three partitions called close, equal, and distant for each of the two points (Figure 4).Considering in which of the three partitions the other point is located, allows us to distinguish nine binary distance relations for points with different locations.Similar to the notation of OPRA m relations, we write the two distance components on top of each other where the top one is the distance of A with respect to B, while the bottom one is the distance of B with respect to A: The relation depicted in Figure 4 has the following expression: To formally specify the e-point relations, we use two-dimensional continuous space, in particular R 2 .Every e-point S on the plane is an ordered pair of a point p S represented by its Cartesian coordinates x S and y S , with x S , y S ∈ R, and an internal reference distance δ S ∈ R + which corresponds to the elevation height in the cognitive motivation.
The metrical distance between e-points A and B is their Euclidean distance:

www.josis.org
Then the nine distance relations in configurations with p A = p B are defined in the following way: In configurations in which the two points have the same position (i.e., p A = p B ), called same cases, their reference distances are compared in the following way: Altogether, these 12 distance relations can be seen as the base relations of a coarse distance calculus.We now introduce a granularity parameter m to allow for the distance modality to have an adjustable granularity (for the concept of scalable granularity compare [36]).We define the basic schema from Figure 4 with three partitions to correspond to m = 2.In addition, we modify the notation scheme for the relations of this purely distance-based calculus to be A m j i B and allowing numbers 1, 2, 3 to be used in the relation names instead of the mnemonic names close, equal, and distant (e.g., 5 shows the corresponding schema for granularity m = 4.The intuition behind this schema is the empirical observation that subjective distances can be modeled as functions of objective distances with the property that larger distances are represented in a coarser resolution [1].Another design criterion was the intended property that base relations should have single base relations as converses (strong converse operation).As a result, distances smaller than equal have equidistant dividing borders and the distances greater than equal are multiplicative inverses to guarantee single base relations as converses in the case of same relations.The granularity parameter m corresponds to the number of dividing borders including the same case.
To define the schema for qualitative relative distances A m j i B (0 < i,j < 2m) between e-point pairs with p A = p B formally, we first define the boundaries of the distance partitioning around A to be given by a function b A (i) with 0 ≤ i ≤ 2m and i being an even numbers (written as i ≡ 2 0 for i mod 2 = 0): A 0 1 2 3 4 5 6 7 b The distance component i in A m j i B, with 0 < i < 2m, is then defined as where the * stands for an arbitrary value for j.And analogously for the distance partition around B and parameter For the same relations in which the two points have the same position (i.e., p A = p B ), the formal schema A m i same B (0 < i < 2m) for general granularity parameter m is given by: www.josis.org where b A (i) is the boundary function already defined above.

EPRA m : Combining the distance relations with CDC
We now combine the idea of hidden feature attachment to represent distance information, which led to the concept of elevated points, with the CDC calculus for cardinal directions introduced in Section 2. The partitioning of the CDC as shown in Figure 1 can be seen as the coarsest level in a multi-granular calculus using the same partitioning approach employed in OPRA m (cf. Figure 3(c)) but with the 0 direction always pointing up or north.We call this multi-granular version CDC m and define the coarsest level to correspond to m = 2.For m = 4, two more partitioning lines would be introduced using 45 • angles to generate a partition into 16 direction sectors (8 linear and 8 two-dimensional) numbered from 0 to 15 in counterclockwise order.We restrict ourselves to even number for the granularity parameter m.Each instance of CDC m for a given m could in principle also be defined as a version of the Star calculus [42], which is more general as it allows for non-equally sized sectors in the partition.
The distance and direction components can in principle be combined using different granularity parameters for each.In this paper, however, we follow the approach of coupling the two granularities by using a single granularity parameter m for both.As the domain of e-points used to define distance relations subsumes the domain of points in the plane of CDC, the combined calculus EPRA m2 also has e-points as its domain.Figure 6 illustrates the resulting partitioning scheme of EPRA m using fully drawn circles to show the respective elevations and dashed circles for the remaining boundaries of the distance partitions (only appearing for m = 4).
We write EPRA m relations in which the two involved points do not coincide using the following notation: A m a d2 d1 B where m is the granularity parameter, a is the number of the cardinal direction sector of B that contains A, d 1 is the number of the distance partition of A which contains B, and d 2 is the distance partition of B which contains A. Relations in which A and B coincide (called same relations again) are written as m d same with d being the distance partition of A which contains the elevation circle of B. In the case of m = 2, we also use close, equal, distant and n, nw, w, etc. instead of the partition numbers.same (or 2 close same ).In Figure 6(c), we see an example for m = 4, namely the EPRA 4 relation 4 13 5  3 .We will give a complete formal definition of EPRA in Section 4 including a specification of the important converse and composition operations.

Extending other directional calculi
The same approach of defining distance relations by attaching a reference distance to spatial entities can naturally be employed to other calculi, for instance other directional calculi such as the absolute Star calculus and the relative OPRA m calculus.The Star calculus can be seen as a more general version of the CDC calculus in which the planar sectors do not all have to be of the same size.The domain of the extended version would again consist of elevated points as in EPRA m and the extension would be analogous to that described for CDC.
OPRA m deals with the relative direction of oriented points (points with an intrinsic reference direction) in the plane.Hence, one would need to combine the concepts of oriented point and elevated point to define points with an intrinsic orientation and elevation as the domain for the combined calculus.Formally the domain is R 2 × [0...360) × R + (the set of oriented and elevated points) and the resulting eo-points can be written as triples ((x A , y A ), θ A , δ A ) with the first component being Cartesian coordinates x A and y A of the point, θ A giving the orientation, and δ A the elevation.Figure 3 illustrates the resulting distance and direction partitions using again a single granularity parameter.Relations of the extended calculus, which we refer to as EOPRA m3 , are written in the following way: when the two involved points do not coincide, the relations are written as m∠ a2 a1 d2 d1 with m, d 1 , and d 2 being the same as for EPRA, while a 1 and a 2 correspond to the direction components of the original OPRA m calculus (cf.again Figure 3).Relations for coinciding points (same cases) are analogously written as 2∠ a d same .The relations shown in Figure 7 (a) (b) (c)

Specification and analysis of EPRA
In the following, we give a formal specification of the EPRA calculus and report on how we were able to automatically derive a composition table.Our specification follows the formal definition of a qualitative spatial calculus given in Section 2 as a triple EPRA = (D EPRA , B EPRA , O EPRA ).From the operations in O EPRA , only the converse and composition operations need to be defined in a calculus specific way.Intersection, union, and complement keep their set-theoretic meaning.While we will define the base relations and converse operation for arbitrary granularity parameter m, the definition of the composition operation is restricted to granularity m = 2.The reason is that in contrast to the other components, determining the composition table is a challenging problem and no simple closed formula exists as is the case for the converse.We also investigate the question whether algebraic closure is sufficient to decide the consistency of atomic EPRA networks and provide a counterexample that shows that this is not the case.

Domain and base relations
As already described in Section 3, the domain D EPRA of EPRA m is the set of elevated points: B EPRA,same = {m i same | 0 < i < 2m} where i is the number of the distance sector as defined in Eq. 5 (or, alternatively, the abbreviated sector names introduced for m = 2 in Section 3).
The other set of base relations B EPRA,distinct consists of relations written as m a j i : where i and j are the distance sectors as defined in Eqs. 2 and Eq. 4 (or alternative distance sector names) and a is the number of the cardinal direction sector of B which contains A as described in Section 3.2 (or, alternatively, the abbreviated cardinal direction name for m = 2).
The set B EPRA of relations clearly is jointly-exhaustive and pairwise-disjoint over the given domain D EPRA .The set of general relations for EPRA, as usual, is considered to be the set of all unions of relations from B EPRA .For granularity parameter m, B EPRA has 2m − 1 + (4m) * (2m − 1) 2 base relations, e.g., 75 for m = 2 and 305 for m = 3.

Converse operation
Defining the converse operation ∼ of an EPRA m base relation is straightforward as both direction and distance components can be treated individually.For non-same cases (B EPRA,distinct ), the direction component needs to be inflected by adding 4m/2 modulo the number of sectors, 4m, while the distance components are exchanged: For instance, the converse of 2 3 2 1 is 2 7 1 2 .For the same cases from B EPRA,same , the following holds: For instance, the converse of 2 3 same is 2 1 same .To compute the converse of a general non-base relation, one has to compute the converses of all included base relations and combine the results by taking the union.

Composition operation
Without a closed formula, we need to compute all entries of the composition table to specify the composition operation for EPRA 2 .We were able to automate the computation of the complete table and by this avoid a time consuming and error-prone manual derivation as has been performed for many other spatial calculi.Our approach is similar to the work reported in [54] in that it is based on real algebraic geometry, i.e., we define a system of equations and inequations over the components of the involved e-points.While [54] uses Gr öbner bases, our approach is based on employing cylindrical algebraic decomposition (CAD) [6] as provided by the QEPCAD 4 solver to determine whether the equational systems for every triple of base relations have a solution and thereby checking their realizability.
For instance, the relation A 2 se equal distant B can be translated into the following four (in)equations assuming that the coordinates of A and B are (x A , y A , δ A ) and (x B , y B , δ B ), respectively: For EPRA 2 , non-same relations always result in two quadratic (in)equations for the distance components and a conjunction of two linear (in)equations for the direction component.For same relations, only one distance (in)equation is needed in addition to the two linear equations.For higher granularities, the equation systems get more complicated as angle intervals need to be expressed.
For an arbitrary composition triple of EPRA 2 base relations (b 1 , b 2 , b 3 ), combining the resulting equations yields an equational system over 9 variables (( x A , y A , δ A ), (x B , y B , δ B ),  (x C , y C , δ C )) and at most 12 (in)equations.In addition, we have to add the side constraints Checking for existence of a solution for the derived equational systems for each triple with QEPCAD required between 0 and 152 seconds on a 2.6 GHz Opteron CPU.We reduced the number of triples that needed to be considered in two ways: (1) The composition table of the cardinal direction calculus [21] was used as an upper approximation: only distance refinements of entries occurring in this table can result in a realizable composition triple.(2) Only the entries in which the first relation has a cardinal direction of 4 or 5 or in which the first relation was a same case were computed.The remaining triples were then derived via symmetry considerations.Overall, 29,187 triples out of 421,875 had to be computed.The resulting composition table was also verified using several tests, including relation algebraic properties that need to be satisfied and random point generation tests similar to the approach described in [24].This was done to detect potential implementation errors in the software module responsible for setting up the equational systems.The table as well as the complete calculus specification for EPRA 2 in SparQ5 format is available for download on the web [35].The overall table contains 51,493 valid composition triples, which is about half the size of the table we get over the same set of base relations but only using the cardinal direction information (110,835 triples).

Algebraic closure and closure under constraints
It is a general observation that while algebraic closure decides consistency for atomic networks over the CDC calculus, going beyond purely absolute direction relations typically has the effect that algebraic closure may not discover all inconsistencies and, hence, the standard backtracking search over atomic networks can also only be used as an approximate consistency checking method.This is, for instance, the case for relative direction calculi such as Flipflop, Dipole, and OPRA m for which the problem of deciding consistency over atomic networks has been shown to be NP-hard [56].
We were able to show that, similarly, algebraic closure does not decide consistency of atomic networks over EPRA 2 relations using the closure under constraints criterion described by Renz and Ligozat [41].They show that algebraic closure decides consistency over a set of relations R if and only if no R ∈ R can be refined to non-overlapping subatomic relations.Refinement into subatomic relations of a relation R ∈ R means that it is possible to give a consistent atomic network in which R holds between objects x, y such that the set of pairs (u, v) that are instantiated to x and y in a solution of the network is a strict subset of R.
The counterexample from Figure 9 shows that it is possible to refine EPRA 2 relations into two disjunct subatomic relations and, hence, EPRA 2 is not closed under constraints.The relation that will be split is the relation D 2 ne di cl A which requires D to be somewhere to the northeast of A and outside the circle around A in Figure 9(c) (the distance relation of A with respect to D does not matter here).Using the auxiliary e-point B in relation B 2 n eq eq A, the consistent atomic constraint network from Figure 9(a) refines this relation to the colored area northeast of and close to B (D 2 ne cl cl B).Doing the same with auxiliary e-point C in relation C 2 e eq eq A, another refinement can be achieved, this time to the colored region northeast of and close to C (D 2 ne cl cl C).The consistent atomic network for this refinement is shown in Figure 9(b).Due to the specific distance relationship, it is clear that both refinements are disjunct (see again Figure 9(c)).Hence, EPRA 2 is not closed under constraints and algebraic closure is not sufficient to decide consistency of atomic networks.Indeed, when combining the two constraint networks from Figures 9(a) and 9(b) using B 2 nw di di C, the inconsistency of the resulting network in which D would have to be located in both colored regions simultaneously is not discovered using algebraic closure.
However, our experimental evaluation in the next section will show that, nevertheless, compositional reasoning using algebraic closure for a set of EPRA 2 statements is useful Figure 9: Counterexample that shows that EPRA 2 is not closed under constraints and, hence, algebraic closure does not decide consistency.
to solve spatial navigation tasks even though it is not sufficient to decide global consistency.This is a similar situation to that for OPRA m [36].In particular, spatial knowledge expressed using EPRA 2 can be used for deductive reasoning based on constraint propagation, resulting in the generation of useful survey knowledge from local observations.We demonstrate this ability through a direct comparison with the CDC calculus for which algebraic closure is known to decide consistency for a large subset of relations including all base relations [21].

Experimental comparison of EPRA 2 and CDC
The application of qualitative spatial calculi and reasoning techniques for learning the layout of an unknown environment from coarse local observations has been proposed and investigated in [50].The overall approach is called multi-hypothesis topological mapping (MHTM) because the goal is to derive a graph-based abstraction called topological map and the approach tracks multiple distinct graph hypotheses simultaneously.In this work, we are mainly interested in this application as a benchmark to assess and evaluate EPRA 2 from a computational perspective.The advantage of this benchmark is that it allows us to investigate properties that are difficult to determine theoretically but nevertheless crucial for application in practice, in particular the trade-off between expressiveness and computational costs in a given qualitative calculus and the effects of only employing incomplete consistency checking techniques such as algebraic closure.We quantify the benefits of the combined direction-distance calculus EPRA 2 by comparing its performance to that of the CDC calculus without distance information.
In the following, we first give a brief overview on the MHTM framework, describe how we use EPRA 2 or the cardinal direction calculus to model observations, and then provide experimental results comparing the two calculi.

The MHTM benchmarking framework
The MHTM approach is best explained by assuming a robot that explores a maze-like environment consisting of hallways and junctions and gathers local observations as shown in Figure 10 (left).The observation history H = J 1 , H 1 , J 2 , H 2 , ..., H n−1 , J n for a particular exploration run consists of a sequence of alternating junction observations J i and hallway observations H j .We assume that the local observations are given in terms of coarse but reliably perceivable categories, namely the relations from a qualitative calculus.For instance, junction observations can be given in terms of cardinal direction relations of the leaving hallways, e.g., hallway h 1 sw J 1 and hallway h 2 s J 1 for junction observation J 1 in Figure 10.Hallway observations simply are assumed to contain the information which hallway was chosen when leaving a junction.This information is represented by the relative offsets between the chosen hallway and the hallway via which the robot arrived at the junction in the cyclic order of hallways observed.The mapping problem now is to determine the smallest graph structure that would form a valid explanation of the qualitative observations where size is measured in terms of the number of nodes in the graph.A particular graph hypothesis, for instance the one in Figure 10 (right), is valid if it can be drawn into the plane such that all the spatial constraints between the junctions and hallways as implied by the qualitative relations in the local observations are satisfied.
The MHTM approach to the topological mapping problem is to track possible graph hypotheses about the layout of the environment in a tree structure as illustrated in Figure 11.The successors of a node in the tree are constructed by incorporating the next observation.Incorporating a new observation involves two things: (1) changes to the graph structure such as introducing new connections and (2) a check whether the set of implied spatial constraints is consistent, meaning that the hypothesis is valid.For this check, qualitative spatial reasoning techniques for checking consistency are employed such as the path consistency or algebraic closure algorithm [25,28,48].When a hypothesis is found to be inconsistent, it is discarded and the corresponding branch in the tree is closed.Moreover, a search strategy can be used to determine the smallest hypothesis without necessarily considering all valid hypotheses in the tree.An A* search based on admissible estimates of the final solution size, for instance, usually allows for ignoring large parts of the search space (for details, we refer to [49,50]).
When comparing different qualitative calculi in this benchmarking framework, we use random graph environments and random walks through these graphs, and formulate the observations in terms of relations from these calculi.We then perform the search and record relevant performance parameters to measure the solution quality and the size of the traversed search space.In general, the more expressive a qualitative calculus is, the smaller www.josis.org Figure 11: Search tree of graph hypotheses in the MHTM benchmarking approach for the example from Figure 10 (example adopted from [50]).
the ambiguity in the available information which should in principle lead to a better solution quality and a smaller number of node expansions.However, high expressiveness usually also leads to a high computational complexity of the consistency decision procedure overall and the fact that procedures such algebraic closure become incomplete so that not all inconsistencies may be discovered.This can counter the aforementioned benefits such that these aspects have to be evaluated in combination in order to get a clear picture of how different calculi compare to each other.A merit of the MHTM framework is that it allows for performing this combined analysis.

Modeling observations with CDC and EPRA m
Figure 12 shows how a graph hypothesis is converted into a CDC constraint network as already described in [50].A variable is introduced for each node / junction in the hypothesis, and cardinal direction relations from the junction observations are turned into constraints between the respective variables in the QCN, e.g., A ne B. The constraints between all non-neighbored junctions are set to U \ {same} (not shown in the constraint network in the figure).
Using EPRA m relations for representing junction and hallway observations allows us to not only model the absolute direction between two junctions but also the relative lengths of two corridors leaving from the same junction.A QCN is derived by introducing an epoint for each pair of node and adjacent edge (or junction and adjacent hallway), as depicted in Figure 13.The variable names are derived by combing the name of the junction with that of the junction to which the respective hallway leads (e.g., AB for the e-point representing junction A and the hallway leading from A to B).For the two variables that represent the different ends of the same hallway (e.g., AB and BA), a constraint is introduced whose direction component is that contained in the junction observations, analogously to the way it is done in the CDC modeling.The distance components are both equal as they represent the length of the same corridor (e.g., AB 2 ne equal equal BA).For variables introduced for the same junction but different hallways, for instance BA and BC, the introduced constraint is a same relation derived from the perceived relative lengths of the two involved corridors, e.g., BA 2 close same BC in the example where the hallway connecting B and A is longer than the one connecting B and C. All other constraints are set to U \ {2 close same , 2 equal same , 2 distant same } to prevent co-location of junctions that are distinct in the hypothesis.
Overall, the number of variables in the derived QCN for a graph hypothesis with m nodes and n edges is m in the case of CDC, while it is 2 × n for EPRA m .Ignoring those constraints which are the universal relation minus the respective same cases, the number of introduced constraints is n for CDC and in O(n + m k 2 ) for EPRA m where k is the highest node degree occurring in the hypothesis.

Experiments and results
Our evaluation for the most part follows the approach taken in [50] but using EPRA 2 and CDC instead of OPRA 2 .While in [50] two variants of the MHTM approach are considered, we only employ the more challenging variant referred to as CompEnv, in which the hypotheses contain assumptions about unvisited junctions and how non-traversed hallways may be connected.Randomly generated graph environments of varying size are generated together with random walks through the graphs in order to generate instances of observation histories which are then fed into the MHTM system.An example environment and walk is shown in Figure 14.
As both the size of the environment as well as the length of the walk affect the difficulty of the problem instance, we use the number of junctions of the correct hypothesis www.josis.org to measure the size of the problem instances and record different performance criteria in dependency of this parameter.The recorded criteria are meant to capture the effect of the chosen calculus in combination with algebraic closure for consistency checking on (1) the solution quality and number of valid models and (2) the traversed search space and number of hypotheses that have to be tracked simultaneously.
The solution quality of the final hypothesis h that is computed by the MHTM algorithm is measured by an error measure e(h) which simply sums up how often two junction observations that correspond to different junctions have been mapped to the same node in h and how often two observations corresponding to the same junction have not been mapped to the same node.Moreover, we compute the number of valid models up to the same size as the correct model as an assessment of the degree of ambiguity in a given calculus.To de- termine the number of valid models, a modified version of the MHTM is employed using a complete traversal of the search tree up to the size of correct hypothesis instead of the heuristically guided A* search.
Regarding the search space, we record (a) the number of expansion steps in which successors of a hypothesis in the search tree are generated and (b) the maximal queue size occurring during the search.The first gives an indication of the time complexity of the approach, while the second is a measure for the space-consumption as it shows how many hypotheses had to be tracked simultaneously.To examine the search space criteria independently the effects of the given calculus on the solution quality, we again use the mentioned modified MHTM approach that traverses the search space up to the depth on which the correct hypotheses can be found.Otherwise, a calculus with worse average solution quality might appear better than it is because the search on average stops already on a higher level in the search tree.
In the following, we summarize the results with respect to solution quality and search space.

Solution quality
We performed 272 runs of the random environment / random walk experiment increasing the size of the problem instances from size = 4 to 20 (meaning the correct solution had size nodes).The length of the random walks which determines the length of the observation history was randomly varied between 0.5 × size and 2 × size.The resulting error distances averaged over all runs are given in Table 1, while Figure 15 shows the development for increasing size values.We see that the higher expressiveness resulting from the additional distance information leads to a noticeable reduction in the average error distance and, hence, an improvement of solution quality.Overall the solution quality has improved by 10.5%.
We get the a similar picture when looking at the number of valid models determined in 294 runs using the modified MHTM approach up to a size = 17. Figure 16 (left) shows on the left the average number of valid models over the problem size using logarithmic scale for the y-axis because of the exponential growth in the number of models.

Search space
The search space criteria were computed during the same set of runs used for the valid model numbers.Table 3 summarizes the results regarding the number of node expansion steps performed and the maximal queue size occurring during the search averaged over all runs.It shows an 18.16% reduction in the number of node expansions and a 17.64% reduction in the maximal queue size.A more detailed view showing the development of the expansions steps required over the problem size is given in Figure 17 (left).Due to the exponential growth, a logarithmic scale is again used for the y-axis.The right graph in Figure 17 therefore directly shows the reduction in expansion steps over the problem size, reaching 20.9% for size = 17.Table 3: Average number of expansion steps and average maximal queue size as a measure of search space pruning efficiency.

Calculus
Figure 18 illustrates the increase in the maximal queue size for larger problem instances.For size = 17, the average maximal queue size reaches 3078.2 for EPRA 2 and 3944.9 for CDC, a 22.0% reduction achieved by EPRA 2 .www.josis.org Figure 18: Average maximal queue size over increasing problem size.

Discussion
As described in Section 5.2, the constraint networks generated for EPRA 2 are significantly larger than the corresponding networks for CDC.As a consequence, spatial information in the form of constraints needs to be propagated over more steps which may result in inconsistencies remaining undiscovered over longer time spans in the search when using algebraic closure for consistency checking.Our results show overall improvements in the range of 10% to 26% over the different criteria.These values clearly show that the increased expressiveness of EPRA 2 stemming from the additional distance information is not negated by a decreased effectiveness of algebraic closure.While the improvements can be seen as being rather moderate, EPRA 2 in combination with algebraic closure is an effective formalism for reasoning about positional information, albeit coming at the price of an significant increase in the number of base relations compared to purely directional calculi such as CDC.

Conclusions and future work
Not many qualitative spatial calculi exist that support full positional reasoning including both direction and distance information and, to our knowledge, none that in addition have an adjustable granularity such that their resolution can be adapted to the task at hand.In this article, we generalized the idea of attaching hidden reference features to point entities, already used in OPRA m , and employed it to develop EPRA m , a multi-granular positional extension of the CDC that combines absolute direction information with distance information by attaching an internal reference distance to points in the plane.The composition table for EPRA 2 has been determined using an real algebraic geometry approach.The complete specification of EPRA 2 is available as a calculus specification for the SparQ toolbox [35].
We showed that algebraic closure is not sufficient for deciding consistency of atomic EPRA 2 networks.To investigate the performance of EPRA 2 in comparison to CDC, in particular the trade-off between expressiveness and effectiveness of algebraic closure for consistency checking, we applied the calculus in a benchmark scenario in which graph layouts of unfamiliar environments have to be derived from local observations.The evaluation showed improvements in the range of 10% to 26% for different performance criteria regarding both the quality of the solution and the size of search space that needs to be traversed.The fact that EPRA 2 in combination with algebraic closure performs better than CDC in these experiments demonstrates that the calculus makes effective use of the additional distance information and that this effect is not negated by a reduction of the effectiveness of algebraic closure to detect inconsistencies.
We will pursue the derivation of complete specifications for higher granularity parameters as part of future research.Moreover, we will aim at investigating and deriving similar specifications for the extended version of OPRA m , tentatively called EOPRA m , and compare its performance with the original version as well as EPRA m using the MHTM benchmarking approach.Also we will investigate how to model extended spatial objects efficiently using elevated points and augmented points in general.For example one can represent objects with their bounding boxes and then model the corners with elevated points.The local reference distances would then correspond to distances between corners of the bounding box.Another aspect for future work is the investigation of spatio-temporal reasoning with direction and distance information based on the notion of conceptual neighborhood for which suitable neighborhood structures over the relations of EPRA m (or the other proposed extended calculi) need to be derived.

Figure 1 :
Figure 1: Qualitative spatial directions in the cardinal direction calculus.

Figure 2 :
Figure 2: (a) A qualitative constraint network using relations of the cardinal direction calculus as constraints and (b) one of its scenarios which happens to be consistent.(c) shows one possible solution corresponding to this scenario.

Figure 4 :
Figure 4: Qualitative spatial distance relations between two points based on the notion of elevation.

Figure 4 .?⊇ A 2
3 shows the resulting overall equational system for the composition A 2 se equal distant B • B 2 nw close equal C distant same C in a format similar to what we use to query QEPCAD in our implementation.We actually use a slightly different order of variables and several optimizations in order to simplify the equational systems and, hence, reduce the computation times.∃xA, yA, δA, xB, yB, δB, xC, yC , δC :

Figure 10 :
Figure 10: A robot explores a maze-like environment and gathers local observations.A map hypothesis represents the potential layout of the environment.It is valid if the resulting network of constraints implied by the observed spatial relations is consistent.

Figure 12 :Figure 13 :
Figure 12: Constraint network extraction for a given graph hypothesis for CDC.

Figure 14 :
Figure 14: Example of the random problem instances used in the experiments.

Figure 16 :
Figure 16: Left: Number of valid models over increasing problem size using logarithmic scale.Right: Reduction in possible models achieved by EPRA 2 compared to CDC.

Figure 17 :
Figure 17: Left: Number of node expansion steps over increasing problem size using logarithmic scale.Right: Reduction in expansion steps achieved by EPRA 2 compared to CDC.
EPRA = B EPRA,same ∪ B EPRA,distinct ).The set of same relations consists of relations written in the form m d same .More precisely: The set of base relations B EPRA for EPRA m consists of the set of same relations B EPRA,same and the set B EPRA,distinct of relations in which the two related e-points do not coincide (B

Table 1 :
Solution quality averaged over all runs.Figure 15: Solution quality (measured in terms of error distance) over problem size.additionaldistanceinformationleads to a rather significant reduction is more clearly illustrated in the graph from Figure16(right) which directly depicts the reduction percentage over the problem size, reaching 30.0%for size = 17.Table2contains the model numbers averaged over all runs showing a 25.3% reduction overall.

Table 2 :
Number of valid models averaged over all runs.