Citation
Moving Balloon Algebra

Material Information

Title:
Moving Balloon Algebra Design, Implementation, and Database Integration of a Spatiotemporal Data Model for Historical and Predictive Moving Objects
Creator:
Praing, Reasey
Place of Publication:
[Gainesville, Fla.]
Florida
Publisher:
University of Florida
Publication Date:
Language:
english
Physical Description:
1 online resource (206 p.)

Thesis/Dissertation Information

Degree:
Doctorate ( Ph.D.)
Degree Grantor:
University of Florida
Degree Disciplines:
Computer Engineering
Computer and Information Science and Engineering
Committee Chair:
Schneider, Markus
Committee Members:
Kahveci, Tamer
Dobra, Alin
Fishwick, Paul A.
Wong, Tan F.
Graduation Date:
8/9/2008

Subjects

Subjects / Keywords:
Algebra ( jstor )
Balloons ( jstor )
Boundary points ( jstor )
Data models ( jstor )
Data types ( jstor )
Databases ( jstor )
Hurricanes ( jstor )
Matrices ( jstor )
Modeling ( jstor )
Spatial data ( jstor )
Computer and Information Science and Engineering -- Dissertations, Academic -- UF
balloon, database, evolution, historical, model, movement, moving, predicates, predictive, spatiotemporal
Genre:
bibliography ( marcgt )
theses ( marcgt )
government publication (state, provincial, terriorial, dependent) ( marcgt )
born-digital ( sobekcm )
Electronic Thesis or Dissertation
Computer Engineering thesis, Ph.D.

Notes

Abstract:
Spatiotemporal databases deal with geometries changing over time. Recently, moving objects like moving points and moving regions have been the focus of research. They represent time-dependent geometries that continuously change their location and/or extent and are interesting for many disciplines including the geosciences, geographical information science, moving objects databases, location-based services, robotics, and mobile computing. So far, a few moving object data models and query languages have been proposed. Each of them supports either exclusively historical movements relating to the past or exclusively predicted movements relating to the future. Thus, the query support for each model is limited by the type of supported movements. This presents a problem in modeling the dynamic nature of a moving object when both its known historical movement and its predicted future movement are desired to be simultaneously managed and made available for spatiotemporal operations and queries. Furthermore, current definitions of moving objects are too general and rather vague. It is unclear how a moving object is allowed to move or evolve through space and time. That is, the properties of movement (like its continuity) have not been precisely specified. It is also unclear how, in a database context, future predictions of a moving object can be modeled taking into account the inherent uncertainty of future evolution. Moreover, implementations of spatiotemporal data types and operations are rare and their integration into extensible database management systems has been so far nonexistent. In this research, we present a new type system and query language called Moving Balloon Algebra consisting of a moving object model that is able to represent the dynamic nature of moving objects while providing integrated and seamless support for both historical and predicted movements of moving objects. The goal is to go beyond existing moving object models by collectively integrating existing functionalities as well as introducing new ones. From a conceptual standpoint, this algebra provides a formal definition of novel spatiotemporal data types, operations, and predicates as well as introduces new types of spatiotemporal queries. Beside these conceptual contributions, an implementation of the algebra is provided in the form of a database-independent type system library, and its integration into a relational database management system is demonstrated. ( en )
General Note:
In the series University of Florida Digital Collections.
General Note:
Includes vita.
Bibliography:
Includes bibliographical references.
Source of Description:
Description based on online resource; title from PDF title page.
Source of Description:
This bibliographic record is available under the Creative Commons CC0 public domain dedication. The University of Florida Libraries, as creator of this bibliographic record, has waived all rights to it worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
Thesis:
Thesis (Ph.D.)--University of Florida, 2008.
Local:
Adviser: Schneider, Markus.
Electronic Access:
RESTRICTED TO UF STUDENTS, STAFF, FACULTY, AND ON-CAMPUS USE UNTIL 2010-08-31
Statement of Responsibility:
by Reasey Praing.

Record Information

Source Institution:
UFRGP
Rights Management:
Copyright Praing, Reasey. Permission granted to the University of Florida to digitize, archive and distribute this item for non-profit research and educational purposes. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder.
Embargo Date:
8/31/2010
Classification:
LD1780 2008 ( lcc )

Downloads

This item has the following downloads:


Full Text













x x x x
A B C D

Figure 2-3. Examples of moving objects. A) A single-component moving point object. B) A
single-component moving region object. C) A multi-component moving point object.
D) A multi-component moving region object.


2-3D illustrate corresponding multi-component objects. An application example for Figure 2-3D

is a brush fire that originates at different locations at different times.

The type constructor z is defined in a very general way and allows any kind of temporal

function. For instance, we could define a function that maps each time instant represented by

a rational number to the point (1, 1) and each time instant represented by an irrational number

to the point (2,2). However, this does not describe movement, and hence the question is which

spatiotemporal functions represent valid movements. For example, the unrestricted definition of t

also allows a moving point to move continuously (Figures 2-3A, 2-3B), disappear for periods of

time (Figure 2-4A, 2-4E), appear instantly (Figures 2-4B, 2-4F), have spatial outliers (Figure 2-

4D), or have instantaneous jumps (Figures 2-4C, 2-4G). A definition is missing that precisely

states which spatiotemporal functions represent allowed movements and which functions do

not conform to our intuitive understanding of movement. Furthermore, this approach does not

support future predictions of moving objects. In our model, we employ a similar approach of

using a type constructor to construct spatiotemporal types for representing historical movements

of moving objects. However, we take the extra step of precisely specifying the properties of

object movements as well as describing how an object moves and evolves in the past and how its

future predicted movement and extension can be represented.

Based on the moving objects model just described, the STP model presented in [22]

provides spatiotemporal predicates for past movements and is able to characterize the temporal


time 1


time 1


time i









algorithm BPredEvaluator(bol, bo2, Q, qwc)
input: two balloon objects bo1 = (tt,ls, ob jpbbl,hi, pi) and bo2 = (t2, ls2,objpbb2, h2 P2),
topological string pattern Q that has to be checked with respect to bol and bo2, flag
qwc indicating whether Q includes wildcards true or True
output: true if Q matches actual development; false, otherwise
begin
if not Tlntersects(lsl, ls2)
then return false
else
ObjectDevelopment := CertainDev(STDevDetermination(h1,h2));
dev := ""
if tl < t2 then
dev := UncertainDev(STDevDetermination(pl,h2));
else if tl > t2 then
dev := UncertainDev(STDevDetermination(hl,p2));
endif; ObjectDevelopment := ObjectDevelopment o dev;
ObjectDevelopment := ObjectDevelopment o UncertainDev(STDevDetermination(pl,p2));
(ObjectDevelopment,owc) := NormalizeDev(ObjectDevelopment);
return PatternMatching(Q,qwc,ObjectDevelopment,owc)
endif
end BPredEvaluator.

Figure 5-31. Balloon predicate evaluator algorithm.


uncertain development respectively and then returns the corresponding string value. Depending

on the relative comparison between tl and t2 (local present instants that separate the historical

and predicted movements), the corresponding development between the historical movement

of an object and a predicted movement of the other object is determined and appended to the

object development. Next, we append the development between the predicted movements of both

balloon objects and normalize the object development. The final step is to employ the pattern

matching process by calling PatternMatching and return the final result.

With an implementation of this algorithm, one can pose a query consisting of both tempo-

rally certain and uncertain developments. For example, assume that the prefixes c and u denote

certain and uncertain development respectively. A query string "cDisjoint uDi\iim'" asked to

verify whether the development has always been and will always be disjoint. A query string

"True ulnside True" asked whether the development Inside exists sometimes in the future.









of two region2D objects intersect, this can, for example, indicate that they share a common area

and/or a common boundary. In this case, intersecting line segments have especially an effect

on the overlap numbers of the segments of both region2D objects. In Section 5.2.1.2 we have

tacitly assumed that any two segments from both region2D objects are either disjoint, or equal,

or meet solely in a common end point. Only if these topological constraints are satisfied, we

can use the concepts of overlap numbers and segment classes for a plane sweep. But the general

case in particular allows intersections. Figure 5-4 shows the problem of segment classes for two

intersecting segments. The segment class of s [s2] left of the intersection point is (0/1) [(1/2)].

The segment class of si [s2] right of the intersection point is (1/2) [(0/1)]. That is, after the

intersection point, seen from left to right, s, and s2 exchange their segment classes. The reason

is that the topology of both segments changes. Whereas, to the left of the intersection, s, (s2)

is outside (inside) the region to which s2 (sl) belongs, to the right of the intersection, sl (s2) is

inside (outside) the region to which s2 (sl) belongs.

In order to be able to make the needed topological detections and to enable the use of

overlap numbers for two general regions, in case that two segments from two different regions

intersect, partially coincide, or touch each other within the interior of a segment, we pursue a

splitting strategy that is executed during the plane sweep "on the fly". If segments intersect,

they are temporarily split at their common intersection point so that each of them is replaced

by two segments (that is, four halfsegments) (Figure 5-5A). If two segments partially coincide,

they are split each time the endpoint of one segment lies inside the interior of the other segment.

Depending on the topological situations, which can be described by Allen's thirteen basic

relations on intervals [1], each of the two segments either remains unchanged or is replaced

by up to three segments (that is, six halfsegments). From the thirteen possible relations, eight

relations (four pairs of symmetric relations) are of interest here (Figure 5-5B). If an endpoint of

one segment touches the interior of the other segment, the latter segment is split and replaced by

two segments (that is, four halfsegments) (Figure 5-5C). This splitting strategy is numerically

stable and thus feasible from an implementation standpoint since we assume numerically









CHAPTER 4
DISCRETE MODEL OF THE MOVING BALLOON ALGEBRA

In this chapter, we describe how we can define a finite representation for all the data types

of the abstract model of the Moving Balloon Algebra. The main idea behind this chapter is to

determine a finite set of information (that is, defined by a discrete type) which can be used to

represent an infinite set of values (that is, defined by an abstract type). For example, we can

represent a segment which consists of an infinite set of points by two endpoints which is a

finite set of information; yet we can interpolate these two endpoints to obtain any points on the

segment. To define a finite representation for the Moving Balloon Algebra, we must define a

discrete type for each abstract type of the algebra. In doing so, our approach is to start from

the bottom, most basic level of the algebra's data type hierarchy and work our way to the top.

We describe a finite representation for non-temporal data types of the algebra in Section 4.1.

For movement over time, we make use of a concept called sliced representation to define a

finite representation for basic spatiotemporal data types in Section 4.2. Finally, we show how

the balloon data types and spatiotemporal balloon data types can be finitely represented in

Section 4.3. The work in this chapter has been included in one of our technical reports [52] in

preparation for a journal submission.

4.1 Non-Temporal Data Types

Non-temporal data types include base data types, time data types, and spatial data types. We

described their finite representation in the following subsections.

4.1.1 Base Data Types and Time Data Types

Base data types such as int, real, string, and bool normally have their corresponding discrete

types directly implemented in programming languages. The time data type instant can be

implemented using the real number implementation to express the continuous time domain. All

of the data types includes the undefined value denoted by I which represents the empty object.

The empty object is needed to represent the case that an operation yields an "empty" result.

For example, the intersection of two parallel segments yields an empty object. Therefore, any









time
Disjoint(Pp,Rp)
meet(R -- - -
Inside(Pp,Rp) PP
meet(Pp,R -------- -----------
Disjoint(Pp,Rp) Rp
Disjoint(PRp) Y

Disjoint(PhRi Rh

x

Figure 3-13. Future crossing situation between a balloonpp object P and a balloonpr object R.


Disjoint, > meet, > Inside, > meet, > Disjoint, (the subscript indicates uncertain pred-

icates or predicates that involve predictions). However, these spatial and spatiotempo-

ral predicates may represent relationships between different parts of the balloon objects.

For instance, the first Disjoint, predicate is actually a temporal composition of three

different types of disjointedness between the corresponding parts of P and R, that is,

Disjoint (Ph,Rh) > Disjoint (Ph, Rp) > Disjoint,(Pp, Rp). The rest of the predicates represent

relationships between the prediction parts of both objects. Hence, we can expand the orig-

inal sequence as Disjoint (Ph, Rh) > Disjointu (Ph, Rp) > Disjoint, (Pp, Rp) > meet,,(Pp, Rp) >

Il\id, ,,(Pp,Rp) > meet,(Pp,Rp) > Disjoint,(Pp,Rp). In this sequence, the subsequence

Disjoint,,(Pp,Rp) > meet,,(Pp, Rp) > Inside,,(Pp,Rp) > meet,,(Pp, Rp) > Disjoint,,(Pp,Rp) can

be represented by an STP Cross,(Pp, Rp) since they are applied to the same prediction parts of

the two balloon objects. Thus, we have Disjoint(Ph, Rh) >Disjoint (Ph, Rp) > Cross,,(Pp,Rp).

As a result, we are left with a sequence of three STPs each applied to different combination

pairs of parts of the balloon objects. This example illustrates that balloon predicates can be

appropriately modeled by sequences of three STPs between the related parts of the objects.

Hence, we can specify balloon predicates based on the traditional STPs as follows:


Definition 3.14 : Let P and R be two balloon objects of type Q(ali, P1) and n((X2, 32)

respectively. A balloon predicate between P and R is a temporal composition of traditional

spatiotemporal predicates:










annotated with a label XY where X e {A aA,A } and Y E {B 3B,B }. A label represents a

matrix predicate X n Y 4 0 serving as a discriminator. For example, the label XY = A B denotes

the matrix predicate A n aB 4 0. If the evaluation of a matrix predicate yields false, we move to

the left child; otherwise, we move to the right child. Each leaf node represents the 9-intersection

matrix number of a topological predicate.

The following definition specifies measures that we use to summarize and interpret these

results. We are especially interested in the average number of matrix predicates to be evaluated.

AOB AOBo

A AB
SAaB AOaB
2 3 1 ARB
1 AB AB AB-
4 5
2 3 4 5 6 7

A B
AOBo



AOaB AOaB

A aB AB
AOR A AB
1 2 A aB A aB
A aB A aB A- B A-aB
3 4 5 6
7 8 9 10 11 12 13 14

C

Figure 5-22. Minimum cost decision trees. A) For the 5 topological predicates of the point/point
case. B) For the 7 topological predicates of the point/region case. C) For the 14
topological predicates of the point/line case under the assumption that all
topological predicates occur with equal probability.



Definition 5.9 : Let CMCDT denote the total cost of an MCDT Mcp according to Def-

inition 5.8. Let nc,p with a, 3 E {point2D, line2D, region2D} be the number of 9IMs of the

topological predicates between the types a( and 3, IMi with 1 < i < n(,p be a 9IM, and dk be the
cP,









[59] M. Schneider and T. Behr. Topological Relationships between Complex Spatial Objects.
ACM Trans. on Database Systems (TODS), 31:39-81, 2006.

[60] A.P. Sistla, O. Wolfson, S. Chamberlain, and S. Dao. Modeling and Querying Moving
Objects. In Int. Conf on Data Engineering, pages 422-432, 1997.

[61] E. Tossebro and R.H. Giting. Creating Representations for Continuously Moving Regions
from Observations. In Int. Symp. on Spatial and Temporal Databases (SSDT), pages
321-344, 2001.

[62] M. E Worboys and P. Bofakos. A Canonical Model for a Class of Areal Spatial Objects. In
Int. Symp. on Advances in Spatial Databases, pages 36-52, 1993.









(i) VF [boundpoi-shared] = 3F n aG 7 0
(ii) aF G #n G- 0 F nG G 0 A F nG # 0
(iii) F nOaG#0 = F nGo 0 AF nG #0
(iv) aF n G #0 = FO n G 0 A F n G 7 0
(v) FO n G 0 = F n G 0 A F n G # 0
Proof. Statement (i) can be shown by considering the definition of boundpoishared. This
flag is true if any two halfsegments of F and G share a single meeting or intersection point.
Hence, the intersection of both boundaries is non-empty. The proofs for (ii) to (v) require point
set topological concepts. Statements (ii) and (iii) follow from Lemma 5.3.6 in [59]. Statements
(iv) and (v) result from Lemma 5.3.5 in [59]. o
The following theorem collects the results we have already obtained so far and proves the
lacking parts of the nine matrix predicate characterizations.

Theorem 5.1 : Let F, G E region and VF and VG be their segment classification vectors.
Then the matrix predicates of the 9-intersection matrix are equivalent to the following segment
class characterizations:
(i) FnG n G 0 # vF[(0/2)] V VF[(2/0)] V VF[(1/2)] V VF[(2/1)] V

vG[(1/2)] V vG[(2/1)]
(ii) FnaOG 0 vG[(1/2)] V vG[(2/1)]
(iii) FnG 0 vF[(0/1)] V vF[(1/0)] V VF[(1/1)] V VG[(1/2)] V VG[(2/1)]
(iv) 3F n G 0 vF[(1/2)] V vF[(2/1)]
(v) F n OG 4 0 = VF[(0/2)] V VF[(2/0)] V VF[(1/1)] V vF[boundpoi shared]
(vi) 3F n G 0 VF[(0/1)] V VF[(1/0)]
(vii) F- G # 0 vF[(1/2)] V VF[(2/1)] V VF[(1/1)] V VG[(O/1)] V VG[(1/O)]
(viii) F-n GJ 0 + VG[(O/1)] V VG[(1/O)]
(ix) F n G # 0 < true
Proof. For (i), the forward implication corresponds to Lemma 5.7(i). The backward
implication can be derived from Lemma 5.6(v) for (0/2)- and (2/0)-segments of F (and G). For









[15] M. J. Egenhofer and J. Herring. Categorizing Binary Topological Relations Between
Regions, Lines, and Points in Geographic Databases. Technical report, National Center for
Geographic Information and Analysis, University of California, Santa Barbara, 1990.

[16] M. J. Egenhofer and D. Mark. Modeling Conceptual Neighborhoods of Topological
Line-Region Relations. Int. Journal of Geographical Information Systems, 9(5):555-565,
1995.

[17] M.J. Egenhofer, E. Clementini, and P. Di Felice. Topological Relations between Regions
with Holes. Int. Journal of Geographical Information Systems, 8:128-142, 1994.

[18] M. Erwig, R.H. Giiting, M. Schneider, and M. Vazirgiannis. Abstract and Discrete
Modeling of Spatio-Temporal Data Types. In ACM Symp. on Geographic Information
Systems (ACM GIS), pages 131-136, 1998,.

[19] M. Erwig, R.H. Giiting, M. Schneider, and M. Vazirgiannis. Spatio-Temporal Data Types:
An Approach to Modeling and Querying Moving Objects in Databases. Geolnformatica,
3,(3,):265-291, 1999,.

[20] M. Erwig and M. Schneider. Developments in Spatio-Temporal Query Languages. In IEEE
Int. Workshop on Spatio-Temporal Data Models and Languages, pages 441-449, 1999.

[21] M. Erwig and M. Schneider. Visual Specifications of Spatio-Temporal Developments. In
15th IEEE Symp. on Visual Languages (VL), pages 187-188, 1999.

[22] M. Erwig and M. Schneider. Spatio-Temporal Predicates. IEEE Trans. on Knowledge and
Data Engineering, 14,(4,):1-42, 2002,.

[23] Martin Erwig, Martin Erwig, and Markus Schneider. Query-By-Trace: Visual Predicate
Specification in Spatio-Temporal Databases. In The Fifth Working CO',f, 'r, l on Visual
Database Systems, volume 168, pages 199-218, 2000.

[24] ESRI Spatial Database Engine (SDE). Environmental Systems Research Institute, Inc.,
1995.

[25] L. Forlizzi, R.H. Gtiting, E. Nardelli, and M. Schneider. A Data Model and Data Structures
for Moving Objects Databases. In ACM SIGMOD Int. Conf on Management of Data, pages
319-330, 2000.

[26] K. Hinrichs G. Trajcevski, O. Wolfson and S. Chamberlain. Managing Uncertainty in
Moving Objects Databases. ACM Trans. on Database Systems (TODS), 29:463-507, 2004.

[27] A. Ginzburg. A Procedure for Checking Equality of Regular Expressions. Journal of the
Association for Computing Machinery, 14(2):355-362, 1967.

[28] D. Gusfield. Algri,1iim\ on Strings, Trees, and Sequences: Computer Science and
Computational Biology. Cambridge University Press, 1997.









Table 5-5. Summary of the MCDTs for all type combinations on the basis of equal probability of
occurrence of all topological predicates.
d, with k
Type combination na,p 1 2 3 4 5 6 7 8 9 C,p AC,p CMCDT ACADT RACCDT
point/point 5 0 3 2 0 0 0 0 0 0 40 24 12 2.40 10.00
line / line 82 0 0 0 0 0 48 30 4 0 656 332 530 6.46 1.95
region / region 33 0 0 0 3 22 8 0 0 0 264 136 170 5.15 3.79
point/line 14 0 0 2 12 0 0 0 0 0 112 60 54 3.86 6.43
point/region 7 0 1 6 0 0 0 0 0 0 56 32 20 2.86 8.94
line / region 43 0 0 0 3 15 19 6 0 0 344 176 243 5.65 3.21


decision tree (several optimal trees with the same total cost may exist) for the specified set of

9-intersection matrices and the given probability distribution. One can verify this by applying our

algorithm to the eight 9-intersection matrices for two simple regions and the same probability

distribution as specified in [10]. Our algorithm produces an optimal tree with the total cost of

2.13 while the so-called "refined cost method" in [10], which uses thinned out matrices, produces

a tree with the total cost of 2.16.

We can observe the following relationship between MCDTs and thinned out matrices:


Lemma 5.9 : For each combination of spatial data types a and 3, the total cost of its

minimum cost decision tree (given in Table 5-5) is greater than or equal to the total cost of all its

thinned out matrices (given in Table 5-3), that is,

CMCDT > CMT
aP -aP

Proof. The proof is given by contradiction. Assume that for a spatial data type combination

the total cost of its MCDT is less than the total cost of all its thinned out matrices. Consequently,

there must be at least one path from the root to a leaf in the MCDT that contains a smaller

number of matrix predicates than the number of matrix predicates in the thinned out matrix

for the topological predicate associated with that leaf. This implies that we can identify this

topological predicate with a smaller number of matrix predicate decisions than the number of

matrix predicates in its thinned out matrix. But this contradicts the definition of a thinned out

matrix. O









These are just a few simple examples. Many more elaborated and complex query strings can be

constructed to express more complex scenarios.

5.5 Database Integration

It is one of our main objectives that our implementation of the Moving Balloon Algebra

would be available as an extension package to any extensible DBMS. The benefit of this feature

is not only to broaden the availability and usability of the algebra but also to show a way for other

algebra to be database system independent as well. This requirement entails a number of design

criteria that need to be taken into account when developing such an algebra.

First, one should design and develop an algebra, its data types and operations from an

abstract data types point of view. This allows a clear and comprehensible design of the data types

and operations as well as a seamless transformation of the design into implementable classes and

methods.

Second, one should consider a number of requirements pertaining to the extensibility

option of DBMSs of interest. These includes the ability to create user-defined types (UDT) and

user-defined functions (UDF), large object (LOB) management, external procedure invocations,

programming language and type library compatibility, and storage or object size limitations.

Third, the mechanism and the environment in which operations are executed should be taken

into account. Some criteria includes whether operations will be internally executed in memory

by requiring all argument objects to be entirely loaded in main memory (memory execution) or

externally executed by loading only required parts of argument objects from a database at a time

(database execution). Both alternatives have advantages and disadvantages depending on other

factors such as the nature of the operations, the amount of available main memory, the size of

argument objects, the speed of the database communication link, etc.

With these criteria in mind, our approach has been to develop the algebra in three abstraction

levels (abstract, discrete, and implementation levels) to allow for a clear and comprehensible

specification of the data types and operations. Our specific implementation of the Moving

Balloon Algebra, which results in a software library package called MBA, is done by using an









ACKNOWLEDGMENTS

I thank the chair and members of my supervisory committee for their mentoring, my

colleagues for their intellectual support, and the Computer Science department as well as the

National Science Foundation for their financial support. I thank my parents, my sisters and

brother for their loving encouragement, which motivated me to complete my study.









moving confidence distributions of both objects. Thus, we can distinguish two different types

of information here. One is the spatiotemporal relationship between the moving geometries,

in this case the predictions, and another is the quantification of the chance that there will be an

interaction between the two (actual) objects (the plane and the hurricane) in the future. We treat

each of these types of relationship information separately so that we can present the model in

its most simplest and understandable form as possible. In Section 3.4.1, we define predicates

between balloon objects (balloon predicates) and explore their properties by focusing only on

the relationship between their moving geometries. Hence, we can treat the future prediction

component (p(3) as simply T(3). Therefore, the balloon data type constructor can be written for

this purpose as Q(ca, 3) = 0(c) x T(3). For a balloon object b = (bh, bp) E Q(ua, ), the first

moving object bh, called the history part, describes the historical movement of b. The second

moving object bp, called the prediction part, describes the moving geometry of a prediction of

the balloon object. For the treatment of the second type of information, we provide our reasoning

about the potential future interaction between the actual objects in Section 3.4.2.

3.4.1 Modeling Balloon Predicates

In order to help explaining the method for defining our balloon predicate model, we first

describe our general mechanism in Section 3.4.1.1. We then discuss how a balloon predicate

can be specified using traditional STPs in Section 3.4.1.2. Finally, we determine the canonical

collection of balloon predicates in Section 3.4.1.3.

3.4.1.1 General mechanism for balloon predicates

The approach we present here is based on two main goals. The first goal is to develop a

formalism that works independently of the balloon data types to which it is applied. It is desired

that the formalism can be equally applied to any pair of balloon objects irrespective of their

data types. The second goal concerns the importance of making use of existing definitions of

STPs [22]. Since balloon objects are constructed based on moving objects. It is only consistent

to have balloon predicates be constructed from STPs. With this goal, we can benefit from both

theoretical and implementation advantages such that the formalism and implementation of








Table 5-1. Static and dynamic halfsegment sequences of the regions R1 and R2 in Figure 5-6.
RI dynamic sequence part (h41, f) (h (42 )
RI static sequence part (h t) (h2, f) (h3, t) (h, f) (h t)
(h 2,f) (h4, f) (hs,, f) (h,,, f) (h t)
R2 static sequence part (h/ t) (hV2, f) (h2, f) (h3, f) (h3,f)
(h ,t)
R2 dynamic sequence part (hl, t) (h1,2, t) (h1,2 t)


To illustrate the splitting process in more detail, we consider two region2D objects RI and
R2. In general, we have to deal with the three cases in Figure 5-5. We first consider the case

that the plane sweep detects an intersection. This leads to a situation like in Figure 5-6A. The
two static and the two dynamic halfsegment sequences of R1 and R2 are shown in Table 5-1.
Together they form the event point schedule of the plane sweep and are processed by a parallel
object traversal. Before the current position of the sweep line (indicated by the vertical dashed
line in Figure 5-6), the parallel object traversal has already processed the attributed halfsegments
(h1 ,t), (h2,f), (hl ,t), and (hl2,f) in this order. At the current position of the sweep line,

the parallel object traversal encounters the halfsegments (h3, t) and (hl4, f). For each left
halfsegment visited, the corresponding segment is inserted into the sweep line status according

to the y-coordinate of its dominating point and checked for intersections with its direct upper
and lower neighbors. In our example, the insertion of s4 leads to an intersection with its upper
neighbor v1. This requires segment splitting; we split v, into the two segments v1,1 and v1,2 and

s4 into the two segments s4,1 and S4,2. In the sweep line status, we have to replace v1 by vi,i and

S4 by s4,1 (Figure 5-6B). The new halfsegments (h 4,1, f), (h4,2, f), and (h4,2, f) are inserted
into the dynamic halfsegment sequence of R1. Into the dynamic halfsegment sequence of R2, we
insert the halfsegments (h1, t), (h1,2 t), and (h1,2, t). We need not store the two halfsegments

(h,1, f) and (h1 t) since they refer to the "past" and have already been processed.
On purpose we have accepted a little inconsistency in this procedure, which can fortunately
be easily controlled. Since, for the duration of the plane sweep, s4 (v1) has been replaced by s4,1

(vi,l) and s4,2 (V1,2), the problem is that the static sequence part of Ri (R2) still includes the now
invalid halfsegment (hr4, f) ((hl, t)), which we may not delete (see Figure 5-6B). However, this









The exploration algorithm for this case is given in Figure 5-11. The while-loop is executed

until both objects have been processed (line 9) and as long as not all topological flags have been

set to true (lines 9 to 13). If a single left (right) halfsegment of F (line 14) has to be processed

(the same for G (line 36)), we insert it into (delete it from) the sweep line status (lines 15 and 16).

The deletion of a single right halfsegment further indicates that it is not shared by G (line 16). If

the current dominating point, say v, is unequal to the previous dominating point of F (line 17)

and if the operation lookahead finds out that v is also unequal to the dominating point of the next

halfsegment ofF (line 18), v must be a boundary point ofF (line 19). In this case, we perform

three checks. First, if v coincides with the current boundary point in G, both objects share a part

of their boundary (lines 20 to 21). Second, otherwise, if v is equal to the current dominating

point, say w, in G, w must be an interior point of G, and the boundary of F and the interior of G

share a point (lines 22 to 23). Third, otherwise, if v is different from the dominating point of the

next halfsegment in G, F contains a boundary point that is disjoint from G (lines 24 to 25). If v

has not been identified as a boundary point in the previous step (line 29), it must be an interior

point of F. In this case, we check whether it coincides with the current boundary point in G (lines

30 to 31) or whether it is also an interior point in G (lines 32 to 33). If a halfsegment belongs to

both objects (line 38), we can conclude that it is shared by them (line 39). Depending on whether

it is a left or right halfsegment, it is inserted into or deleted from the sweep line status (line 40).

Lines 41 to 45 (46 to 50) test whether the dominating point v of the halfsegment is a boundary

point of F (G). Afterwards, we check whether v is a boundary point of both objects (lines 51 to

52). If this is not the case, we examine whether one of them is a boundary point and the other

one is an interior point (lines 54 to 59). Lines 62 to 66 handle the case that exactly one of the two

halfsegment sequences is exhausted.

Let 1 (m) be the number of halfsegments of F (G). Segments of both objects can intersect

or partially coincide (Figure 5-5), and we handle these topological situations with the splitting

strategy described in Section 5.2.1.3. If, due to splitting, k is the total number of additional

halfsegments stored in the dynamic halfsegment sequences of both objects, the while-loop is









element of the set MPoi, and the sequence vk corresponds to the an element of the type point

defined in the discrete model (Section 4.2.2.1). For uniqueness and minimality of representation

we require in addition that

radjacent(ik, ii) = (Vk # V1)

The reason for this requirement is that we can merge two adjacent units with the same unit

function representation into a single unit over the merged time interval.

The representation of a moving line or a moving region is in principle the same as for

moving points. But due to the higher complexity of these types, the unit function of a uline

or a region value is more complex. It essentially describes a line or a region whose vertices

move linearly (i.e., whose vertex positions are linear functions of time), such that for all instants

in the unit interval the evaluation of the vertex functions yields a correct line or region value

respectively.

In general, a uline unit consists of a sequence of moving unit segments where each moving

unit segment is an element of the set MSeg defined in Section 4.2.2.2. A moving unit segment

ms = (u, v) with u, vE MPoi is a pair of moving unit single points that are coplanar in the

3D space. Consequently, a moving unit segment that is restricted to a time interval forms a

trapezium, or, in the degenerate case, a triangle in the 3D space. Rotations of segments are not

permitted since this leads to curvilinear lateral surfaces (viewed from the 3D perspective) whose

computational treatment is rather difficult (see Figure 4-4 and Section 4.2.2.2). The data structure

of a moving line ml E mapping(uline) and a moving region mr E mapping(uregion) can now be

described as follows:

ml = (n, s,objpbb, ul,...,uln))

= (n, (til,.. .,tik), ((xl, ), (Xuyu)), ((unitpbbl,cl, i,vi), ..., (unitpbbn, cn,in,n)))

mr = (n, Is,obj pbb, (url,..., urn))

= (n, (til,... tik), ((x, Y), (Xu, Yu)), ((unit-pbbl, c, ii,vi),... (unit-_pbbn, cn, in, Vn)))
The values n, Is, objpbb, tij, unitpbbl, and il have the same meaning and properties as for

moving points. In particular, we have the same order on unit intervals as for moving points, and









a time between t\ and t2. However, we do not know and also cannot uniquely infer what kind of

basic spatiotemporal relationship exists between t\ and t2. As an example, let us assume that at

both times t, and t2 we find the topological relationship meet between two region values. What

can have happened in between? Three alternatives are possible leading to either the development

meet > Disjoint > meet or the development meet > Overlap > meet or the development meet >

Meet > meet, which is equal to Meet. To solve this problem, we take a "sample" and compute

the topological relationship at time (t\ + t2)/2. Then we determine the corresponding period

predicate by means of the function PeriodPred. This is done for all consecutive pairs of time

instants in TList.

The computation of the spatial object at times I and r at the beginning of the algorithm

takes time O(zi logzi) and O(2 logz2), respectively, where zi and Z2 denote the number of unit

elements of the two units. Hence, the algorithm TopRel requires time O((zi + Z2) log(zi + z2)).

Step 1 includes two nested loops executing the function Contact, which runs in constant time.

In total, this step requires O(zi Z2) time. Step 2 needs O(nlogn) time for sorting the n elements

of TList and removing the duplicates. Step 3 computes approximately n times the function

TopRel, which requires O(n (zi + z2) log(zi + z2)) time. Hence, the algorithm Unitlntersect

needs time O(zi -Z2 + nlogn + n (zi + Z2) log(zi + Z2)). With z = max(zl, z2), this is equal to

O(z2 + nlogn + n zlogz) = O(n (z2 + log n)). In this case, this leads to a runtime complexity of

O(bnmax (ziax + lognmax)) for the algorithm FunctionlValut dRtfin mn, nt where b is the number

of matching unit intervals, Zmax is the maximum number of unit elements in a unit of both moving

objects, and nmax is the maximum number of changes in the topological relationships between

unit elements of matching units.

5.3.4 Pattern Matching with Query Predicate

At this stage, the actual temporal topological behavior, i.e., the development, of the two

moving objects under consideration is known and represented as a string, called the development

string. The reason for this kind of representation is to reduce the problem of evaluating a









is not a problem due to the following observation. If we find a right halfsegment in the dynamic

sequence part of a region2D object, we know that it stems from splitting a longer, collinear, right

halfsegment that is stored in the static sequence part of this object, has the same right end point,

and has to be skipped during the parallel object traversal.

For the second and third case in Figure 5-5, the procedure is the same but more splits can

occur. In case of overlapping, collinear segments, we obtain up to six new halfsegments. In case

of a touching situation, the segment whose interior is touched is split.

5.2.2 The Exploration Phase for Collecting Topological Information

For a given scene of two spatial objects, the goal of the exploration phase is to discover

appropriate topological information that is characteristic and unique for this scene and that is

suitable both for verification queries (query type 1) and determination queries (query type 2). Our

approach is to scan such a scene from left to right by a plane sweep and to collect topological

data during this traversal that later in the evaluation phase helps us confirm, deny, or derive the

topological relationship between both objects. From both phases, the exploration phase is the

computationally expensive one since topological information has to be explicitly derived by

geometric computation.

Our research shows that it is unfavorable to aim at designing a universal exploration

algorithm that covers all combinations of spatial data types. This has three main reasons.

First, each of the data types point2D, line2D, and region2D has very type-specific, well known

properties that are different from each other (like different dimensionality). Second, for each

combination of spatial data types, the topological information we have to collect is very specific

and especially different from all other type combinations. Third, the topological information

we collect about each spatial data type is different in different type combinations. Therefore,

using the basic algorithmic concepts of Section 5.2.1, in this section, we present exploration

algorithms for all combinations of complex spatial data types. Between two objects of types

point2D, line2D, or region2D, we have to distinguish six different cases, if we assume that the








Lemma 5.6 : Let F, G E region and VF and VG be their segment classification vectors. Then
we can infer the following implications and equivalences between segment classes and matrix
predicates:

(i) vF[(0/1)] V vF[(1/0)] a aFnG- 0
(ii) VG[(O/1)] V VG[(1/0)] F Fn G G 0

(iii) vF[(1/2)] V vF[(2/1)] = F n G' o0
(iv) VG[(1/2)] V VG[(2/1)] F FnoG 0

(v) VF[(0/2)] V VF[(2/0)] j F n aG 0 A F nGO 0w
(vi) VF[(1/1)] ~ F n G 0 A Fn G- 0 A F- n G 4
Proof. According to Definition 5.6(i) and (ii), the left side of (i) is equivalent to the
expression 3f E H(F) : pts(f.s) C G This is equivalent to 3F n G- # 0. The proof of
(iii) is similar and based on Definition 5.6(iii) and (iv); only the term G has to be replaced
by G. The proof of (ii) can be obtained by swapping the roles of F and G in (i). Similarly,
the proof of (iv) requires a swapping of F and G in (iii). According to Definition 5.6(v) and
(vi), the left side of (v) is equivalent to the expression 3f E H(F) 3g E H(G) : f.s = g.s A
((f.ia A g.ia) V (-f.ia A -g.ia)). From the first element of the conjunction, we can (only)
conclude that 3F n 3G # 0. Equivalence does not hold since two boundaries can also intersect
if they only share single intersection or meeting points but not (half)segments. The second
element of the conjunction requires that the interiors of both region objects are located on
the same side. Hence, F n G # 0 must hold. Also this is only an implication since an
intersection of both interiors is possible without having any (0/2)- or (2/0)-segments. According
to Definition 5.6(vii), the left side of (vi) is equivalent to the expression 3f E H(F) 3g E H(G) :
f.s = g.s A ((f.ia A -lg.ia) V (-if.ia A g.ia)). The first element of the conjunction implies
that aF n aG # 0. The second element of the conjunction requires that the interiors of both
region objects are located on different sides. Since the definition of type region disallows (1/1)-
segments for single objects, the interior of F must intersect the exterior of G, and vice versa. This









CHAPTER 3
ABSTRACT MODEL OF THE MOVING BALLOON ALGEBRA

In this chapter, we describe the abstract model which is the highest level of abstraction of

the Moving Balloon Algebra' Here, we specifically focus on the essence of the conceptual

modeling problem without impeded by any representation constraint. We present the abstract

model by first describing how we can model and specify corresponding data types for historical

and predicted movements taking into account the continuity property of movement and the

inherent uncertainty of predicted movement. These concepts are then used to define high-

level data types for our algebra. This includes the introduction of balloon objects to represent

snapshots of the knowledge of movement and the concept of a moving balloon object to model

the continuous stream of these snapshots over time. Next, we present operations on the Moving

Balloon Algebra followed by our spatiotemporal predicate model. Finally, we describe how our

algebra can be used in different types of spatiotemporal queries.

3.1 Modeling Historical and Predicted Movements

In this section, we specify the characteristic features of spatial object movement and deal

with the problem of handling past and future movements in a database context. In Section 3.1.1,

we describe how spatial objects can move by identifying some fundamental properties of

movement. Especially, we define what continuous movement of a spatial object means. The

knowledge gained from this section enables us in Section 3.1.2 to directly derive (abstract) data

types for historical movements of moving objects. Modeling future movement means dealing

with the future and is inherently afflicted with the feature of uncertainty. In Section 3.1.3, we

present our view of this problem in a database context and present (abstract) data types for

predicted movements as a solution. All these concepts will be used in Section 3.2 to model



1 The research work in this chapter has been included in one of our technical reports [53] in
preparation for a journal submission.









as an argument. Since only a locator to a blob is passed instead of the entire blob, this allows for

a flexible execution of the operation in either memory execution or database execution mode. To

take advantage of this, our algebra implementation allows both types of execution for operations

on objects stored in a database. The type of execution, specifically how an object is loaded to

perform an operation, is dictated by the choice of storage option for the object at construction.

Our implementation offers three different storage options for our moving balloon objects namely

memory, blob, and mSLOB options.

In the memory storage option, objects are not persistent in that they only exist in memory

for the duration of the program execution. This option is also required for memory execution

mode of database objects where objects are loaded entirely into memory. The blob storage option

allows objects to be stored persistently and directly in database blobs. This option facilitates

memory execution mode since each blob needs to be loaded completely into memory to construct

a memory based object through a deserialization process. This option is preferable for small-

sized objects that do not require frequent update (update operations require writing back to

database blobs through a serialization process). To enable database execution mode, our mSLOB

storage option makes use of an intermediate layer called mSLOB for storage management.

mSLOB is our implementation of a multi-structured large object management concept for

database blobs [40]. mSLOB provides component-based read and write access to structured and

multi-structured objects stored in blobs. Thus, it allows us to read and write any component of

our objects on demand without the need to load the entire objects into main memory. Therefore,

the mSLOB storage option is preferable for large objects and frequently updated objects.

Figure 5-33 illustrates the application system architecture in which a number of algebra can be

integrated in a DBMS with or without mSLOB.

With our algebra integrated in a DBMS and our UDTs and UDFs registered, we can now

create tables using our registered types, populate data, and pose query using our registered

functions. For example, we can create a simple table to store our mballoonpp objects as shown in

Figure 5-34.










00 00 1|*\
1: 0* 0|* 0 2:
1|* 00 1*
0|0 1|1 1|1
6: 0* 0* 0|* 7:
1* 11 1|*
( 1|1 1|1 0|0
11: 0| 0| 12:
1|* 00 1|*


1|*
0|*

0|0
0|*
1|*
0|0
0|*
1|*


0|0
3: o0|
1|*

8: 0|*
S1|*
111
13: 0|*
S1|*


0|0 0|0 1|* 0|0
0|* 4: 0|* 0* 0|*
1| 9 1|* 11 1|*


1|* 1|* 0|0 1|*

0|* 14: 0|* 0|* 0|*
1|* 1|* 1|1 1|*


0|0 1|1 1
5: 0* 0* 0|*
1|* 00 1*
1|1 0|0 1|1
10: 0|* 0* 0*
1|* 1 1 1|*


Figure 5-18. Complete and thinned out matrices for the 14 topological predicates of the
point/line case.


0|0 0|0 11 11 1|* 0|0 00 N
0|* 3: 0|* 0|* 10 4: 0|* 0* 0*
1|* 1| 1| 1 1|* 1|* 1*
11 1
0|*
1|*


1|1 00 1|1
5: 0* 0* 0|*
1* 1| 11*


Figure 5-19. Complete and thinned out matrices for the 7 topological predicates of the
point/region case.


thinned out matrices for the point/point case are shown in Figure 5-17, for the point/line case in

Figure 5-18, for the point/region case in Figure 5-19, and for the region/region case in Figure 5-

20. The complete and thinned out matrices for the line/line case and the line/region case can

be found in [50]. Definition 5.7 defines the measures we use to summarize and interpret these

results.


00
1 1|*
1,*
6: 0|0
1\.
S1|*
11: 0|*
S0|0
/I*
16: 1|1
S1|*
1.*
21: 0|*
S0|0
1|*
26: 0|0
1 1|*

31: 1|1
S1|1,


1* \
1*
1* /
0|0
0|*
11*
11* \
11
1* /
11)





111* )
0|0

11
0|0

1|,
111


1*
0|0
1*
0|0
0|*
1|*
1* \
1I*
11
1'* \
11 N
11* /
1*
0|0
1|*

11)
0|0
1|*
11* \
111
1* /


0|0
3: 0| *





13: o(,
1|8
1|*
8: 1|1
S 1|1
/111
13: 0|0
1|*
11.
1|*
1|*

23: 0|0
1|.
1|*
28: 1|.
1|1
/1|*
33: 1|1
1|1.


1* \
1*
1* /
0|0
0|*
1* /
1* \
11
1* /
1* \
111
1* /
1|*
0|0
1* /
1* \
1*
1* /
111
1|*
11
1* /


0|0
4: 0|*
1|*

9: 1|1
1 *
1|*
14: 1|1
1|*
1|0*
19: 0|*

1|*
24: 0|*
0|0
1|*
29: 1|1
S1|*


ii)\

1Y )

i* )

i0

ii)

U)


1*
5: 0*
0|0
111
10: 0|0
1 *
1 *
15: 1|
1|*
1|*
20: 0|0
1|*
1|1.
25: 0|0
S 1|1
S1|*
30: 1|1
S1|*


0|0
0|*
1*
11
0|0
1* )



1|* )
1* \
1*|
1* /
1* \
111
1i*
1|*
0|0
1I*


Figure 5-20. Complete and thinned out matrices for the 33 topological predicates of the
region/region case.


(00
1: 0|*
(1*

6: 0|
( 1|*


1)*
0|*
1|*
0|0
0|*
1|*


0|0
2: o0|
S1|*
111
7: 0|*
S1|*









3 f E P(F) 3 (g,ia) E H(G) : on(f,g.s). This matches the definition of VF[poionibound] in
Definition 5.3(ii). Statement (iii) is satisfied if, and only if, a point of F is outside of G. That

is, Ef E P(F) V (g, ia) E H(G) : poilnRegion(f, G) A -on(f,g.s). This corresponds to the

definition of vF [oi_outside] in Definition 5.3(iii). Statements (iv) and (v) follow from Lemma

6.2.3 in [59]. The last statement follows from Lemma 6.2.1 in [59]. o

In case of two line objects, we obtain the following statement:

Lemma 5.4 : Let F, G E line. Then the characterization of the matrix predicates of the

9-intersection matrix is as follows:

(i) F n G 0 VF [segshared] V vF [interiorpoishared]

(ii) F n G 0 0 vG[boundoninterior]

(iii) F nG 0 VF [segunshared]

(iv) aF n G 0 VF [boundoninterior]

(v) aF n aG 7 0 VF [boundshared]

(vi) aF nG 7 0 vF [bound disjoint]

(vii) F nG ~ 0 4 VG [segunshared]

(viii) F n G 0 vG[bounddisjoint]

(ix) F nG 0 < true

Proof. In (i), the interiors of two line objects intersect if, and only if, any two segments

partially or completely coincide or if two segments share a single point that does not belong to

the boundaries ofF and G. That is, 3f e H(F) 3g E H(G) : seglntersect(f.s,g.s) V 3f e

H(F) 3g e H(G) Vp E B(F) UB(G) : piiJit ,i i (f.s,g.s) A poilntersection(f.s,g.s) # p.

The first expression corresponds to the definition of VF [segshared] in Definition 5.4(i). The

second expression is the definition of VF [interiorpoishared] in Definition 5.4(ii). Statement

(ii) requires that an intersection point p of F and G exists such that p is a boundary point

of G but not a boundary point of F. That is, f e H(F) 3g E H(G) 3p e B(G) \ B(F) :

poilntersection(f.s, g.s) = p. This matches the definition of vG [bound on interior] in Defini-

tion 5.4(viii). Statement (iii) is satisfied if, and only if, there is a segment of F that is outside of









CHAPTER 5
IMPLEMENTATION MODEL OF THE MOVING BALLOON ALGEBRA

In the implementation model, we are interested in how we can implement the finite rep-

resentation set forth in the discrete model. Thus, we are interested in defining data structures

for each data types of the algebra as well as algorithms for operations and predicates. Since the

implementation of spatiotemporal data types and spatiotemporal predicates requires the use of

spatial data types and topological predicates, we first present our data structures for spatial data

types and spatiotemporal data types (Section 5.1). Then, we present our topological predicate

implementation including the algorithms for determining the topological relationship between

two spatial objects' (Section 5.2). These algorithms are then used to support the implementation

of spatiotemporal predicates between moving objects (Section 5.3) which in turn is the basis for

implementing balloon predicates (Section 5.4). Since the algebra is to be made available for use

in a database system, we also describe our mechanism for integrating the algebra into a DBMS

(Section 5.5). Finally, we provide a case study describing an application of our algebra in the

field of hurricane research (Section 5.6).

5.1 Data Structures

In this section, we describe how we can translate the concepts specified in the discrete

model into appropriate data structures for implementation in a database system. The discrete

representation of the Moving Balloon Algebra is in fact a high level specification of such data

structures. The design of the data structures is also influenced by the context of the system where

the data structures are to be implemented as well as the efficiency requirements of algorithms to

be supported. We begin with some general requirements of the data structures due to their use in

a database context. Then, we proceed to define data structures for spatial data types and finally

spatiotemporal data types.



1 Our research work on the efficient implementation of topological predicates has been pub-
lished in two journal articles [51, 54].









that we obtain 184 individual predicate characterizations without converse predicates and 248

individual predicate characterizations with converse predicates. In general, each characterization

is a Boolean expression in conjunctive normal form and expressed in terms of the topological

feature vectors VF and vG.

We give two examples of direct predicate characterizations. As a first example, we consider

the topological predicate number 8 (meet) between two line objects F and G (Figure 5-15A and

[59]) and see how the flags of the topological feature vectors (Definition 5.4) are used.

P8 (F, G) :4z -wVF [segshared] A -vF [interior-poishared] A vF [segunshared] A

1VF [boundoninterior] A VF[bound shared] A VF[boitd _di\iiim] A

VG[seg unshared] A vG[boundoninterior] A vG[botmd _di\iiim]
If we take into account the semantics of the topological feature flags, the right side of the

equivalence means that both objects may only and must share boundary parts. More precisely and

by considering the matrix in Figure 5-15A, intersections between both interiors (-vF[seg shared],

1VF [interior-poishared]) as well as between the boundary of one object and the interior of the

other object (-VF [bound-on -interior], 1VG [bound-on interior]) are not allowed; besides intersec-

tions between both boundaries (VF [bound-shared), each component of one object must interact

with the exterior of the other object (F [seg unshared], vG[segunshared], F [bout1d _di\i'iiim].

VG[boutmd_di\ii im]).

( 0 0 1 1 0 0
0 1 1 1 0 0
S1 11 1 1 1

A B

Figure 5-15. The 9-intersection matrices. A) Matrix number 8 for the predicate meet between
two line objects. B) Matrix number 7 for the predicate inside between two region
objects.


Next, we view the topological predicate number 7 (inside) between two region objects F

and G (Figure 5-15B and [59]) and see how the segment classes kept in the topological feature

vectors (Definition 5.6) are used.









In Section 3.1.3.1, we present our approach for handling future predictions of moving

objects. Taking into account the inherent uncertainty of the future, we explore how the future

positions and extent of a moving object can be represented. We present corresponding spatiotem-

poral data types in Section 3.1.3.2.

3.1.3.1 Handling the uncertainty of the future positions and extent of moving objects

Unlike movements in the past for which we assume to have precise knowledge, future

predictions involve the inherent feature of uncertainty with regard to the future locations and/or

extent of moving objects. From a database perspective, this feature raises two main issues. The

first issue is how to predict future spatial evolution and deals with the development of prediction

methods that can be employed for the forecast of future movement. The second issue is how to

handle the computed data as the result of the prediction and deals with generic data modeling and

representation techniques for predictions. A general property of prediction methods is that they

are domain and application specific. For example, meteorology, fire management, and homeland

security all require quite different prediction models with different input parameters. Hence, it

is impossible to implement the large number of employed and future prediction methods from

different disciplines in a database context. Any selection of a particular collection of prediction

methods would be highly restrictive and unfavorable due to their limited applicability. Further,

we aim at providing a general purpose model, tool, and solution. We therefore think that only the

second issue should be supported by a database system but not the first issue. This means that

application domains should develop prediction models outside of the database system. However,

we consider it imperative that a database system provides data modeling and persistence support

for representing, storing and querying predicted spatiotemporal data. Based on this view, we

focus on the data modeling aspect of the future predictions of moving objects and how this

type of data can be represented and queried in databases; we leave the task of prediction to the

application domains.

We consider a few examples in order to understand the uncertain nature of moving objects

in the future and the requirements of their representation. The central issue is the representation









of F and G need constant time. In total, the algorithm requires O((l + m+ k) log(l+ m+ k)) time

and O(1 + m+ k) space.

5.2.3 The Evaluation Phase for Matching Topological Predicates

In the previous section, we have determined the topological feature vectors VF and VG of

two complex spatial objects F E a and G E 3 with a, 3 E {point, line, region}. The vectors VF

and VG contain specific topological feature flags for each type combination. The flags capture all

topological situations between F and G and are different for different type combinations. The

goal of the evaluation phase is to leverage the output of the exploration phase, that is, VF and VG,

either for verifying a given topological predicate or for determining such a predicate. Our general

evaluation strategy is to accommodate the objects' topological feature vectors with an existing

topological predicate for both predicate verification and predicate determination.

Section 5.2.3.1 presents an ad hoc evaluation method called direct predicate character-

ization. Learning from its shortcomings, in Section 5.2.3.2, we propose a novel, systematic,

provably correct, and general evaluation method called 9-intersection matrix characterization.

The next two subsections elaborate on a particular step of the general method that is dependent

on the type combination under consideration. Section 5.2.3.4 deals with the special region/region

case while Section 5.2.3.3 handles the cases of all other type combinations.

5.2.3.1 Direct predicate characterization: a simple evaluation method

The first method provides a direct predicate characterization of all n topological predicates

of each type combination (see Table 2-2B for the different values of n) and is based on the topo-

logical feature flags of VF and VG of the two spatial argument objects F and G. That is, for the

line/line case, we have to determine which topological feature flags of VF and VG must be turned

on and which flags must be turned off so that a given topological predicate (verification query) or

a predicate to be found (determination query) is fulfilled. For the region/region case, the central

question is to which segment classes the segments of both objects must belong so that a given

topological predicate or a predicate to be found is satisfied. The direct predicate characterization

gives an answer for each individual predicate of each individual type combination. This means









which in turn are sets of line segments. However, we can also take a less structured view and

represent a line by a set of line segments. Definition 4.7 shows how the type seg representing a

line segment can be discretely defined by its two endpoints.


Definition 4.7 : A line segment with two endpoints p and q is represented by the type seg

which is defined as:


seg = {(p,q) P,q e poi, p < q} U {I}


Now we can define the type line based on line segments as in Definition 4.8.


Definition 4.8 : The type line is defined as:


line = {S C seg Vs, t E seg : s 4 t A collinear(s, t) = disjoint(s,t)}


The predicate collinear determines whether two line segments are on the same infinite

line in a plane. Thus, if there are such segments, they must be disjoint; otherwise, they can

be merged into a single line segment. This ensures the uniqueness of the line representation.

Figure 4-1 shows an example of a line object of the abstract model and its corresponding discrete

representation.








x x
A B

Figure 4-1. Representations of a line object. A) In the abstract model. B) In the discrete model.


A region object can be represented discretely as a collection of polygonal faces with

polygonal holes. They are defined based on the concept of cycles. A cycle is a simple polygon

and is defined in Definition 4.9.









im of 9-intersection matrices contains only a single element. For each matrix predicate used

as a discriminator, the operation newnode creates a new tree node node (line 9). The matrix

predicate discriminator as well as the list im annotate the tree node node (line 10). If im has only

one element (line 11), we know that node is a leaf node representing the topological predicate

pertaining to the single element in im. The cost for this leaf node is 0 since its current depth is

0 (line 12). Otherwise, if im consists of more than one element, we partition it into two lists imi

and imr (line 17). The partitioning is based on the values of each 9-intersection matrix in im

with respect to the matrix predicate serving as the discriminator. If such a value is 0 (false), the

corresponding 9-intersection matrix is added to the list iml; otherwise, it is added to the list imr.

A special case now is that im has not been partitioned so that either iml or imr is empty (condition

in lines 18 to 19 yields false). In this case, the discriminator does not contribute to a decision

and is skipped; the next discriminator is selected (line 28). If both lists imi and imr are nonempty

(lines 18 to 19), we remove the discriminator from a new copy newmp of the list mp (line 20)

and recursively find the minimum cost decision trees for the 9-intersection matrices in iml (line

21) and in imr (line 22). Eventually, all recursions will reach all leaf nodes and begin returning

while recursively calculating the cost of each subtree found. The cost of a leaf node is 0. The

cost of an inner node node can be expressed in terms of the cost of its two nonempty subtrees

node.lchild and node.rchild processing the lists iml and imr respectively. The depth of each leaf

node with respect to node is exactly one larger than the depth of the same leaf node with respect

to either node.lchild or node.rchild. Therefore, besides the costs of these two subtrees, for each

leaf node of the subtree with root node, we have to add the leaf node's cost (weight) one time

(lines 23 to 24). These weights are stored in node.im. The cost of node is then compared with

the best cost determined so far, and the minimum will be the new best option (lines 25 to 26).

Eventually, when all the matrix predicates have been considered, we obtain the best choice and

return the corresponding minimum cost decision tree (line 31).

Table 5-4 shows the results of this algorithm by giving a textual pre-order (depth-first

search) encoding of all MCDTs for all type combinations on the basis of equal probability









and realistically represent the behavior of moving objects in the real world. For example, the

continuity property of movements must be specified such that an unrealistic behavior like

instantaneous, positional jumps are not allowed in the model. Unfortunately, restrictions like this

have been so far neglected in existing moving objects models.

The second problem relates to the modeling of predictive movements of moving objects. A

few specialized models have been proposed to support queries regarding future predictions of

moving objects. However, these models are restricted to moving points only and are tailored to

specific application domains and fixed prediction methods. All models anticipate future object

movements through certain assumptions on the objects' inertia, trajectories, and environmental

or contextual constraints. Their prediction methods are almost always entirely based on the

past and current movements of the objects, thus neglecting external factors or domain-specific

parameters which may significantly affect the future movements of moving objects. For instance,

information such as atmospheric pressures, temperature zones, wind and ocean currents plays a

major role in predicting the future evolution of a hurricane. This requires highly specialized and

sophisticated prediction models and algorithms beyond those in which only the past and current

object movements are considered as system parameters. In fact, the development effort for such

prediction models is a discipline by itself and a task of domain experts. In addition, different

application domains may require different prediction models. For example, to predict the

future spread of a forest fire, one may consider a different set of parameters such as the volume

of fire fuel (for example, dry brush), surface slope, and the capability of responsive actions

from firefighters in addition to atmospheric conditions such as wind and humidity. Thus, it is

impossible to define a one-size-fits-all prediction model for all applications. However, we can

assume that the nature of the outputs of different prediction models is the same, or at least very

similar. Such an output consists of a description of a predicted movement as well as a measure

of confidence (for example, probability, fuzziness, roughness) expressing the reliability of the

prediction. We can represent the predicted movement through spatiotemporal data types. We do

not see it as the capability and the task of a database system to predict the future movement of









number of evaluations for matrix predicate characterizations. Instead of nine, even only eight

matrix predicates have to be checked since the predicate F n G 0 yields true for all type

combinations. Fourth, we have proved the correctness of our provided implementation.

Based on this result, we accomplish the predicate n -,i alii 'ii of a topological predicate p

with respect to a particular spatial data type combination on the basis of p's 9-intersection matrix

(as an example, see the complete matrices of the 33 topological predicates of the region/region

case in Figure 5-20 and the complete matrices for the remaining cases in [50]) and the topolog-

ical feature vectors VF and VG as follows: Depending on the spatial data type combination, we

evaluate the logical expression (given in terms of VF and vG) on the right side of the first 9IMC

according to Lemma 5.1, 5.2, 5.3, 5.4, 5.5, or Theorem 5.1, respectively. We then match the

Boolean result with the Boolean value at the respective position in p's intersection matrix. If both

Boolean values are equal, we proceed with the next matrix predicate in the 9-intersection matrix;

otherwise p is false, and the algorithm terminates. Predicate p yields true if the Boolean results

of the evaluated logical expressions of all 9IMCs coincide with the corresponding Boolean values

in p's intersection matrix. This requires constant time.

Predicate determination also depends on a particular combination of spatial data types and

leverages 9-intersection matrices and topological feature vectors. In a first step, depending on

the spatial data type combination and by means of VF and VG, we evaluate the logical expressions

on all right sides of the 9IMCs according to Lemma 5.1, 5.2, 5.3, 5.4, 5.5, or Theorem 5.1,

respectively. This yields a Boolean 9-intersection matrix. In a second step, this Boolean matrix

is checked consecutively for equality against all 9-intersection matrices of the topological

predicates of the particular type combination. If n,,p with a, P3 {point, line, region} is the

number of topological predicates between the types a and 3, this requires naB, tests in the worst

case.

5.2.4 Optimized Evaluation Methods

Based on the exploration phase and leveraging the 9-intersection matrix characterization,

we have found a universal, correct, complete, and effective method for both predicate verification









this development a moving balloon object which can be represented by a spatiotemporal balloon

data type expressed as a function from time to a balloon data type. Furthermore, the property of

this function must be defined such that for each time instant t in the domain, we have a balloon

object that represents a valid snapshot of the object's dynamic. This means that (1) the current

instant tc of the balloon object at t must be the same as t and (2) The past movement history

of a balloon object at t + x (x is a positive number) is equal to the past movement history of a

balloon object at t augmented by the movement between t to t + x. We call this phenomenon

historical accumulation due to the obvious accumulation of movement. We do not make any

assumption about the dynamic of predictions since, in general, they are generated discretely and

independently by a prediction model. Due to the fact that prediction models are domain specific,

the output of these models may experience abrupt changes depending on input parameters or

the design of the models themselves. Hence, we do not pose any constraint on the dynamic of

predictions. We define a type constructor mQ for spatiotemporal balloon data types in Definition

3.12.


Definition 3.12 : A spatiotemporal balloon data type mn((a, P) describing a moving balloon

object whose past movements and future predictions are based on the spatial type a and P

respectively, is defined as:

mnl(a, 3) = time --- Qc(, (3)

such that Vf E m.Q(a, p), the followings are true:
(i) Vt E dom(f) : f(t).tc = t

(ii) VtI, t2 c dom(f), ti < t2 : the historical movement of f(t2) is a

historical accumulation of that of f(tI).









is only an implication since an intersection of the interior of one region object with the exterior of

another region object is possible without having (1/1)-segments. o

The second lemma provides a translation of some matrix predicates into segment classes.

Lemma 5.7 : Let F, G E region and VF and VG be their segment classification vectors. Then

we can infer the following implications between matrix predicates and segment classes:

(i) F n G' 0 vF[(0/2)] V VF[(2/0)] V VF[(1/2)] V VF[(2/1)] V

vG[(1/2)] V vG[(2/1)]
(ii) F nG # 0 VF[(O/1)] V VF[(1/0)] V VF[(1/1)]V

vG[(1/2)] V vG[(2/1)]
(iii) F nG' 0 vF[(1/2)] V vF[(2/1) V vF[(1/1) V

VG[(O/1)] V G[(1/0)]
Proof. In (i), the intersection of the interiors of F and G implies that both objects share a

common area. Consequently, this area must have overlap number 2 so that at least one of the two

objects must have a (a/2)- or (2/a)-segment with a E {0, 1}. In (ii), the fact that F intersects

G means that F contains an area which it does not share with G. That is, the overlap number

of this area is 1, and F must have a (a/l)- or a (1/a)-segment with a E {0, 1}. The fact that a

part of the interior of F is located outside of G implies two possible topological situations for G:

either both objects share a common segment and their interiors are on different sides, i.e., G has a

(1/1)-segment (covered by VF [(1/1)]), or the interior of F is intersected by the boundary and the
interior of G so that G has a (1/2)- or (2/1)-segment. We prove (iii) by swapping F and G in (ii).


The third lemma states some implications between matrix predicates.

Lemma 5.8 : Let F, G E region. Then we can infer the following implications between

matrix predicates:









For example, the movement of the eye of a hurricane is usually illustrated using a shape that

resembles a balloon. The past movement of the eye (a moving point) can be seen over time as a

movement along a line or a curve which resembles the string of a balloon. The position of the

eye at a time instant in the future can be anywhere within an area of uncertainty. Thus, the future

prediction of the eye can be seen as a moving region of uncertainty that resembles the body of

a balloon. Finally, the connection point between the string and the body of a balloon object at a

time t represents the state of the moving object at t. Hence, a balloon object is static in the sense

that it represents the knowledge about the past and the predicted movements of a moving object

at a time t. As the object moves, a new present state is recorded as part of the string, and the body

of the balloon object is updated with a new prediction. This dynamic is represented by a moving

balloon object. The corresponding abstract data types may be used as attribute types in relational,

object-relational, or object-oriented DBMS.

With this model, we solve the first two conceptual problems by providing a precise and for-

mal definition of moving (balloon) objects along with appropriate specifications of the properties

of their movements. We solve the third conceptual problem by seamlessly modeling the dynamic

of both the past (as facts) and the future (as predictions) through balloon objects. Beside already

available concepts that we intend to preserve and refine (like the approaches in [22, 32]), we in-

troduce new functionality such as the ability to analyze the accuracy of predictions over time. We

also offer an interface for cooperating with specific (for example, probabilistic, fuzzy) prediction

models for moving objects. Finally, we address the implementation problem by designing an im-

plementation model of the Moving Balloon Algebra that can be used to implement the algebra as

a type system library which can be integrated into an extensible DBMS. In this research, we are

mainly interested in the fundamental models, semantics, and their implementations in databases.

Other optimization and filtering concepts such as spatiotemporal indexing techniques are beyond

the scope of this research.









poilntersection(f.s, g.s) B(F). The first argument of the disjunction matches the defini-

tion of VF [seg shared] in Definition 5.5(ii). The second argument matches the definition of

VF [poishared] in Definition 5.5(iv). Statement (iii) is satisfied if, and only if, a segment
ofF is located outside of G. That is, Ef E H(F) Vg E H(G) : -seglntersect(f.s,g.s) A

-seglnRegion(f.s, G). This corresponds to the definition of VF [segoutside] in Definition 5.5(iii).

Statement (iv) holds if, and only if, a segment of F lies inside G and one of the end points of the

segment is a boundary point. That is, 3f E H(F) : poilnRegion(dp(f), G) A dp(f) E B(F).

This corresponds to the definition of VF [boundinside] in Definition 5.5(v). In (v), we must find

a segment of F and a segment of G which intersect in a point that is a boundary point of F. That

is, 3f E H(F) 3g E H(G) : poilntersect(f.s,g.s) A poilntersection(f.s,g.s) E B(F). This

matches the definition of vF [boundshared] in Definition 5.5(vi). Statement (vi) requires the

existence of an endpoint of a segment of F that is a boundary point and not located inside or

on any segment of G. That is, 3f e H(F) Vg E H(G) : poilnRegion(dp(f), G) A dp(f) e

B(F) A -on(dp(f),g.s). This corresponds to the definition of VF[boumd di\'iiiu] in Defini-

tion 5.5(vii). Statement (vii) always holds according to Lemma 6.3.2 in [59]. Statement (viii)

is satisfied if, and only if, a segment of G does not coincide with any segment of F. That is,

3g E H(G) Vf E H(F) : -seglntersect(f.s,g.s). This fits to the definition of vF [segunshared] in

Definition 5.5(viii). The last statement follows from Lemma 6.3.1 in [59]. D

5.2.3.4 The 9-intersection matrix characterization for region/region case

As shown in Section 5.2.2.6, exploring the region/region case is quite different from

exploring the other type combinations and requires another kind of exploration algorithm. It has

to take into account the areal extent of both objects and has resulted in the concepts of overlap

number, segment classes, and segment classification vector. In this subsection, we deal with

the 9IMC based on two segment classification vectors. The goal of the following lemmas is

to prepare the unique characterization of all matrix predicates by means of segment classes.

The first lemma provides a translation of each segment class into a Boolean matrix predicate

expression.









5.2.3.1 Direct predicate characterization: a simple evaluation method 137
5.2.3.2 The 9-intersection matrix characterization method ....... .140
5.2.3.3 Type combination dependent 9-intersection matrix characteri-
zation ........ ....... .. ...... 141
5.2.3.4 The 9-intersection matrix characterization for region/region case 146
5.2.4 Optimized Evaluation Methods .................. ..... ..151
5.2.4.1 Matrix thinning for predicate verification . . .... 152
5.2.4.2 Minimum cost decision tree for predicate determination . 157
5.2.5 Interface Methods for Topological Predicates . . . 165
5.3 Algorithms for Spatiotemporal Predicates .... . . ... 166
5.3.1 The Algorithmic Scheme ............... ..... 166
5.3.2 Time-Synchronized Interval Refinement . . . 171
5.3.3 Function-Valued Interval Refinement and Development Determination 174
5.3.4 Pattern Matching with Query Predicate . . . 178
5.4 Algorithms for Balloon Predicates .................. ...... ..180
5.5 Database Integration ............... . . . ... 182
5.6 Case Study: Application to Hurricane Research . . . 185

6 MODEL AND IMPLEMENTATION ASSESSMENT . . . .... 191

6.1 Topological Predicates: Assessment, Testing, and Performance Study ....... .191
6.1.1 Qualitative Assessment .................. ....... 191
6.1.2 Testing ....... .. ......... ....... ....... 192
6.1.3 Performance Study and Analysis .............. . .. 193
6.2 Spatiotemporal Model Assessment ........ . . . ......196

7 CONCLUSIONS ................... . . ..... 199

REFERENCES ...................... . . . 201

BIOGRAPHICAL SKETCH ................. . . ..... 206









By applying the six balloon data types defined in the previous section to this definition, we

obtain six different spatiotemporal balloon data types:


mballoon pp

mballoon pl

mballoon pr

mballoon_11

mballoonlr

mballoonrr


time



t4
t3

history at t3
t2
story tl
history at tl
L to


time balloon_-p

time balloon pl

time balloon pr

time balloon_11

time balloon lr

time balloon_rr


Figure 3-9. Example of a moving balloon object of type mballoon_pr.


An example of a moving balloon object of type mballoonpr is depicted in Figure 3-9.

When working with moving balloon objects, we must distinguish the different meanings of a

time instant. With respect to a moving balloon object, a time instant t refers to an instant of the

domain of f at which we obtain a balloon object. We distinguish this time domain as the dynamic

time domain. With respect to a balloon object at a specific instant t of the dynamic time domain,

a time instant ts refers to an instant of the domain of f(t) which is the union of time and time

at which we obtain the position or extent of the object or its prediction. We distinguish this time

domain as the snapshot time domain. Now we can use these spatiotemporal balloon data types









must lie outside of G. Otherwise, we check the upper overlap number of s's predecessor (line 19).

The overlap number 1 indicates that s lies inside G (line 20); otherwise, it is outside of G (line

21). After this check, we remove s from the sweep line status (line 23). Next we test whether the

dominating point of h is a boundary point of F (line 26) by using the predicate lookahead. If

this is the case, we determine whether this point is shared by G (lines 28 to 30) or whether this

point is located inside or outside of G (lines 31 to 38). Last, if the dominating point turns out not

to be a boundary point of F, we check whether it is an interior point that shares a boundary point

with G (lines 40 to 43). In case that we only obtain a halfsegment h of G (line 44), we insert its

segment component s into the sweep line status and attach the Boolean flag ia indicating whether

the interior of G is above s or not (line 46). Otherwise, we delete a right halfsegment h from the

sweep line status and know that it is not shared by F (line 47). In case that both F and G share

a halfsegment, we know that they also share their segment components (line 50). The sweep

line status is then modified depending on the status of h (lines 52 to 53). If we encounter a new

dominating point of F, we have to check whether F shares a boundary point (lines 55 to 56) or

an interior point (line 57) with the boundary of G. If the halfsegment sequence of G should be

exhausted (line 62), we know that F must have a segment whose interior is outside of G (line 63).

If after the while-loop only F is exhausted but not G (line 66), G must have a boundary segment

that is disjoint from F (line 67).

Let I be the number of halfsegments of F, m be the number of attributed halfsegments

of G, and k be the total number of new halfsegments created due to our splitting strategy.

The while-loop is then executed at most 1 + m + k times. All operations needed on the sweep

line status require O(log(l + m + k)) time each. Due to the splitting strategy, all dominating

end points are already endpoints of existing segments or become endpoints of newly created


Figure 5-13. Special case of the plane sweep.
F G G



Figure 5-13. Special case of the plane sweep.









5.2.4.2 Minimum cost decision tree for predicate determination

In Section 5.2.3, we have seen that, in the worst case, n,,p matching tests are needed to

determine the topological relationship between any two spatial objects. For each test, Boolean

expressions have to be evaluated that are equivalent to the eight matrix predicates and based

on topological feature vectors. We propose two methods to improve the performance. The

first method reduces the number of matrix predicates to be evaluated. This goal can be directly

achieved by applying the method of matrix thinning described in Section 5.2.4.1. That is, the

number n,,p of tests remains the same but for each test we can reduce the number of matrix pred-

icates that have to be evaluated by taking the thinned out instead of the complete 9-intersection

matrices.

The second method, which will be our focus in this subsection, aims at reducing the number

n,,p of tests. This method is based on the complete 9-intersection matrices but also manages to

reduce the number of matrix predicates that have to be evaluated. We propose a global concept

called minimum cost decision tree (MCDT) for this purpose. The term "global" means that we

do not look at each intersection matrix individually but consider all n,,p intersection matrices

together. The idea is to construct a full binary decision tree whose inner nodes represent all

matrix predicates, whose edges represent the Boolean values true or false, and whose leaf nodes

are the n,,p topological predicates. Note that, in a full binary tree, each node has exactly zero

or two children. For searching, we employ a depth-first search procedure that starts at the root

of the tree and proceeds down to one of the leaves which represents the matching topological

predicate. The performance gain through the use of a decision tree is significant since the tree

partitions the search space at each node and gradually excludes more and more topological

predicates. In the best case, at each node of the decision tree, the search space, which comprises

the remaining topological predicates to be assigned to the remaining leaves of the node's subtree,

is partitioned into two halves so that we obtain a perfectly balanced tree. This would guarantee a

search time of O(lognci,p). But in general, we cannot expect to obtain a bisection of topological

predicates at each node since the number of topological predicates yielding true for the node's











hih h



2h,


case 1 case 2a case 2b case 3


Figure 5-1. Examples of the order relation on halfsegments: h\ < h2


Examples of the order relation on halfsegments are given in Figure 5-1. Case 1 is exclu-

sively based on the (x,y)-lexicographical order on dominating points. In the other cases the

dominating points of h, and h2 coincide. Case 2a deals with the situation that hi is a right half-

segment and h2 is a left halfsegment. Case 2b handles the situation that hi and h2 are either both

left halfsegments or both right halfsegments so that the angle criterion is applied. Finally, case 3

treats the situation that h, and h2 are collinear. Two halfsegments h, = (sl, dl) and h2 = (s2, d2)

are equal if, and only if, sl = s2 and dl = d2.

We will also need an order relation between a point v E poi2D and a halfsegment h E

ihanlf, iu, mi2)D. We define v < h # v < dp(h) and v = h # v = dp(h). This shows the hybrid

nature of halfsegments having point and segment features.

At the highest level, we have the three complex spatial data types point2D, line2D, and

region2D (see Section 2.1.1 for their intuitive description and [59] for their formal definition).

They are the input data types for topological predicates and are essentially represented as ordered

sequences of elements of variable length. We here ignore additionally stored information about

spatial objects since it is not needed for our purposes. The type of the elements is poi2D for

point2D objects, hinolf, if ,i' m2D for line2D objects, and attributed half mc-tni: l (see below) for

region2D objects. Ordered sequences are selected as representation structures, since they directly

and efficiently support parallel traversals (Section 5.2.1.1) and the plane sweep paradigm (see

Section 5.2.1.3).










p7(F,G) :# -lVF[(O/1)] A -VF[(1/0)] A -VF[(0/2)] A -VF[(2/0)] A -VF[(1/1)] A

-vF[boundpoi-shared] A (vF[(1/2)] V vF[(2/1)]) A

-VG[(1/2)] A -VG[(2/1)] A (VG[(O/1)] V VG[(1/O)])
For the inside predicate, the segments of F must be located inside of G since the interior and

boundary of F must be located in the interior of G; hence they must all have the segment classes

(1/2) or (2/1). This "for all" quantification is tested by checking whether vF [(1/2)] or vF [(2/1)]

are true and whether all other vector fields are false. The fact that all other vector fields are false

means that the interior and boundary of F do not interact with the boundary and exterior of G.

That is, the segments of G must be situated outside of F, and thus they all must have the segment

classes (0/1) or (1/0); other segment classes are forbidden for G. Further, we must ensure that

no segment of F shares a common point with any segment of G (-VF [boundpoishared]).

The predicate characterizations can be read in both directions. If we are interested in

predicate vn ,ifi, niitn. that is, in evaluating a specific topological predicate, we look from

left to right and check the respective right side of the predicate's direct characterization. This

corresponds to an explicit implementation of each individual predicate. If we are interested in

predicate determination, that is, in deriving the topological relationship from a given spatial

configuration of two spatial objects, we have to look from right to left. That is, consecutively

we evaluate the right sides of the predicate characterizations by applying them to the given

topological feature vectors VF and VG. For the characterization that matches we look on its left

side to obtain the name or number of the predicate.

The direct predicate characterization demonstrates how we can leverage the concept

of topological feature vectors. However, this particular evaluation method has three main

drawbacks. First, the method depends on the number of topological predicates. That is, each

of the 184 (248) topological predicates between complex spatial objects requires an own

specification. Second, in the worst case, all direct predicate characterizations with respect

to a particular type combination have to be checked for predicate determination. Third, the

direct predicate characterization is error-prone. It is difficult to ensure that each predicate










ensures unique representation, that is, it does not allow a face to be decomposed into two or more

edge-disjoint faces.

A region is then defined in Definition 4.11 as a set of edge-disjoint faces.


Definition 4.11 : The type region is defined as:


region = {F C face Vf1, f2 e F : f" # f2 = edgedisjoint(fi, f2)}


Two faces are edge-disjoint if either their outer cycles are edge-disjoint, or one of the outer

cycles is edge-inside one of the holes of the other face. Thus, two faces in a region may touch

each other at single, isolated points but must not have overlapping edges. Figure 4-2 shows an

example of a region object in both abstract and discrete representation.

Y Y






X X
x x
A B

Figure 4-2. Representations of a region object. A) In the abstract model. B) In the discrete
model.


4.2 Basic Spatiotemporal Data Types

For a finite representation of spatiotemporal data types, we use the sliced representation

concept as introduced in [25]. The idea is to represent a movement of an object by a sequence

of simple movements called slices or temporal units. A temporal unit of a moving data type a

is a maximal time interval where values taken by an instant of a can be described by a "simple"

function. Thus, a temporal unit represents the evolution of a value v of some type a in a given

time interval i while maintaining type-specific constraints during such evolution. Figure 4-3A

shows a temporal unit of a moving point object consisting of two point moving independently.

Each temporal unit is a pair (i, v), where i is called the unit interval and v is called the unit









With these interval relationships, we can define, in Definition 4.4, a finite set of time

intervals (an interval set) such that it has a unique and minimal representation.


Definition 4.4 : The type intervalset is defined as:


interval-set = {U C interval (i,j E U A i # j) = disjoint(i,j) A -adjacent(i,j)}


Interval sets are useful for representing time periods of movements. For example, they are

used as the return values for the lifespan operation which determines the time periods during

which a movement is defined.

4.1.2 Spatial Data Types

Based on the abstract model of spatial data types given in [59], a finite representation for

spatial data types such as point, line, and region have been studied in our implementation of

topological predicates between complex spatial objects [54, 51]. Here, we give an overview of

this representation. Recall that the type point represents complex points (that is, collections of

single points). Hence, we first define how a single point, represented by the type poi, can be

described. In two-dimensional Euclidean space, a single point can be described by a pair of

coordinates (x,y) as shown in Definition 4.5.


Definition 4.5 : The type poi is defined as:


poi= {(x,y) x,y E real} U {I}


In Definition 4.6, a value of the type point is simply define as a set of single points.


Definition 4.6 : The type point is defined as:


point = 2po0


The type line and region can be described discretely by using linear approximations. A

value of the type line is essentially a finite set of line segments. The abstract type described in

[32] defines a line as a set of curves in the plane. We can discretely represent curves by polylines









operations are domain specific operations that must be provided by the prediction model. The

semantics of these operations are different depending on the type of prediction model used.

In the case of a probability-based prediction model, the pointconf operation is used

to retrieve the density value of a given point at a given time instant during the prediction

period. Note that this density value is not necessarily the probability value of occurrence.

These two values are the same only in the case of a discrete probability distribution which is

applicable to a prediction of type p(point). This is not the case for a continuous probability

distribution which is applicable to a prediction of type p(line) or p(region). We use the operation

pointsetconf to determine the probability of occurrence (percentage of chance) that a point

as part of the moving object will fall within the given point-set at a given time instant. For a

continuous probability distribution over a line based (or region based) prediction, the probability

of occurrence is the integration of a probability distribution function (pdf) over a point-set, which

corresponds to either an area (for (p(line)) or a volume (for cp(region)) under the curve or surface,

respectively, of the pdf. Thus, the probability value for a point in these continuous distributions

is always 0 since we cannot obtain an area or a volume by integrating over a point. Similarly,

the probability value for a line in a two dimensional continuous distribution over a region-based

prediction is also always 0 since we cannot obtain a volume by integrating over a line. Table 3-2

shows the value of the operation pointsetconf(p(o), Jp, instant) when applied to different type

combinations of cp(u) and p for a, p E {point, line, region}.

Table 3-2. Value of the operation pointsetconf(p(oa), 3, instant) for each combination of cp(a)
and p whether it is always 0, denoted by a value 0, or a meaningful value, denoted by a
value M.
qp(o)\3 point line region
p(point) M M M
p(line) 0 M M
p(region) 0 0 M


To further clarify the meaning of these operations, consider predictions at a time instant

as shown in Figure 3-10. The density value of the point p in Figure 3-10A is 0.25. Since this

prediction is of the type cp(point), we have a discrete probability distribution over a finite set









The type mbb2D comprises all minimum bounding boxes, that is, axis-parallel rectangles. It

is defined as

mbb2D = {(p, q) p, q E poi2D, p.x < q.x, p.y < q.y} U {f}

Here, the predicate disjoint : mbb2D x mbb2D -+ bool checks whether two minimum

bounding boxes are disjoint; otherwise, they interfere with each other.

At the next higher level, we assume the geometric component data type half min-lltl2D that

introduces halfsegments as the basic implementation components of objects of the spatial data

types line2D and region2D. A halnf m,-itni. which is stored in a record, is a hybrid between a

point and a segment. That is, it has features of both geometric structures; each feature can be

inquired on demand. We define the set of all halfsegments as the component data type

halnCmNrlni2D {(s,d) |s seg2D- {e}, d E bool}

For a halfsegment h = (s, d), the Boolean flag d emphasizes one of the segment's end points,

which is called the dominating point of h. If d = true (d = false), the left (right) end point of

s is the dominating point of h, and h is called left (right) halnf :,in:lt. Hence, each segment s

is mapped to two halfsegments (s, true) and (s,false). Let dp be the function which yields the

dominating point of a halfsegment.

The representation of line2D and region2D objects requires an order relation on halfseg-

ments. For two distinct halfsegments hi and h2 with a common endpoint p, let a be the enclosed

angle such that 0 < a < 180'. Let a predicate rot be defined as follows: rot(hi, h2) is true if, and

only if, hi can be rotated around p through a to overlap h2 in counterclockwise direction. This

enables us now to define a complete order on halfsegments. For two halfsegments hi = (sl, dl)

and h2 = (S2, d2) we obtain:

hi < h2 # dp(hi) < dp(h2) V (case 1)

(dp(h) = dp(h2) A ((-dl A d2) V (case 2a)

(di = d2 A rot(hi,h2)) V (case 2b)

(dl = d2 A collinear(s1,s2) A len(si) < len(S2)))) (case 3)









spatial object. Computing the topology graphs and deriving the 9-intersection matrix from them

require quadratic time and quadratic space in terms of the nodes and edges of the two operand

objects. This is rather inefficient and thus is not suitable for supporting the implementation of

high-level predicates such as spatiotemporal predicates. In Section 5.2, we prodive our solution

for an efficient implementation of topological predicates on complex spatial objects which

requires linearithmic (loglinear) time and linear space.

Unlike those of spatial data models, implementations of spatiotemporal data models are

very rare and, in most cases, only exist in the form of research prototypes. An example of

such an implementation can be found as part of the SECONDO prototype system [4]. The

spatiotemporal module of SECONDO is developed based on the approach in [32, 61, 18, 25]

which only supports the past movement of moving objects. However, our main interest here is on

the modeling and implementation of a moving object algebra which can support both the past and

predicted movements of moving objects.

2.4 Database Integration

Beside the conceptual modeling and implementation of spatial and spatiotemporal algebra,

an important yet often neglected aspect of algebra development is the ability to integrate such

algebra into a variety of extensiblee) DBMSs. Most of the existing implementations of spatial and

spatiotemporal data models are either database-incompatible (for example, JTS Topology Suite)

or database-specific (for example, Informix Geodetic DataBlade, Oracle Spatial Cartridge, DB2's

Spatial Extender, SECONDO spatiotemporal module). These database-specific implementations

are inflexible in the sense that users' data must be stored in the corresponding DBMS. This is

generally a proprietary issue on the part of database vendors or, in the case of SECONDO, a

design decision. It does not necessarily suggest any required storage dependency on the part of

the algebra. In fact, an implementation of an algebra can and should be storage-independent.

An attempt to address this problem and to make more flexible use of a spatial algebra can be

seen in the case of the ESRI's Spatial Database Engine which provides support for data storage

in a number of DBMSs including Oracle, DB2, and SQL Server. However, their proprietary












01 algorithm ExplorePoint2DLine2D
02 input: point2D object F and line2D object G,
03 topological feature vectors VF and VG
04 initialized with false
05 output: updated vectors VF and VG
06 begin
07 S := newsweep(); lastdp := e;
08 ', /, i- ,ii i(F, G, object, status);
09 while status 4 end ofsecond and status 4 end ofiboth and
10 not (VF [poi_di\itiiii] and VF [poion_interior] and
11 VF[poionibound] and VG[boundpoi _di\iiii]) do
12 if object =first then p := getevent(F);
13 if poiinseg(S, p) then vF [poioninterior] := true
14 else VF poidi\ it'ii] := true endif
15 else if object = second then
16 h := getevent(G); /* h = (s, d) */
17 if d then addleft(S, s) else del_rigln(S, s) endif;
18 if dp(h) 7 lastdp then lastdp := dp(h);
19 if not lookahead(h, G) then
20 vG[boundpoi_di\iiim] := true
21 endif
22 endif
23 else /* object = both */
24 h := getevent(G); /* h = (s, d) */
25 if d then addleft(S, s) else del_rigl,(S, s) endif;
26 last_dp := dp(h);
27 if lookahead(h, G) then
28 VF poioninterior] := true
29 else VF [poion-bound] := true endif
30 endif
31 select_next(F, G, object, status);
32 endwhile;
33 if status = end ofsecond then
34 vF[poi_di\iiim] := true
35 endif
36 end ExplorePoint2DLine2D.

Figure 5-9. Algorithm for computing the topological feature vectors for a point2D object and a
line2D object









segments. The operation lookahead needs constant time. In total, the algorithm requires
O((l+m+ k) log(l +m+k)) time and O( l+m+k) space.
5.2.2.6 The exploration algorithm for the region2Dlregion2D case

The exploration algorithm for the region2D/region2D case is quite different from the
preceding five cases, since it has to take into account the areal extent of both objects. The
indices of the vector fields, with one exception described below, are not flags as before but
segment classes. The fields of the vectors again contain Boolean values that are initialized
with false. The main goal of the exploration algorithm is to determine the existing segment
classes in each region2D object. Hence, the topological feature vector for each object is a
segment classification vector. Each vector contains a field for the segment classes (0/1), (1/0),

(0/2), (2/0), (1/2), (2/1), and (1/1). The following definition makes a connection between
representational concepts and point set topological concepts as it is later needed in the evaluation
phase. For a segment s = (p, q) E seg2D, the function pts yields the infinite point set of s as

pts(s) = {r e R2 r = p + X(q p), X e R, 0 < X < 1}. Further, for F E region2D, we define
3F = UfeH(F)pts(f.s), F = {p e R2 poilnRegion(p, F)}, and F- = R2 3F F. We can now
define the semantics of this vector as follows:

Definition 5.6 : Let F, G E region2D and VF be the segment classification vector of F. Then,

(i) vF[(0/1)] :#z 3 f H(F) :f.ia A pts(f.s) C G
(ii) vF[(1/0)] : E 3f e H(F) : f .ia A pts(f.s) C G
(iii) VF[(1/2)] : E 3f e H(F) :f.ia A pts(f.s) C G
(iv) vF[(2/1)] : 3 f e H(F) : -f .ia A pts(f.s) C G

(v) vF[(0/2)] : 3 f e H(F) 3g e H(G) : f.s = g.s A f.ia A g.ia
(vi) vF[(2/0)] : E 3f e H(F) 3g e H(G) : f.s = g.s A -f.ia A -g.ia
(vii) vF[(1/1)] : E 3f e H(F) 3g E H(G) : f.s = g.s A ((f.ia A -g.ia)
V (-f.ia A g.ia))

(viii) vF[bound poishared] : E 3f c H(F) 3g E H(G) : f.s 4 g.s A dp(f) = dp(g)









LIST OF FIGURES


Figure page

2-1 Examples of spatial objects. A) A simple point object. B) A simple line object. C)
A simple region object. D) A complex point object. E) A complex line object. F) A
complex region object. .................. .. ........... 21

2-2 The 9-intersection model and topological predicates. A) The 9-intersection matrix.
B) The numbers of topological predicates between two simple/complex spatial objects. 22

2-3 Examples of moving objects. A) A single-component moving point object. B) A single-
component moving region object. C) A multi-component moving point object. D) A
multi-component moving region object. ................ ........ 24

2-4 Examples of spatiotemporal functions for moving points. A) Partially disappear. B)
Instantly appear. C) Have instantaneous jumps. D) Have spatial outliers. Examples
of spatiotemporal functions for moving regions. E) Partially disappear. F) Instantly
appear. G) Have instantaneous jumps. H) An example of a spatiotemporal predicate. 26

3-1 Examples of 0-continuous temporal functions. A) simultaneous movement. B) A merg-
ing situation. C) A splitting situation. D) A combined merging and splitting situation. 35

3-2 Examples of 0-discontinuous temporal functions. A) An instantaneous jump in an
mreal object. B), C) Two constellations with time instants at which the function is
event-)-discontinuous. .................. .. ........... 36

3-3 Moving point object given by a temporal function with a local minimum and a local
maximum. ................... ............ ....... 38

3-4 Modeling potential future positions of spatiotemporal objects. A) For a hurricane's
eye at now+12 hours. B) Within the 12-hour period. C) For a vehicle at now+15 min-
utes. D) Within the 15-minute period. E) For a vehicle with a constant speed at now+15
minutes. F) Within the 15-minute period.. ................. ....... 42

3-5 Representing the future prediction of a hurricane's eye using a moving region with a
moving confidence distribution. The gradient indicates varied degree of confidence. .. 45

3-6 Examples of valid future predictions. A) A continuousfpoint object. B) A continu-
ousfregion object. C) A discontinuous region object. An example of invalid future
predictions. D) A dimensionally collapsed object with multiple types. . ... 46

3-7 Example of a historical temporal domain time that starts from -- and ends at tc in-
clusively. ................... ........... ..... ... 48

3-8 Example of a future temporal domain time that starts exclusively from tc and ex-
tends indefinitely towards +. .................. .......... 48

3-9 Example of a moving balloon object of type mballoonpr. .. . . 52









Definition 4.15 : Let a be a non-temporal type. The constant unit type of a is defined as:


const (c) = interval x o- {I}


A unit is not allowed to contain an undefined or empty value since for such interval, we

can simply let no unit exist within a mapping. The type constructor const is used for defining

temporal unit for int, string, and bool. However it can also be applied to other data types for

applications where values of such types change only in discrete steps. The value of a constant

unit function of value v at any time instant t of a unit is trivially given by t(v, t) = v.

For the real type, we introduce a unit type real in Definition 4.16 for the representation of

moving real numbers within a temporal unit. To balance the trade-off between the expressiveness

and simplicity of the representation, the "simple" function for this unit type is chosen to be either

a polynomial of degree less than or equal to two or a square root of such a polynomial. Such

square root functions are required to express the time-dependent distance functions in Euclidean

metric. Thus, with this choice, one can implement the temporally lifted versions of the size,

perimeter, and distance operations.


Definition 4.16 : The unit type real is defined as:


real = interval x {(a, b, c,r) a,b, c E real,r E bool}


The evaluation of a unit function of real is given as:

at2 + bt + c if-ir
t ((a, b, c, r), t) =
/at2 +bt+c ifr


4.2.2 Temporal Units for Spatial Data Types

The temporal evolution of spatial objects is characterized by its continuity and smoothness

properties similar to that of the real numbers and can be approximated in various ways. Although

complex functions like polynomials of degree higher than one can be used as the basis of

representation, to strike the balance between richness and simplicity of representation, we make









3-10 Examples of predictions at a time instant. A) A point-based prediction with a discrete
probability distribution. B) A line-based prediction with a one-dimensional contin-
uous distribution. C) A region-based prediction with a two-dimensional continuous
distribution. .................. .................. .. .. 57

3-11 Relations between traditional moving object data model and balloon data model. . 64

3-12 Possible relationships between parts of balloon objects A and B. A) When A's current
instant is earlier. B) At the same time. C) Later than that of B's. . . ... 65

3-13 Future crossing situation between a balloonpp object P and a balloonpr object R. 66

3-14 Movement of the eye of hurricane Katrina. ................... ....... 74

4-1 Representations of a line object. A) In the abstract model. B) In the discrete model. 80

4-2 Representations of a region object. A) In the abstract model. B) In the discrete model. 82

4-3 A discrete representation of a moving point object. A) A temporal unit. B) A sliced
representation .................. .................. .. 83

4-4 Representing a moving line object. A) A uline value. B) A discrete representation of
a moving line object. .................. .. ............ 89

4-5 Example of a region value. .................. ......... 90

5-1 Examples of the order relation on halfsegments: h < h2 . . ..... 100

5-2 A line2D object L and a region2D object R .................. ... .103

5-3 Example of the segment classification of two region2D objects . . ... 112

5-4 Changing overlap numbers after an intersection. ............... ..113

5-5 Splitting of segments. A) two intersecting segments. B) two partially coinciding seg-
ments (without symmetric counterparts). C) A segment whose interior is touched by
another segment. Digits indicate part numbers of segments after splitting. ...... .115

5-6 Sweep line status. A) Before the splitting (S4 to be inserted). B) After the splitting.
The vertical dashed line indicates the current position of the sweep line. . ... 115

5-7 Algorithm for computing the topological feature vectors for two point2D objects 120

5-8 Boundary point intersections. A) Boundary points (in black) and connector points (in
grey) of a line2D object. B) A scenario where a boundary point of a line2D object ex-
ists that is unequal to all points of a point2D object. C) A scenario where this is not
the case .................. ... ................... .... 120

5-9 Algorithm for computing the topological feature vectors for a point2D object and a
line2D object .................. ............. .. 122














01 algorithm MatrixThinning
02 input: Three-dimensional 9IM im. im[i, m] c {0, 1}
03 denotes entry (, m) (1 < 1,m < 3) of the ith
04 9IM (1 < i < na,)-
05 output: Three-dimensional thinned out 9IM tim.
06 tim[i,l,m] c {0,1,*}. '*' is 'don't care' symbol.
07 begin
08 Create three-dimensional matrix pos of 'position'
09 matrices where pos[j, ,m] E {0, 1} denotes entry
10 (l,m) of the jth possible 9IM (1 < < 511);
11 Sort pos increasingly with respect to the number of
12 ones in a matrix;
13 Initialize all entries of matrices of tim with '*'; r := 1;
14 // Compute thinned out matrices
15 for each i in 1... na,p do
16 j := 1; stop := false;
17 while j < 511 and not stop do
18 k:= 1; unequal : true;
19 while 1 < k < na,p and i 4 k and unequal do
20 equal := im[i] and im[k] have the same values
21 at all positions (1, m) where pos [j, m] = 1;
22 unequal : unequal and not equal; inc(k);
23 endwhile;
24 if unequal then // Thin out im[i] by pos [j].
25 for each 1, m in 1... 3 do
26 ifpos[j,l,m] = 1
27 then tim[r, m] := im[i,l, m] endif
28 endfor;
29 inc(r); stop := true;
30 else inc(j);
31 endif
32 endwhile
33 endfor
34 end MatrixThinning.

Figure 5-16. Algorithm for computing the thinned out versions of the nR,p intersection matrices
associated with the topological predicates between two spatial data types ca and P









this case, we have to use the "wildcard" period predicate True or the "wildcard" instant predicate

true for expressing this. The algorithmic schema can be formulated as shown in Figure 5-28.

algorithm FunctionValuedRefinement(R, fiih dWiii i oal\)
input: Rfini dlul it nl\ = ((li, ri, ci, rci, pi, qi),..., (lb, rb, Icb, rcb, Pb, qb)) where li and
ri denote the left and right endpoints of the possibly reduced intervals of matching units, Ici and
rci whether the intervals are left-closed and right-closed respectively, and pi and qi are
pointers (unit numbers) to the matching units of mor or mo2 respectively
output: ObjectDevelopment as a string containing the development of mor and mo2
begin
ObjectDevelopment := ""
for each j in 1...b do
UnitDevelopment := Unitlntersect(lj, rj, lcj, rcj, pj, qj)
if j > 1 then
if rj = lj and not rcj 1 and not Icj then
ObjectDevelopment := ObjectDevelopment o "true"
else if rj 1 < lj then
ObjectDevelopment := ObjectDevelopment o "True"
endif
endif;
ObjectDevelopment := ObjectDevelopment o UnitDevelopment;
endfor;
(ObjectDevelopment,owc) := NormalizeDev(UnitDevelopment);
return (ObjectDevelopment,owc);
end FunctionVatlldRfin, nit l.

Figure 5-28. Function-valued interval refinement algorithm.


For each refined interval, we determine the unit development of the corresponding units of

the two moving objects by calling the Unitlntersect algorithm. This algorithm returns the unit

development specified by the two 3D unit objects. The algorithm are described in Figure 5-29. It,

in particular, have to take care of the degenerate case that the unit interval is a time instant. The

function NormalizeDev transforms the computed development into development normal form

(see [22]) and simultaneously checks whether the development contains the wildcards true or

True.

In the algorithm Unitlntersect, the term eval(vj, t) denotes an evaluation function that is

applied to the unit function vj for unit j at time t. This function yields a 2D spatial object. The

function InstantPred and PeriodPred annotates a topological predicate identification number









of G intersects the exterior of F, a boundary segment of G must be disjoint from F (new flag

segunshared). More formally, we define the semantics of the topological flags as follows:

Definition 5.5 : Let F E line2D, G E region2D, and VF and VG be their topological feature


vectors. Then,

(i) VF [seginside]


(ii)
(iii)


VF [segshared]

VF [segoutside]


(iv) vF[poishared]


(v)
(vi)


VF [boundinside]

VF [boundshared]


(vii) VF[botud _dii'iiu]i


(viii) VG[seg unshared]


: E 3f E H(F) Vg E H(G):
-seglntersect(f.s,g.s) A seglnRegion(f.s,G)

: E 3lf e H(F) 3g e H(G) : \,,l r i, I(f.s,g.s)

: E 3f E H(F) Vg E H(G):

-seglntersect(f.s,g.s) A -seglnRegion(f.s,G)

:< 3lf e H(F) 3g e H(G) :poilntersect(f.s,g.s) A

poilntersection(f.s,g.s) V B(F)

: 3 fE H(F) : poilnRegion(dp(f),G) A dp(f) e B(F)

: 3lf e H(F) 3g e H(G) :poilntersect(f.s,g.s) A

poilntersection(f.s,g.s) E B(F)

: E 3f c H(F) Vg E H(G): -poilnRegion(dp(f), G) A

dp(f) e B(F) A -on(dp(f),g.s)
:

The operation seglnRegion is assumed to check whether a segment is located inside a region;
it is an imaginary predicate and not implemented as a robust geometric primitive.

The exploration algorithm for this case is given in Figure 5-12. The while-loop is executed

until at least the first object has been processed (line 10) and as long as not all topological flags

have been set to true (lines 11 to 14). In case that we only encounter a halfsegment h of F (line

15), we insert its segment component s into the sweep line status if it is a left halfsegment (line

16). If it is a right halfsegment, we find out whether h is located inside or outside of G (lines 18

to 23). We know that it cannot coincide with a boundary segment of G, since this is another case.

The predicate predexists checks whether s has a predecessor in the sweep line status (line 18);

it ignores segments in the sweep line status that stem from F. If this is not the case (line 22), s
























847,244)


A B

Figure 5-37. Visualizing hurricane Katrina. A) Katrina's prediction #7 in object-based
perspectives. B) Temporal analysis perspective on August 27, 2005 at 12:00 GMT.


have been recorded, and 1863 predictions have been produced of which 655 (or about 35%) have

been found to be inaccurate. We have also discovered that most of the storms that have high

percentage of inaccurate predictions often experience certain behaviors such as making 90 degree

turns and u-turns (e.g., hurricane Kate (#1312) as shown in Figure 5-38B), or forming a loop

(e.g., hurricane Lisa (#1329) as shown in Figure 5-38C). It is clear that this type of information

would be useful for researchers to study such behaviors and make necessary adjustments to their

prediction model.


I STL~i (SptioT~p~al lgera Ve-)belin 1


-Mr~ l~rr~y~sm~ru -Te;nmpora Alebr Vi









3.1.2 Modeling Historical Movements of Moving Objects

Acquiring knowledge of the historical locations and movement (trajectories, routes) of

moving objects is important for many spatiotemporal analysis tasks in order to learn from the

past. For example, hurricane research benefits from the observation of former hurricanes in order

to understand their structure and behavior and to learn from them for the future. By studying the

past, fire management is able to identify critical areas having a high probability of a fire outbreak

and to analyze the spread, merge, and split of fires over time.

Our modeling of historical movement assumes full knowledge about the past locations and

extent of moving objects in their time domains (that is, when they are defined). By using partial

temporal functions, lacking knowledge is expressed by time intervals when such functions are

undefined. Spatiotemporal data types for historical moving objects can be directly modeled

on the basis of the t constructor. We define a type constructor 0 with 0(c() C t(a) for oa E

{point, line, region} in Definition 3.7.


Definition 3.7 : Let oa E {point, line, region}.

0(a) = {f e T(a) IVt e dom(f) : t < now}

We use the spatiotemporal data types point = O(point), line = O(line), and region =

O(region) to describe historical movements of moving points, moving lines, and moving regions

respectively. Due to their precise specification, these types replace the spatiotemporal data types

point, mline, and region discussed in Section 2.2.1.

3.1.3 Modeling Future Predictions of Moving Objects

Predicting the locations and movement of moving objects in the near future is of great

importance for many spatiotemporal applications and usually called location management [34].

Examples are the anticipation of possible terrorist activities, homeland security in general to

protect territory from hazards, fire outbreak and hurricane prediction to determine evacuation

areas, and disaster management to initiate emergency preparedness and mitigation efforts.









(for example, inside) between the spatial projection of such a trajectory volume and a static

region. Depending on this relationship, the uncertainty of a future spatiotemporal predicate

can be captured and represented by using any combination of the prefixes sometimes, al a .

possibly, and definitely. While this model is able to model future spatiotemporal predicates to a

certain extent, it is limited to only those relationships between a moving point and a static region.

In contrast, our spatiotemporal predicate model is a general model which supports both the past

and future relationships between any combination of spatiotemporal data types.

2.3 Implementation Aspects of Spatial and Spatiotemporal Data Models

As far as spatial data model is concerned, so far only a few models have been developed

for complex spatial objects. The works by [6, 30, 31, 59, 62] are the only formal approaches;

they all share the same, main structural features. The OpenGIS Consortium (OGC) has proposed

similar geometric structures called simple features in its OGC Abstract Specification [45]

and in its Geography Markup Language (GML) [46], which is an XML encoding for the

transport and storage of geographic information. These geometric structures are described

informally and are called MultiPoint, MultiLineString, and MultiPolygon. Another similar but

also informally described spatial data type specification is provided by ESRI's Spatial Database

Engine (ArcSDE) [24]. Further, database vendors have added spatial extension packages that

include spatial data types through extensibility mechanisms to their database systems. Examples

are the Informix Geodetic DataBlade [35], the Oracle Spatial Cartridge [47], and DB2's Spatial

Extender [11]. These implementations offer limited sets of named topological predicates for

simple and complex spatial objects. But their definitions are unclear and their underlying

algorithms unpublished. The open source JTS Topology Suite [37] conforms to the simple

features specification [45] of the Open GIS Consortium and implements the aforementioned eight

topological predicates for complex spatial objects through topology graphs. A topology graph

stores topology explicitly and contains labeled nodes and edges corresponding to the endpoints

and segments of a spatial object's geometry. For each node and edge of a spatial object, one

determines whether it is located in the interior, in the exterior, or on the boundary of another










time area of potential positions time I potential positions over time time road segment
now+12h ---- hE Z now+12h ----- ---- now+15m ---
now +8h -
now +4h -
now -------- now --------- now --------



X X X
x x x
A B C
time road segments over time time potential positions time positions over time
now+15m ------------- -- now+15m ------------ now+15m
now+l0m I-------------- now+lOm
now+5m ------------ now+5m
now now now -



X X X
D E F

Figure 3-4. Modeling potential future positions of spatiotemporal objects. A) For a hurricane's
eye at now+12 hours. B) Within the 12-hour period. C) For a vehicle at now+15
minutes. D) Within the 15-minute period. E) For a vehicle with a constant speed at
now+15 minutes. F) Within the 15-minute period.


of the potential future positions and/or the extent of a predicted moving object since both its

positions and its extent are afflicted with uncertainty. For example, the position of the eye of a

hurricane at 12 hours from now may possibly be anywhere within a predicted region (Figure

3-4A). That is, this region represents all potential future positions of the hurricane's eye at 12

hours from now. Likewise, if we are interested in the future positions for a certain period in the

future, for example, from the present time to 12 hours in the future, then the actual position can

be anywhere within a predicted volume if we adopt a three-dimensional interpretation (Figure

3-4B). This volume represents the geometric union of the predicted regions at all time instants

during the 12-hour period. It can also be interpreted as the development of a predicted region

over a period of time. Hence, it resembles a moving region which can be represented by using

our spatiotemporal data type (region).

Similarly, if we want to model the future position of a vehicle traveling in a road network,

we can only state that the position of the vehicle at 15 minutes from now will be somewhere

between mile marker 10 and 15. That is, the corresponding segment of the road represents the









executed at most + m + k times. The only operations needed on the sweep line status are addleft

and delright for inserting and deleting halfsegments; they require O(log(l + m + k)) time each.

No special predicates have to be deployed for discovering topological information. Due to the

splitting strategy, all dominating end points either are already endpoints of existing segments or

become endpoints of newly created segments. The operation look_ahead needs constant time. In

total, the algorithm requires O((l + m+ k) log(l + m+ k)) time and O(l + m+ k) space.

5.2.2.5 The exploration algorithm for the line2Dlregion2D case

Next, we describe the exploration algorithm for a line2D object F and a region2D object G.

Seen from the perspective of F, we can distinguish six cases between the interior and boundary

of F and the interior, boundary, and exterior of G. First, the intersection of the interiors of F

and G means that a segment of F lies in G (flag seginside). Second, the interior of a segment

of F intersects with a boundary segment of G if either both segments partially or fully coincide

(flag seg-shared), or if they properly intersect in a single point (flag poishared). Third, the

interior of a segment of F intersects with the exterior of G if the segment is disjoint from G

(flag segoutside). Fourth, a boundary point of F intersects the interior of G if the boundary

point lies inside of G (flag boundinside). Fifth, if it lies on the boundary of G, we set the flag

boundshared. Sixth, if it lies outside of G, we set the flag bounddisioint.

Seen from the perspective of G, we can differentiate the same six cases as before and obtain

most of the topological flags as before. First, if the interiors of G and F intersect, a segment of

F must partially or totally lie in G (already covered by flag seginside). Second, if the interior

of G and the boundary of F intersect, the boundary point of a segment of F must be located in

G (already covered by flag boundinside). Third, the case that the interior of G intersects the

exterior of F is always true due to the different dimensionality of both objects; hence, we do

not need a flag. Fourth, if the boundary of G intersects the interior of F, a segment of F must

partially or fully coincide with a boundary segment of G (already covered by flag segshared).

Fifth, if the boundary of G intersects the boundary of F, a boundary point of a segment of F must

lie on a boundary segment of G (already covered by flag boundshared). Sixth, if the boundary









if two consecutive unit intervals are adjacent, their unit function representations are different.

The value cl denotes the number of moving unit segments in each unit. What remains to be

explained is the structure of the unit function vi. In both cases of the moving line ml and the

moving region mr, we take the unstructured approach by representing the unit function vi as a

sequence of moving unit segments msk with 1 < k < cl for a moving line or with 3 < k < cl for

a moving region (since a region must be composed from a minimum of 3 segments). Thus, we

have vi = (msi,..., msc ). We can take this unstructured approach instead of a structured one

(with intermediate structures such as moving blocks for a moving line or moving face and hole

cycles for a moving region) because, at the spatial level, we have devised methods for validating

and computing the structure of an unstructured line or region object (which are based directly

on segments). For example, given a set of segments, we can validate whether it is a valid line

object by using a plane sweep process to check for intersecting or overlapping segments, or we

can validate whether it is a valid region object by using our cycle walk algorithm as presented

in [41]. This eliminates the need to represent intermediate structures such as blocks for a line

object or face and hole cycles for a region object since these structures are generally used for

validation purposes, and if they are needed, they can be computed from the set of segments by

using a similar flavor of our validation algorithms. Another important difference between the

representation of a moving line and that of a moving region is that a moving unit segment msk

in the case of a moving region contains an additional information ia which is a Boolean value

indicating whether the interior of the region is above the segment at all time instants of the unit

interval. This allows one to derive a region data structure representation at any time instant

of the unit interval since such a data structure are composed of attributed halfsegments (see

Section 5.1.2) which can be constructed by using this information.

5.1.3.2 Data structures for balloon and spatiotemporal balloon data types

Spatiotemporal balloon data types are defined based on basic spatiotemporal data types.

Consequently their data structures are also based on those of basic spatiotemporal data types. The

data structure of a balloon object b E mapping(uct, up) can be described as follows:









Table 3-5. Number of balloon predicates between balloon pp, balloon pr, and balloonrr
objects.
balloonpp balloon-pr balloonrr
balloon-pp 4,394 14,924 43,904
balloon-pr 14,924 1,600,144 136,996,944
balloonrr 43,904 136,996,944 21,237,972,784


of the multiplication represents the number of distinct STPs for each element of the sequence.

Similarly, we can determine the number of balloon predicates between all type combinations of

balloonpp, balloonpr, and balloonrr as shown in Table 3-5. Since the numbers of STPs that

involve moving line objects are not specified in [22], we omit those calculations that involve

balloon objects which are based on moving line objects.

3.4.2 Reasoning About Actual Future Interactions

So far, we have modeled balloon predicates based on the relationships between the geome-

tries of the parts of balloon objects. This allows us to distinguish relationships involving future

predictions as uncertain relationships with respect to the moving objects themselves. Unlike

relationships between the past movement histories which indicate interactions (non-disjoint

relationship) or non-interactions (disjoint relationship) that had definitely occurred between

the moving objects, uncertain relationships only indicate the existence of a chance whether the

moving objects will interact with one another in the future. Thus in this section, we will study

how this chance of future interaction between the actual moving objects can be quantified based

on the given relationship of their predictions.

Recall that the future prediction of a balloon object represents the set of all potential future

positions or extents of the moving object. This means that a non-interaction relationship with this

future prediction component guarantees a non-interaction relationship with the actual object in

the future. However, an interaction relationship with this future prediction component can only

signify a potential interaction with the actual object in the future. For example, if the route of a

ship does not intersect the future prediction of a hurricane, this means that there is no chance that

the ship will encounter the hurricane in the future. However, if the route crosses the hurricane's









5.3.2 Time-Synchronized Interval Refinement

It is obvious that the computation of the time-synchronized interval refinement requires

a parallel scan through the unit sequences and hence unit interval sequences of both object

representations. During the traversal, intersections of unit intervals of both moving objects have

to be detected. The effect is that temporally overlapping and thus matching units of both objects

are reduced to their common time interval and that some intervals of both objects are totally or

partially dropped (Figure5-24). But due to reasons of efficiency, we will not copy matching parts

and construct two reduced moving objects. Instead, we will take an additional interval sequence

data structure and only store common intervals with pointers to the matching units of the two

moving objects for later use.

time




Ti : III


Figure 5-24. Time-synchronized refinement of two unit interval sequences: two sets of time
intervals on the left side, and their refinement partition for development evaluation
on the right side.


The implementation of the parallel scan through the unit interval sequences of both moving

objects turns out to be not so trivial as it seems at first glance. For example, the deployment

of Allen's thirteen different temporal predicates [1], which uniquely characterize the possible

topological relationships between two intervals, is feasible but leads to a large number of case

distinctions and predicate evaluations that make a complete treatment error-prone and lengthy.

Our approach leads to shorter, faster (by a constant factor), and more comprehensible code and

is able to handle closed, half-open, and open intervals. It collects the start and end points of the

intervals of both objects in temporal order and then determines the intersection intervals. In the

following algorithm (Figure 5-25), the notation "()" denotes the empty sequence, "o" sequence

concatenation, the function eos tests whether the end of a sequence has been reached, the









operation such as distance involving this empty object would yield an empty value. We defined

the discrete data types for these base data types in Definition 4.1.

Definition 4.1 : Let int, real, string, and bool be the programming language types

provided for integers, real numbers, strings, and boolean values respectively. The discrete data

types int, real, string, bool, and instant are defined as:

int = int U {I} real = real U {I} string = string U {I}

bool = bool U {I} instant = real U {I}

Another time data type is the interval data type. We can represent a time interval by its

endpoints 1 (left) and r (right) and two boolean flags Ic and rc indicating whether it is left-closed

and right-closed respectively. We define the type interval in Definition 4.2.

Definition 4.2 : The type interval is defined as:

interval = {(1,r, c, rc) r E instant, c, rc E bool, < r, (1 = r) = (Ic = rc = true)}

Between two intervals, we are interested in two types of relationships namely disjointedness

and adjacency. We define interval relationships r_disjoint (right disjoint), disjoint, r_adjacent

(right adjacent), and adjacent in Definition 4.3.

Definition 4.3 : Given two time intervals i = (li, ri, Ici, rci) and j = (lj, rj, Icj, rcj), we define

their disjoint and adjacent relationships as follows:

rdisjoint(i, j) < ri < lj V (ri = lj A -(rci A lcj))

disjoint(i, j) rdisjoint(i, j) V r_disjoint(j, i)

r adjacent(i, j) + disjoint(i,j) A (ri = Ij A (rci V lcj))

adjacent(i, j) > r adjacent(i, j) V r_adjacent(j, i)









three components at t to two components after t). Figures 2-4A and 2-4E represent moving

objects that are alternately continuous and discontinuous on disjoint time intervals, that is, they

are represented by partial functions. Figures 2-4B and 2-4F illustrate the case of an instantly

appearing moving object with isolated (time, spatial object) pairs. We allow this kind of dis-

continuity although it is debatable whether a moving object can exist at a time instant only. Our

main motivation to allow this situation consists in desired closure properties of spatiotemporal

operations. If, for example, two moving point objects intersect in a single point at a time t, we

would like to be able to represent the intersection result as a moving point object. Similarly, a

time-slice operation should be able to yield a region object at time t as a moving region object.

We also permit the cases in Figures 2-4C and 2-4G as valid moving objects. The reason is that

instantaneous jumps can also be interpreted as the termination of one component and the emer-

gence of another component at the same time instant. Figure 2-4G also shows two interesting

situations where the bottom region of an upper component is located in the top region of a lower

adjacent component. The function value at such a time instant is the larger region. Again, it is

doubtful whether such an instantaneous shrinking (or growing) can happen in spatial reality but

closure properties require the acceptance of such situations. A union of three moving region

objects, each representing one of the three components, leads to the moving region in Figure 2-

4G. We denote all aforementioned situations of permitted discontinuous topological events as

event-4-discontinuous.

A situation we do not allow is a spatial outlier at a time instant t as in Figure 2-4D. It is

given by a temporal function that does not represent a realistic movement since intuitively it

deviates from its general route and returns to it for a time instant only. Definition 3.5 provides the

full definition of event-'-discontinuity.


Definition 3.5 : Let a E {point, line, region}, f E r(a) = time -- a, t E time, and f(t) # I.

Further, let 1 = limo 0 f(t 8) if it exists, and let u = limo 0 f(t + 8) if it exists. Then f is

event-o-discontinuous at t if one of the following conditions holds:









matrix predicate will be different from the number of topological predicates yielding false for that

matrix predicate. An upper bound is the number 8, since at most eight matrix predicates have to

be checked to identify a topological predicate uniquely; the ninth matrix predicate yields always

true. Hence, our goal is to determine a nearly balanced, cost-optimal, full binary decision tree for

each collection of nB,p intersection matrices.

If we do not have specific knowledge about the probability distribution of topological

predicates in an application (area), we can only assume that they occur with equal distribution.

But sometimes we have more detailed information. For example, in cadastral map applications,

an adequate estimate is that 95% (or even more) of all topological relationships between regions

are disjoint and the remaining 5% are meet. Our algorithm for constructing MCDTs considers

these frequency distributions. It is based on the following cost model:


Definition 5.8 : Let Mcp be an MCDT for the spatial data types a, P3 {point, line, region},

wi be the weight of the topological predicate pi with 1 < i < na,p and 0 < wi < 1, and di with

1 < di < 8 be the depth of a node in Mcp at which pi is identified. We define the total cost CMCDT

of Mc,p as
cMCD p n,,p
CAf D= E wi di with L wi = 1
i=1 i=1

That is, our cost model is to sum up all the weighted path lengths from each leaf node

representing a topological predicate to the root of the MCDT. If all topological predicates occur

with equal probability, we set wi = The issue now is how to find and build an optimal

MCDT with minimal total cost C"CDT on the basis of a given probability distribution (weighting)

for the topological predicates. If all topological predicates occur with equal probability, this

problem corresponds to finding an optimal MCDT that requires the minimal average number of

matrix predicate evaluations to arrive at an answer.

Figure 5-21 shows our recursive algorithm MCDT for computing a minimum cost decision

tree for a set im of na,p 9-intersection matrices that are annotated with a weight representing

the corresponding predicates's probability of occurrence, as it is characteristic in a particular









value of the absolute present. This temporal domain is applicable to all objects of both t(3) and

MC(3). Figure 3-8 depicts an example of time for a moving object.

Having defined time and time to restrict the temporal domains of historical movements

and future predictions of moving objects, we are now ready to define our balloon data types.

We integrate the past (0) and the future prediction (p) type constructors to form a new type

constructor Q for balloon objects which is defined on the entire time domain. This time domain

is a result of a temporal composition of time and time. Since the spatial type as the argument

of 0 refers to a different spatial object than that of the spatial type as the argument of p, we

denote the former by a and the latter by P. Thus, we have (c(a, 3) = 0(a) x qp(3). That is, for a

balloon object b = (h, f), h E 0(a) represents the past movement of a spatial object of type a and

f E q(p3) represents the future prediction of b given that the set of its potential future positions

at a future time instant is described by a spatial object of type P. As indicated earlier, not all

combinations of a and 3 constitute valid movements. For example, it is not possible to usefpoint

to represent the future extent of a moving region. If this were to be possible, this means that, at a

future time instant, the region object would have evolved into a point object. This is not possible

since our definition of movement does not allow movements involving dimensional collapse into

a different type. Therefore, the combination for which a is the region type and 3 is the point type

has been proved to be an invalid combination. The general idea here is that the set of potential

future positions or extent of a moving object at a future time instant must be a spatial object of

dimension greater than or equal to the dimension of the object that is moving. This means that

an object can move or evolve such that at a future time instant, it fits in or equal to its prediction

without collapsing its dimension. Let dim be a function that returns the dimension of a spatial

type. It is required that dim(3) > dim(a) holds for all valid combinations of a and 3. We now

define our type constructor n for balloon data types in Definition 3.11.


Definition 3.11 : The type constructor Q((a, 3) for a balloon data type describing a

balloon object whose past movement and future prediction are based on the spatial type a and 3

respectively, is defined as Q((a, 3) = 0(a) x qp(3) such that all of the following conditions hold:


































To my dear family who provides me with love, encouragement, and support, making this

milestone possible









(1/2)- and (2/1)-segments, Lemma 5.6(iii) and 5.6(iv) imply DF n G 4 0 and F n G 4 0,

respectively. From these two implications, by using Lemma 5.8(iv) and 5.8(v), we can derive

in both cases F n G 4 0. Statements (ii) and (iv) correspond to Lemma 5.6(iv) and 5.6(iii),

respectively. For (iii) [(vii)], the forward implication corresponds to Lemma 5.7(ii) [5.7(iii)]. The

backward implication for (iii) [(vii)] requires Lemma 5.6(i) [5.6(ii)] and Lemma 5.8(ii) [5.8(iii)]

for the (0/1)- and (1/0)-segments ofF [G], Lemma 5.6(vi) [5.6(vi)] for the (1/1)-segments of

F (and hence G), as well as Lemma 5.6(iv) [5.6(iii)] and Lemma 5.8(v) [5.8(iv)] for the (1/2)-

and (2/1)-segments of G [F]. For (v), the forward implication can be shown as follows: if the

boundaries of F and G intersect, then either they share a common meeting or intersection point,

that is, the flag VF [boundpoishared] is set, or there are two halfsegments of F and G whose

segment components are equal. No other alternative is possible due to our splitting strategy

for halfsegments during the plane sweep. As we know, equal segments of F and G must have

the segment classes (0/2), (2/0), or (1/1). The backward implication requires Lemma 5.6(v)

for (0/2)- and (2/0)-segments ofF (and hence G), Lemma 5.6(vi) for (1/1)-segments ofF

(and hence G), and Lemma 5.8(i) for single meeting and intersection points. Statement (vi)

[(viii)] corresponds to Lemma 5.6(i) [5.6(ii)]. Statement (ix) turns out to be always true since our

assumption in an implementation is that our universe of discourse U is always properly larger

than the union of spatial objects contained in it. This means for F and G that always F U G C U

holds. We can conclude that U (F U G) 7 0. According to DeMorgan's Laws, this is equivalent

to (U F) n (U G) 4 0. But this leads us to the statement that F n G- 0. o

Summarizing our results from the last two subsections, we see that Lemmas 5.1 to 5.5,

and Theorem 5.1 provide us with a unique characterization of each individual matrix predicate

of the 9-intersection matrix for each type combination. This approach has several benefits.

First, it is a systematically developed and not an ad hoc approach. Second, it has a formal

and sound foundation. Hence, we can be sure about the correctness of topological feature

flags and segment classes assigned to matrix predicates, and vice versa. Third, this evaluation

method is independent of the number of topological predicates and only requires a constant









algorithm STPredEvaluator(mo\ mo2, Q, qwc)
input: two moving objects mo ( = (n, ls, objpbbi,...) and mo2 = (n, s2, objpbb2,...),
topological string pattern Q that has to be checked with respect to mo\ and mo2, flag
qwc indicating whether Q includes wildcards true or True
output: true if Q matches actual development; false, otherwise
begin
if n = 0 or m = 0 or not Tlntersects(lss, 1s2)
then return false
else
Rfihi dlii, i 'al\ := TimeSynchronizelntervals(mo\, mo2);
(O'bi, \Development,owc) := FunctionValuedR, fii ( m, mu(Rlfim, dini, nia'l\o
return PatternMatching(Q,qwc,Oli, iDevelopment,owc)
endif
end STPredEvaluator.

Figure 5-23. Spatiotemporal predicate evaluator algorithm.


The algorithm TimeSynchronizelntervals yields a sequence of matching units with concor-

dant, possibly reduced unit intervals. As we will see in Section 5.3.2, its runtime complexity is

O(n + m+ b) where n and m are the numbers of unit intervals of mo\ and mo2, respectively, and b

is the number of matching unit intervals.

The algorithm FunctionVl h, dR, fin, i, nt further refines this sequence depending on the unit

functions; it returns the so-called object development and a boolean flag indicating the existence

of the wildcards true or True in the unit development. In Section 5.3.3, we will show that this

takes O(bnmax (z2ax -+ log nmax)) where Zmax is the maximum number of moving unit segments or

moving unit single points (both also known as unit elements) in a unit of mo\ and mo2 and nmax

is the maximum number of changes in the topological relationships between unit elements of

matching units.

The algorithm PatternMatching checks the query string and the actual object development

string for matching pattern. The flags qwc and owc indicate whether the corresponding strings

contain wildcards. In Section 5.3.4, we will show that for the case that both strings do not

comprise wildcards this requires O(v + w) time where v and w are the lengths of the strings.

Finally, the runtime complexity of the algorithm STPredEvaluator is the sum of the runtime

complexities of its subalgorithms.










exist between segment endpoints of the lines at the start and the end of a unit line interval as

long as the non-rotating constraint is satisfied. To get a better approximation, this unit can be

divided into smaller units by introducing additional internal instants along with their discrete

representations. It can be easily seen that arbitrary precision of representation can be achieved

with this approach.

4.2.2.3 Unit region

To represent a temporal unit of a moving region, we introduce the unit type region. Similar

to line, the fundamental of the discrete representation of the region data type is also based on

segments. Thus, we can employ the same restriction on moving segments as for uline where

rotation of segments within unit intervals is not permitted. Therefore, we can base our definition

of region on the same set of all coplanar pairs of lines, that is, MSeg, with additional constraints

to ensure that we always obtain a valid region throughout the entire unit (validity constraints).

An example of a valid region value (with allowable degeneracies) is illustrated in Figure 4-5.

Following the same structured approach for defining the region data types, we can define a

time

time i' ,~----------------








x

Figure 4-5. Example of a region value.


region based on the concept of moving cycle (MCycle) and moving face (MFace). However,

we do not need to specify the validity constraints on MCycle and MFace here as this will be

done directly in the region definition. We introduce the sets MCycle and MFace to describe the









future prediction, a number of possibilities can happen. The ship will either cross, meet, or avoid

the hurricane all together. There are two interesting questions here that we need to investigate:

(1) "What are the different types of possible interactions between the actual objects in the future

given an interaction between their future predictions?" and (2) "How much of a chance that the

objects will interact in the future?"

The problem of the first question is similar to the problem of inferring the set of potential

topological relationships between two spatial objects given the topological relationship between

their bounding boxes as described in [10]. However, a future prediction is not a bounding box.

In fact, at any instant of a prediction, a moving object can be anywhere within its prediction.

This allows plenty of freedom for any possible configuration of the object within its prediction,

more specifically, within any divisible part of the interior of its prediction. This means that for an

interaction between two predictions where the interiors of the predictions intersect, all possible

types of interaction are possible between the actual objects. On the other hand, if the interiors

of the predictions do not intersect but their boundaries intersect, the actual moving objects can

either interact by sharing their boundaries or be disjoint. Finally, if the predictions are disjoint,

this implies that the actual moving objects will be disjoint as well. Table 3-6 summarizes these

interaction inferences.
Table 3-6. Inferring the types of interaction between actual objects from the types of interaction
between their predictions.
Prediction Interactions Possible Object Interactions
interior intersection any interaction possible
boundary intersection boundary intersection, disjoint
disjoint disjoint


In order to answer the second question, let us consider each type of prediction interactions.

For disjoint predictions, it is guaranteed that the object will be disjoint. Thus the chance of

interaction in this case is 0. For predictions with boundary intersection, the chance of the actual

objects sharing their boundaries at this intersection is proportional to the product of the point-set

confidence values of the intersection with respect to each object. This quantity is an infinitely

small positive number approaching 0 since the dimension of the boundary intersection is always









[29] R. H. Giiting. Geo-Relational Algebra: A Model and Query Language for Geometric
Database Systems. In Int. Conf on Extending Database Technology (EDBT), pages
506-527, 1988.

[30] R. H. Gilting and M. Schneider. Realms: A Foundation for Spatial Data Types in Database
Systems. In 3rd Int. Symp. on Advances in Spatial Databases, LNCS 692, pages 14-35.
Springer-Verlag, 1993.

[31] R. H. Giiting and M. Schneider. Realm-Based Spatial Data Types: The ROSE Algebra.
VLDB Journal, 4:100-143, 1995.

[32] R.H. Giiting, M.H. B6hlen, M. Erwig, C.S. Jensen, N.A. Lorentzos, M. Schneider, and
M.Vazirgiannis. A Foundation for Representing and Querying Moving Objects. ACM
Trans. on Database Systems (TODS), 25,(1,):881-901, 2000,.

[33] R.H. Giiting, T. de Ridder, and M. Schneider. Implementation of the ROSE Algebra:
Efficient Algorithms for Realm-Based Spatial Data Types. In Int. Symp. on Advances in
Spatial Databases, 1995.

[34] R.H. Giiting and M. Schneider. Moving Objects Databases. Morgan Kaufmann Publishers,
2005.

[35] Informix Geodetic DataBlade Module: User's Guide. Informix Press, 1997.

[36] Y. Guo S. Grumbach J. Chen, X. Meng and H. Sun. Modeling and Predicting Future
Trajectories of Moving Objects in a Constrained Network. In Int. Conf on Mobile Data
Management (MDM), page 156, 2006.

[37] JTS Topology Suite. Vivid Solutions, 2007. URL:
http://www.vividsolutions.com/JTS/JTSHome.htm.

[38] B. Kuijpers and W. Othman. Trajectory databases: Data models, uncertainty and complete
query languages. In llth International COrt, rr, l on Database Theory, pages 224-238,
2007.

[39] M. McKenney, A. Pauly, R. Praing, and M. Schneider. Preserving Local Topological
Relationships. In ACM Symp. on Geographic Information Systems (ACM GIS), pages
123-130. ACM, 2006.

[40] M. McKenney, A. Pauly, R. Praing, and M. Schneider. Multi-Structured Large Objects in
Databases. Technical report, University of Florida, Department of Computer & Information
Science & Engineering, 2006.

[41] M. McKenney, A. Pauly, R. Praing, and M. Schneider. Ensuring the Semantic Correct-
ness of Complex Regions. In 1st Int. Workshop on Semantic and Conceptual Issues in
Geographic Information Systems (SeCoGIS), pages 409-418, 2007.

[42] M. McKenney, A. Pauly, R. Praing, and M. Schneider. Local Topological Relationships for
Complex Regions. In Symposium on Spatial and Temporal Databases, 2007.









during the plane sweep. A purely static sequence structure is insufficient in this case, since

detected intersections have to be stored and handled later during the plane sweep. In order

to avoid a change of the original object representations, which would be very expensive and

only temporarily needed, each object is associated with an additional and temporary dynamic

sequence, which stores newly detected points or halfsegments of interest. Hence, our parallel

object traversal has to handle a static and a dynamic sequence part for each operand object

and thus four instead of two point or halfsegment sequences. It returns the smallest point or

halfsegment from the four current cursor positions. We will give an example of the parallel object

traversal when we discuss our plane sweep approach in Section 5.2.1.3.

To simplify the description of this parallel scan, two operations are provided. Let 01 E o and

02 E p with a, 3 E {point2D, line2D, region2D}. The operation \c I 1fi [iri\(O1, 02, object, status)

selects the first point or halfsegment of each of the operand objects 01 and 02 and positions a

logical pointer on both of them. The parameter object with a possible value out of the set {none,

first, second, both} indicates which of the two object representations contains the smaller point

or halfsegment. If the value of object is none, no point or halfsegment is selected, since 01 and

02 are empty. If the value is first (second), the smaller point or halfsegment belongs to 01 (02).

If it is both, the first point or halfsegment of 01 and 02 are identical. The parameter status with

a possible value out of the set {endof-none, endof-first, endofsecond, endofboth} describes

the state of both object representations. If the value of status is endofnone, both objects still

have points or halfsegments. If it is endof-first (endofsecond), 01 (02) is exhausted. If it is

endofboth, both object representations are exhausted.

The operation selectnext(Oi, 02, object, status), which has the same parameters as

select-first, searches for the next smallest point or halfsegment of 01 and 02. Two points

(halfsegments) are compared with respect to the lexicographic (halfsegment) order. For the

comparison between a point and a halfsegment, the dominating point of the halfsegment

and hence the lexicographic order is used. If before this operation object was equal to both,

selectnext moves forward the logical pointers of both sequences; otherwise, if object was equal









accuracy of the prediction itself. However, there are many ways to define the semantic of such

accuracy. One way is to determine the density value of each point of the actual movement from

the prediction and then determine the mean value over the period of the prediction. We use the

accuracyat operation for this purpose.

As far as the predicate operations are concerned, the unary operation isempty is obvious.

The relationship between the entire moving balloon objects does not make much sense and is

difficult to find any practical meaning. However, the relationship between their balloon object

components such as their final balloon objects offers insight into the spatiotemporal relationship

between their past movements as well as their future predictions. Thus, we define the binary

predicate operation between two moving balloon objects to have the same semantic as the binary

predicate operation between their final balloon objects. If an instant of the dynamic time domain

is specified, the balloon objects at this instant will be used to determine the spatiotemporal

relationship. Similarly, the interaction-potential and interaction-possible operations also have

the same semantic as if they are applied to the final balloon objects or the corresponding balloon

objects at a specified dynamic time instant. Therefore, one can always determine or verify the

spatiotemporal relationship between any states (balloon objects) of moving balloon objects. We

discuss this topic in more detail in the next section.

3.4 Spatiotemporal Predicates

Since relationship between moving balloon objects does not make much sense and is very

difficult to find any practical meaning, we will only focus on the modeling of the relationship

between balloon objects.

Defining the relationship between uncertain movements of moving objects is a very complex

task. For instance, consider a prediction of an airplane that crosses a prediction of a hurricane.

It is not necessary that the airplane will always cross the hurricane; it may only get close to

or touch the actual hurricane even though its prediction crosses the hurricane's prediction.

However, there is a chance that the airplane would cross the hurricane as well. The quantification

of this chance of future interaction of the two objects depends on a complex calculation of the









Based on Definitions 3.4 and 3.5, we are now able in Definition 3.6 to specify the desired

properties of the type constructor T for representing valid moving objects. The notations [a, b] and

]a, b[ represent closed and open intervals respectively with endpoints a and b.

Definition 3.6 : Let a E {point, line, region} and r(a) = time -- a. We restrict T to contain

only temporal functions f E (a) that fulfill the following conditions:
(i) 3n E N: dom(f) = UI [t2i1, t2]

(ii) V 1 < i < n :tzi- < tzi

(iii) V 1 < i < n : t2i < t2i+1

(iv) V 1 < i < n :t2i- = t2i t2i2 < t2i-

(v) V 1 < i < n :t2i-1 = t2i t2i < t2i+l

(vi) V 1 < i < n Vt2i < t < t2i : f is 4-continuous at t

(vii) V 1 < i < n Vt e {t2i-, t2i} : f is event-)-discontinuous at t
Function f is then called a moving object, and r(a) for some a is called a spatiotemporal data

type.

Definition 3.6(i) implies that the lifespan of a moving object must be given by a finite

number of time intervals. Definition 3.6(ii) allows that the endpoints of a time interval coincide.

Definition 3.6(iii) requires that the domain of a moving object is a sequence of adjacent or

disjoint time intervals. If a time interval should be degenerate and represent a time instant,

Definitions 3.6(iv) and (v) ensure that the instant does neither coincide with the right endpoint

of its preceding time interval nor with the left endpoint of its next time interval. The reason is

that a moving object component has to be isolated if it only exists for a time instant. The last two

definitions require 4-continuity within time intervals and event-)-discontinuity at time interval

endpoints.

From now on, we will use the type constructor T and all the types and concepts derived from

it in the sense of Definition 3.6.










whose temporal domains overlap since, in this case, the two parts may be defined on the same

period of time. Figure 3-12 illustrates all the possible related pairs for each scenario between

parts of A and B.

Ah Ac Ap Ah Ac Ap Ah Ac Ap
A: I n A: I A: I t
time time time
Bh Bc Bp Bh Be Bp Bh Be Bp
B: B: I B: I-
time time time
possible pairs: (Ah,Bh), (Ap,Bh), (Ap,Bp) possible pairs: (Ah,Bh), (Ap,Bp) possible pairs: (Ah,Bh), (Ah,Bp), (Ap,Bp)
A B C

Figure 3-12. Possible relationships between parts of balloon objects A and B. A) When A's
current instant is earlier. B) At the same time. C) Later than that of B's.


Although there are four possible types of relationships between all parts of two balloon

objects, it turns out that in any case, there are at most three types of relationships that may exist

between parts of any two balloon objects. These include jhi\litr\ .7'i\l, ihi\it ,, 'pr di, lita

or prediction/history, and prediction/prediction relationships. The history/prediction and

prediction/history relationships cannot exist at the same time due to the temporal composition

between the history and prediction parts of a balloon object.

3.4.1.2 Specification based on traditional spatiotemporal predicates

If we observe more closely, all the relationships between the parts of two balloon objects

that may exist in a scenario form a development such that the entire relationship between the two

balloon objects can be seen as a sequence of these relationships between their parts. For example,

consider an airplane represented by a balloonpp object P = (Ph,Pp) and a hurricane represented

by a balloonpr object R = (Rh,Rp) (Figure 3-13). In the past, P has been disjoint from R's path

as well as part of R's prediction. However, the predicted route of P crosses the predicted future of

R.

The relationship between P and R can be described as a development or sequence

of uncertain spatial and spatiotemporal predicates which hold at different times, that is,









on a regular basis or on a request basis. In any case, each prediction is to be stored and managed

in databases such that they can be later retrieved and used in query for various analysis. This

approach allows us to maintain a collection of predictions made over the past which may no

longer be available to be requested from a prediction model since this model may be tweaked

and modified over time by domain experts. Therefore, the development of the future prediction

part of a moving balloon object can be represented by a finite sequence of future predictions,

each made at a specific time instant of the history. Definition 4.22 formally describes a finite

representation of a development of prediction.


Definition 4.22 : Let a pair (t, mapping(ua)) represents a prediction of the unit type ua

with respect to a time instant t. The development of the future prediction of the unit type ua,

denoted by mPrediction(ua), is defined as:

mPrediction(uou) = {((t, pI), (t2,p2),...(tn, n)) Vi {1, 2,...,n} :

(i) ti E instant

(ii) pi E mapping(ua)

(iii) i < n = ti < ti+1}

Since this development of future prediction is a finite sequence of discrete values of

prediction, an instantiation of the development at any time instant other than those specified

would return an empty value. However, in query where the future prediction at time t of a moving

object is need, one can choose to use the most current prediction available whose prediction

period contains t. This is because each prediction is produced to describe the future prediction of

an object's movement for a certain period of time.

By discretely representing the development of the movement history and the future predic-

tion, we effectively obtain a representation for a moving balloon object, as defined in Defini-

tion 4.23, which is a combination of the two.













Hurricane Prediction Accuracy (2003 2007)
65
S60 g Total Inaccurate Predictions
STotal Accurate Predictions
55

50
45--

40-

35-

30-
25-

20-

15-
10-

5-


1302 104 1306 138 1310 1312 1314 1316 131 138 0 1322 1334135 213 1330 1332 1334 1336 1340 1342 13441B 134 135 1353 135 1357 i3 13 13 4 1366 137 10 1372 1374 1376 137 130 1B 2 13
1303 1305 1307 139 1311 1313 1315 1317 1319 1331 133 13 27 13 13 1331 1331335 1337 133 1341 1343 1345 1347 1347 1353 41356 1359 13 3M 1363 1357 1 379 1371 1373 5 1377 17 1301 1331 S 135
Storm ID


Figure 5-38. Hurricane analysis. A) Hurricane prediction analysis between 2003 and 2007. B)
Hurricane Kate (#1312). C) Hurricane Lisa (#1329).


0
I
o


STA~i (ptT F- M~b Ve-


77 ----- -.l 16mV-, 1rf,









operation initial. A more general way to access any state of a moving balloon object within its

defined period is through the use of the operation atinstant. To get a moving balloon object for a

specific period of time, we can use the atperiods operation. Other than these access operations,

an important operation that allows the realization of the dynamic of a moving balloon object is

the update operation. As the object moves in time, its history of movement is extended by a new

position or extent, and a new future prediction may be acquired. The new data can be in the form

of a new balloon object or a combination of a new state and a new prediction. In any case, the

update operation is used to update the moving balloon object to reflect the new movement.

Besides the normal set of operations, the spatiotemporal balloon data types support a special

set of operations that allows one to perform certain analysis about the accuracy of predictions.

This is one of the main features of this data model which can be of particular importance to

domain experts in research and development of prediction models. The moving balloon data

model allows one to verify whether or not, the object's actual movement stays within a specific

prediction made in the past. This is achieved by using the verify-predictionat operation. Given

a moving balloon object and a specific time instant, this operation intersects the prediction made

at this instant, if such a prediction exists, with a segment of the actual movement of the object

within the period of the prediction. If the resulting intersection is the same as the segment of the

actual movement, this means that the object's movement had always been within the confinement

of the prediction, and thus we say that this prediction provides full coverage of the movement.

Otherwise, the prediction provides only partial coverage which can be thought of as an inaccurate

or a bad prediction. An example of a partial coverage prediction is the prediction made at t2

as shown in Figure 3-9. Other predictions made at ti, t3, and t4 are full coverage predictions.

To determine whether a moving balloon object has any bad prediction, we use the operation

hasbadprediction. This operation is useful in persistent queries for monitoring the accuracy

of predictions as the object moves in time. We will discuss persistent queries and other types

of spatiotemporal queries in Section 3.5. So far, we have only discussed whether a prediction

provides partial or full coverage, but an even more interesting aspect is the quantification of the
















-S
-V

E
a

~~G;~L,



~P

~~n
~i~ar


o,

~- ~,$
S-
oLL~%s"
-3~= ~~
n

Gtn~
o~ E
a?~ss
O Y 2~
11 ~3 ~3
r

a


E
a
E
u

sE
,
4,

g,
o-o
n

a

S S
S
~a-a
ss
55
0O


c~g~
E


E
,s:
E



-s~t~

9 "
~s-a

-ro
o
Q9
on~
E~'C~
E
a


o o o N m It tr) o r- x N t o Nm m O It) ob x
It It It It It It It^ It It It t--'l --'l r) tr) tr) tr) tr) tr) tr) (r) (r) (r) c c c ^O^ ^ O Oc


0

,-i


s ,-i gs a r ;e l ^ c
II I



s O E a !&<* ocrJs s Sj -






II J CS (I -^ t i

cl -'--7 -q
i~ 7 E^ ^- ^e "-S

a Q w- S.'II '^
e~ ~ ~~ u~ So i "yC ee -Sc
9 ^i :& & s -c ^i



eas" ;^ ? a 9 aaa ^a-"
E 0



C *w Se ~ f

t8 .5 O
0 c 0 cm t-t 0 0r tr-~ o O Z o 't-~ 1o
00000 000zzzz -^


E
a
E
u


s
'r o~ E
a4;g
o~o,
ES1~

o
ii LLi '~ ~3
~a S Tti ~
S -s
p~cg
~3q~30
lu
S S
S~;SY
onoo
ql--qE



a a


*1
E-~
^.^*




a ~




^s a -
S o




-@ -,
j O4


n
-s
r
-
o
23~
r,
o


a
-
4s
I
Es
I
E
a


z tn 0 [- ~o Z tf


-s
4,



LL/
S
'U

S
s
o




E~j
E
a


ps


-( ~


-T~
s
-
o
~
-


s
s
o
s,


Es
I
E
a









indicates the average degree of confidence that each point of the given point-set will be part of

the moving object.

For temporally lifted operations, all such operations produce basic spatiotemporal objects

instead of future predictions. This is because the future prediction is decomposed into its moving

geometry component before applying these operations.

With respect to predicates, the binary predicate operation between predictions has the

same semantic as the binary predicate operation between their moving geometry components.

However, with the confidence distribution information, we can also determine the degree in

which the actual moving objects can potentially interact (non-disjoint) with each other during

the period of the predictions. This is given by the interactionpotential operation which returns

a moving real number indicating the potential of interaction between the actual objects over

the prediction period. The possibility of the actual object interaction depends on the interaction

between their predictions and this is given by the interaction possible operation. This topic is

further discussed in Section 3.4.2.

3.3.3 Operations on Balloon Objects

One of the main advantages of balloon data types is that we can apply most of the operations

to the entire object (the entire time domain). These operations include deftime, lifespan, location,

trajectory, traversed, present, passes, nocomponents, length, area, perimeter distance, and

direction. The semantic of these operations can be expressed as the union, for non-temporal

return type, or temporal composition, for temporal return type, between the results of applying

the operations to both historical and future components of the balloon objects. Although most of

the operations on balloon data types can be applied to the entire object, a few of the operations,

that is, atinstant, initial, andfinal), can only be applied by first decomposing a balloon object into

its two components and then applying the corresponding operation to the component whose time

domain is relevant. For example, the atinstant operation is applied to the historical movement

component if the given instant is within the time domain of this component. Otherwise, it is

applied to the future prediction. In both cases, a decomposition operation must be applied in










Table 3-1. Operations on historical movements and future predictions of moving objects.
Projection Operations Application to Historical Movements Application to Future Predictions
deftime, lifespan 0(a) periods (p(a) periods
locations O(point) point p(point) point
trajectory O(point) line p(point) line
traversed O(line) region (p(line) region
traversed O(region) region p(region) region
routes O(line) line (p(line) line
Interaction Operations Application to Historical Movements Application to Future Predictions
mgeo N/A q((a) r(a)
mconf N/A q((a) MC(a)
atinstant 0(a) x instant intime(a) (p(a) x instant infutime(a)
inst intime(ac) instant infutime(a) instant
val intime(ac) a infutime((a) a
conf N/A infutime(ac) C(a)
pointconf N/A qp(a) x point x instant real
pointsetconf N/A (p(a) x p x instant real
atperiods 0(a) x periods 0(a) (p(a) x periods (p(a)
initial, final 0(a) intime(a) (p(a) infutime(a)
present 0(a) x instant bool (p(a) x instant bool
present 0(a) x periods bool p(a) x periods bool
at 0(a) x p 0(min(a, )) (p(a) x p T(min(a, p))
passes 0(a) x p bool (p(a) x p bool
when 0(a) x (a bool) 0(a) (p(a) x (a bool) (p(a)
Temporally Lifted Operations Application to Historical Movements Application to Future Predictions
intersection 0(a) x p -- 0(min(a, P)) (p(a) x p T(min(a, p))
intersection 0(a) x 0(p) 0(min(a, )) (p(a) x (p(p) T(min(a, P))
union, minus 0(a) x a -- 0(a) q((a) x a t(a)
union, minus 0(a) x 0(a) 0(a) qp(a) x qp(a) t(a)
crossings O(line) x line O(point) (p(line) x line t(point)
crossings O(line) x O(line) O(point) (p(line) x (p(line) t(point)
touchpoints O(region) x line O(point) p(region) x line t(point)
touchpoints region x O(line) O(point) region x (p(line) t(point)
touchpoints O(region) x O(line) O(point) p(region) x (p(line) t(point)
commonborder O(region) x region O(line) p(region) x region t(line)
common_border O(region) x O(region) O(line) p(region) x (p(region) t(line)
nocomponents 0(a) O(int) (p(a) t(int)
length O(line) O(real) (p(line) t(real)
area O(region) O(real) p(region) -- (real)
perimeter O(region) O(real) p(region) -- (real)
distance 0(a) x p O(real) (p(a) x p t(real)
distance 0(a) x 0(p) O(real) (p(a) x (p(p) t(real)
direction O(point) x point O(real) (p(point) x point t(real)
Rate of Change Application to Historical Movements Application to Future Predictions
derivative O(real) O(real) (p(real) t(real)
turn, velocity O(point) O(real) (p(point) t(real)
Predicates Application to Historical Movements Application to Future Predictions
isempty 0(a) bool (p(a) bool
0(a) x 0(p) bool (p(a) x (p(p) bool
interaction_potential N/A p(a) x qp(p) t(real)
interactionpossible N/A qp(a) x qp(p) bool
interactionpossible N/A qp(a) x 0(p) bool









points; each set forms a point object. Similarly, in Figure 2-3D, a plane parallel to the (x, y)-plane

between the two upper dashed lines intersects the moving region object in a set of two faces

making up a region object. The multiple simple values of a moving object at a time instant may

move simultaneously over time, stay separate from each other, interact, coincide, merge, split,

partially stop to exist, or partially start to exist. The goal of the following definitions is to allow

these different behaviors.

In Definition 3.4, we specify the important concept of continuity at a time instant for a

moving object. It rests on the limit concept of Definition 3.3.


Definition 3.4 : Let ao c {point, line, region}, f E t(a) = time oa, t E time, and f(t) # 1.

Then
(i) f is 0-continuous from the bottom at t if, and only if, lim 0 f(t ) f(t)

(ii) f is 0-continuous from the top at t if, and only if, lim 0 f(t + o) f(t)

(iii) f is O-continuous at t if, and only if, lim f(t ) f(t

(iv) f is O-discontinuous at t if, and only if, f is not 4-continuous at t


time time time time






x x x x
A B C D

Figure 3-1. Examples of 4-continuous temporal functions. A) simultaneous movement. B) A
merging situation. C) A splitting situation. D) A combined merging and splitting
situation.

This definition implies, for example, that the moving objects in Figure 2-3A and Fig-

ure 2-3B are 4-continuous on the open intervals indicated by the dashed lines. They are 4-

discontinuous at the time interval endpoints since they are 4-continuous from the top at the lower

endpoints, and O-continuous from the bottom at the upper endpoints. We find similar situations









01 algorithm ExplorePoint2DRegion2D
02 input: point2D object F and region2D object G,
03 topological feature vectors VF and VG
04 initialized with false
05 output: updated vectors VF and VG
06 begin
07 S := newsweep();
08 selea ,ir\ni(F, G, object, status);
09 while status = end ofnone and not (vF [poi inside]
10 and VF [poionbound] and F [poioutside]) do
11 if object =first then p := getevent(F);
12 if poionseg(S, p) then VF [poionbound] := true
13 else pred_ofp(S, p);
14 if currentexists(S) then ia := getattr(S);
15 if ia then VF [poi inside] := true
16 else VF poioutside] := true endif
17 else VF [poi_outside] := true
18 endif
19 endif
20 else h := getevent(G); ia := getattr(G); /* h = (s, d) */
21 if d then addleft(S, s); setattr(S, ia)
22 else del_righlt(S, s) endif;
23 if object = both then vF [poionbound] := true endif
24 endif
25 select Jiext(F, G, object, status);
26 endwhile;
27 if status = end ofsecond then
28 F [poioutside] := true
29 endif
30 end ExplorePoint2DRegion2D.

Figure 5-10. Algorithm for computing the topological feature vectors for a point2D object and a
region2D object


poionseg, predof-p, currentexists, getattr, and setattr needs O(logm) time. The total worst

time complexity is O((1 + m)logm).

5.2.2.4 The exploration algorithm for the line2D/line2D case

We now consider the exploration algorithm for two line2D objects F and G. Seen from

the perspective of F, we can differentiate six cases between the interior and boundary of F and

the interior, boundary, and exterior of G. First, the interiors of two segments of F and G can









from other, built-in or user-defined predicates. At the descriptive level, both spatiotemporal pred-

icates (like Disjoint, Cross) and other predicates (like the comparison operators <, <, >, >) are

used in selection and join conditions of SQL queries and are syntactically represented as boolean

functions. At the physical level, other predicates are usually implemented by executable boolean

functions, i.e., program code fragments, which explicitly calculate the predicates. However, spa-

tiotemporal predicates describing developments represent topological patterns and are mapped

to string patterns. We assume that the query string pattern of a spatiotemporal predicate being

asked is a sequence of basic spatiotemporal predicates and topological predicates in development

normal form (see [22]). In step 4, such a query string pattern is then matched against the actual

development of two moving objects under consideration, which is also represented by a string.

In the following, we describe a version of the algorithmic scheme, called STPredEvaluator

(Figure 5-23), where first step 1, then steps 2 and 3 together, and finally step 4 are executed

consecutively. The starting point is a given spatiotemporal query predicate Q(mol, mo2) applied

to two moving objects mok E {mapping(upoint), mapping(uline), mapping(uregion) } with

k E {1, 2}. We assume that the DBMS first checks and keeps in the flag qwc whether Q contains

either the instant predicate true or period predicate True. These predicates are defined as a kind of

"wildcard" predicates to express "don't care" parts of developments in case that a development is

only partially defined.

First we perform a prechecking on the input objects. In case that one of the operand

objects is empty, or their lifespans do not intersect (operation Tlntersects), we return false as

the result. All checks can be done in constant time, except for the lifespan check which takes

O(di + d2) time if di and d2 denote the numbers of intervals of lsi and Is2. Note that checking

their projection bounding boxes for disjointedness is not sufficient to return a false value here if

they are disjoint. This is because the predicates disjoint and Disjoint are also relationships that

can be asked to be evaluated. Furthermore, there are also different types of disjoint relationships

between complex objects as identified in [59].










at the time of the query being entered, but satisfies the criteria at some future time. This kind of

continuous queries is similar to the concept of a database trigger which is useful for monitoring

certain conditions such that appropriate actions can be initiated.

Besides these query types, our data model design offers many new functionalities including

querying about the uncertainty of future predictions as well as the accuracy of such predictions.

For the purpose of illustrate these functionalities, we use a simple SQL like query language.

Consider an application scenario of a hurricane prediction. The movement of the eye of a

hurricane can be modeled as a moving balloon point with a moving region type prediction, that

is, an mballoonpr object. For the extent of the hurricane force wind, we model its movement

using an mballoonrr object. For cities, we represent their geography by a region object. Hence,

we have the following relations:

hurricanes(name:string, eye:mballoon_pr, extent:mballoon_rr)
cities(name:string, geography:region)




















Figure 3-14. Movement of the eye of hurricane Katrina.


Assuming that these relations have been previously populated with all necessary data. For

the purpose of our example, assume also that hurricane Katrina is currently making its way across

the Gulf of Mexico (Figure 3-14). We can ask a query about the future prediction of the hurricane

"What area will potentially be affected by the eye of hurricane Katrina at 12 hours from now?"










now define a temporal domain time for the historical movement of a moving object as a half-

infinite time domain that starts from -o and ends at tc inclusively. Thus, time = (--, tc]. We

choose to end time at tc instead of ta because if tc < ta, we may want to predict the movement

between tc and ta which is outside of time. Otherwise, this prediction would be a part of

time which contradicts our definition above. The temporal domain time is applied to all data

types representing the past movement of a moving object. It will be used as part of a temporal

composition to compose the entire temporal domain of a balloon object. Figure 3-7 illustrates an

example of a historical temporal domain time for a moving object.

defined intervals
ta time

time

Figure 3-7. Example of a historical temporal domain time that starts from -o and ends at tc
inclusively.


For future predictions of moving objects, we have defined a type constructor qp(3) which

accepts as a parameter a spatial type 3 whose value represents the set of future positions or extent

of a moving object at a specific instant in the future. Here, we would like to restrict the temporal

domain of the future data types produced by yp such that these data types describe only the future

predictions of moving objects.

prediction intervals
to ta /
t ta time

time

Figure 3-8. Example of a future temporal domain time that starts exclusively from tc and
extends indefinitely towards +-.


We define a temporal domain time for future predictions of a moving object as a half-

infinite open interval of time which starts exclusively from tc and extends indefinitely towards

+o. Hence, time =(tc, +). We choose to begin time from tc because this would allow a

prediction to be made as close to the latest known state of the object as desired irrespective to the
































@ 2008 Reasey Praing










Table 5-4. MCDT pre-order representations for all type combinations on the basis of equal
probability of occurrence of all topological predicates.
Type combination MCDT pre-order representation
point/point 2 3 0 1 4 5
line /line a 0- 33 a 34 35 1 2 43 a 44 45
S3 4 46 a 47 48 0- 0- 36 37 38 5 6 -
49 a 50 51 7 8 52 53 54 0 9 10 a
11 12 13 14 15 16 0- 39 40 O 41 42 -
55 56 a 57 58 0- 59 60 a 61 62 0 0- 17 18
19 20 0- 21 22 a 23 24 D 0- 25 26 a 27 28 0- 29
30 31 32 o 0- 63 64 65 66 67 68 69
a 70 71 72 73 74 a 0- -a 75 76 77 78 -a 79 80
a 81 82
region / region a 0- 0- 5 6 2 10 1 3 4 11 12
13 7 a 8 9 0- 15 16 14 17 18 o 0- 21
-22 23 -0 19 20 24 25 26 0- 27 28 29 0-
30 31 3 32 33
point/line a 1 2 3 4 5 6 0- 7 8 a 9 10
S- 11 12 13 14
point/region 0 1 0- 2 3 0- 4 5 0- 6 7
line /region 0- 5 6 o 1 8 9 o 2 10 11 0-
3 4 7 0- 12 13 a 0- 14 15 0- 18 19 0- 20 21
a -a 26 27 28 0- 32 33 a 34 35 0- 36 37 a 0- 16
17 0- 22 23 0-24 25 0- 29 30 31 0- 38 39
40 41 42 43


of occurrence of all topological predicates. The encodings allow an easy construction of the

MCDTs. Since MCDTs are full binary trees, each node has exactly zero or two child nodes. We

leverage this feature by representing an MCDT as the result of a pre-order tree traversal. The pre-

order sequence of nodes is unique in this case for constructing the decision tree since inner nodes

with only one child node cannot occur. Each inner node in the pre-order sequence is described as

a term XY where X, Y E {, -, }. Such a term represents a matrix predicate AX n BY 4 0 serving

as a discriminator. For example, the term XY = a denotes the matrix predicate A n aB 4 0

(prefix notation for boundary). Each leaf node represents the 9-intersection matrix number of a

topological predicate. The matrix numbers are specified in the Figures 5-17, 5-18, 5-19 and 5-20

as well as in [50, 59].

Figures 5-22 shows a visualization of the MCDTs of three spatial data type combinations

on the assumption that all topological predicates occur with equal probability. The MCDTs for

the other type combinations have been omitted due to their very large size. Each inner node is









the design decision to base our approximations of the temporal behavior of moving spatial

objects on linear functions. This ensures simple and efficient representation for the data types and

a manageable complexity of algorithms.

In order to describe the permitted behavior of moving spatial objects within a temporal

unit, we need to specify how type-specific constraints are satisfied during such unit. We require

that constraints are satisfied only during the respective open interval of a unit interval since the

endpoints of a unit interval indicate a change in the description of the movement. For example,

a collapse of components of a moving object can occur at the endpoints of the unit interval.

Similarly, a birth of a new component can also occur at the beginning of a unit interval. This is

completely acceptable since one of the reasons for the introduction of the sliced representation

is to have "simple" and "continuous" description of the moving value within each unit interval

and to limit "discontinuities" in the description to a finite set of instants. Thus, the sliced

representation concept also allows one to model appearances and disappearances of object

components at endpoints of intervals. This means that the sliced representation can also represent

event points which are instances when the temporal function of a moving object is event-

4-discontinuous as specified in the abstract model. In this section, we define temporal unit

types point, uline, and region. They are used to construct the spatiotemporal mappings

mapping(upoint), mapping(uline), and mapping(uregion) which describe a finite representation

for the basic spatiotemporal data types point, line, and region respectively.

4.2.2.1 Unit point

Before we can define temporal units for point, we need to define how the temporal evolution

of single points can be represented. We introduce a set MPoi which defines 3D lines that describe

continuous, unlimited temporal evolution of 2D single points.


MPoi = {(ax,ay,bx,by) ax, ay,bx,by E real}


The 4-tuple (ax, ay, bx, by) is a representation of the linear functions of the coordinates of a single

point over time such that (ax, ay) is the position of the point at t = 0 and (bx, by) is the position of









TABLE OF CONTENTS
page

ACKNOWLEDGMENTS .. ................ ................ 4

LIST OF TABLES ...................................... 8

LIST OF FIGURES ................. ............. ....... 9

ABSTRACT ................................... ....... 13

CHAPTER

1 INTRODUCTION .................................. 15

1.1 Motivation ...................... .............. 15
1.2 Problem Statement ................... .......... 15
1.3 Goals and Solutions ................... .......... 17

2 RELATED WORK ..................... .............. 20

2.1 Spatial Data Modeling ................... ......... 20
2.1.1 Spatial Objects ................... ......... 20
2.1.2 Topological Relationships ......... ..... ........ 21
2.2 Spatiotemporal Data Modeling ................... ....... 23
2.2.1 Historical Movements of Moving Objects ................ 23
2.2.2 Predictive Movements of Moving Objects . . . .. 25
2.3 Implementation Aspects of Spatial and Spatiotemporal Data Models ...... 27
2.4 Database Integration .................. ............. .. 28

3 ABSTRACT MODEL OF THE MOVING BALLOON ALGEBRA ......... .. 30

3.1 Modeling Historical and Predicted Movements . . ..... 30
3.1.1 Continuity of Movement .................. .. .... .. 31
3.1.2 Modeling Historical Movements of Moving Objects . . .... 40
3.1.3 Modeling Future Predictions of Moving Objects . . .... 40
3.1.3.1 Handling the uncertainty of the future positions and extent of
moving objects .................. .. .... .. .. 41
3.1.3.2 Data types for future predictions of moving objects . 45
3.2 Modeling Moving Balloon Objects .................. ...... .. 47
3.2.1 Balloon Data types ...... . . . .. 47
3.2.2 Spatiotemporal Balloon Data Types .... . . .... 50
3.3 Operations of the Moving Balloon Algebra .... . . .... 53
3.3.1 Operations on Historical Movements ... . . .. 53
3.3.2 Operations on Future Predictions ................... ... 54
3.3.3 Operations on Balloon Objects ................ .... .. 58
3.3.4 Operations on Moving Balloon Objects . . . 59
3.4 Spatiotemporal Predicates .............. . . .... 62









to model not only the development of moving objects in term of historical movements but also

the development of their future predictions which are available at different time instants during

the course of the movements. This allows one to perform useful operations on these predictions

in addition to existing operations on moving objects. We discuss these operations in the next

section.

3.3 Operations of the Moving Balloon Algebra

Due to the fact that our Moving Balloon Algebra consists of a structured hierarchy of

different sets of data types, we defined operations that are applicable to these data types starting

from the most fundamental set, the data types for historical movements, to the most complex set,

the spatiotemporal balloon data types.

3.3.1 Operations on Historical Movements

The design of operations for the Moving Balloon Algebra follows the three principles set

forth in [32] which are: (i) Design operations as generic as possible; (ii) Achieve closure and

consistency between operations; (iii) Capture interesting phenomena. Each of these principles

is achieved in the existing operations defined in the traditional moving object model [32] which

is a vague, unrestrcited version of our historical movement model described in Section 3.1.2.

Thus, these operations are also applicable to our historical movement data types. Let the type

periods represents the set of all defined intervals and defined instants of a movement. Assume

also that the type intime(c) = a x instant represents the state of the movement of a spatial

object of type a at a specific instant in time. The function min(ac, 3) returns the spatial type a

or 3 whichever has the smaller dimension. The operations are classified into five categories:

projection, interaction, temporally lifted, rate of change, and predicate operations. Projection

operations return projections of the movement into either the time domain or the space range.

Interaction operations include decompositions and instantiations of the movement. Temporally

lifted operations are those non-temporal operations that have been lifted over time into temporal

operations. Rate of change operations include the different types of differentiations associated

with movement such as velocity and turning rate. Finally, predicate operations are used to answer










(i) dim(p) > dim(a)
(ii) 0(c() represents the past movement and is defined on time

(iii) yp(3) represents the future prediction and is defined on time

In other words, Q(ca, p) is a total function defined on the complete time domain such that it

evaluates 0(a) for an instant t in time or qp(3) for t in time. By specifying a and 3, we obtain

six data types for balloon objects:


balloonpp = Q(point, point) = point xfpoint

balloonpl = Q(point, line) = point xfline

balloon_pr = Q(point, region) = point xfregion

balloon_11 = Q(line, line) = hline xfline

balloonlr = Q2(line, region) = line xfregion

balloonrr = 2(region, region) = region xfregion


Each of these balloon data types consists of a data type for past movements (the strings) and

a data type for future predictions (the bodies). Now we can use these balloon data types to

model balloon objects. A balloon object has the advantage of being able to capture both the

past movement and the future prediction of a moving object with respect to a specific time

instant representing the current state of the object. Examples of a balloon-pp, a balloonpl, and a

balloon-pr object are shown in Figure 3-6A, 3-4D, and 3-6B respectively.

3.2.2 Spatiotemporal Balloon Data Types

Having defined balloon data types to represent snapshots (including past developments and

future predictions) of a moving object with respect to a specific time instant (that is, its current

instant), we now need to model the dynamic of this object as it moves over time. It is clear that as

a moving object advances its movement, we obtain a new snapshot consisting of a new (updated)

past movement and possibly a new prediction with respect to the new current instant. Thus, the

dynamic of a moving object can be represented by a development of a balloon object. We called









of a segment of G (flag poioninterior). This includes an endpoint of such a segment, if the

endpoint is a connector point of G. Third, a point f can be equal to a boundary point of G (flag

poionbound). Seen from the perspective of G, we can distinguish four cases since the boundary

and the interior of G can interact with the interior and exterior of F. First, G can contain a

boundary point that is unequal to all points in F (flag bound-poidisjoint). Second, G can have a

boundary point that is equal to a point in F. But the flag poionbound already takes care of this

situation. Third, the interior of a segment of G (including connector points) can comprehend a

point of F. This situation is already covered by the flag poioninterior. Fourth, the interior of a

segment of G can be part of the exterior of F. This is always true since a segment of G represents

an infinite point set that cannot be covered by the finite number of points in F. Hence, we need

not handle this as a special situation. Formally, we define the semantics of the topological flags as

follows:


Definition 5.2 : Let F E pt'im2lD, G E line2D, and VF and VG be their topological feature

vectors. Then,

(i) VFpoidisi,,i1u] :> 3f e P(F) Vg E H(G) : -on(f,g.s)

(ii) vF poioninterior] : 3 f e P(F) 3g E H(G) Vb e B(G) : on(f,g.s) A f 4 b

(iii) vF[poionbound] : 3 f e P(F) 3g e B(G): f =g

(iv) vG[boundpoi_diiiiu] :> g 3g e B(G) Vf E P(F) : f g

Our algorithm for computing the topological information for this case is shown in Figure 5-

9. The while-loop is executed until the end of the line2D object (line 9) and as long as not all

topological flags have been set to true (lines 10 to 11). The operations '. l tlrfirst and select-next

compare a point and a halfsegment according to the order relation defined in Section 5.1.2 in

order to determine the next elements) to be processed. If only a point has to be processed (line

12), we know that it does not coincide with an endpoint of a segment of G and hence not with a

boundary point of G. But we have to check whether the point lies in the interior of a segment in

the sweep line status structure S. This is done by the search operation poiinseg on S (line 13). If

this is not the case, the point must be located outside the segment (line 14). If only a halfsegment









compared to simple objects and underpins the need for sophisticated and efficient predicate

execution techniques.

2.2 Spatiotemporal Data Modeling

Within the past decade, a number of spatiotemporal data models have been proposed [49].

Among them, a few moving object models have been recently designed that are of significant

interest for many new emerging applications [34]. Moving object models can be distinguished

with respect to the type of movement they support. In Section 2.2.1, we first discuss an existing

moving object model and a corresponding spatiotemporal predicate (STP) model that support

the past evolution of moving objects. Then, in Section 2.2.2, we take a look at a number of data

models as well as STP models that support specific types of near future developments of moving

objects.

2.2.1 Historical Movements of Moving Objects

An approach to represent the past movement of moving objects is proposed in [32, 61]. The

past development is a historical fact that is modeled as a function from time to space [18, 25].

For an arbitrary non-temporal data type a, its corresponding temporal data type is provided by a

type constructor t(a) which is a function type that maps from the temporal domain time to a, that

is, t(a) = time -- a. By applying the type constructor t to the spatial data types point, line, and

region, we obtain the corresponding spatiotemporal data types named point for moving points,

line for moving lines, and region for moving regions [19]:

point = t(point) = time point

line = t(line) = time line

region = (region) = time region
A moving object, in general, yields a complex (that is, possibly multi-component) spatial

object (Section 2.1.1) at each time instant at which it is defined; a single-component spatial

object as a function value at a time instant is thus a special case. Figures 2-3A and 2-3B show

single-component moving point and moving region objects respectively while Figures 2-3C and










Application


Figure 5-33. The integration of algebra in extensible DBMSs

CREATE TABLE mbpptable(
id integer primary key,
description varchar2(64),
mbpp mballoonpp


Figure 5-34. Creating a table using a user-defined type.


Assuming that we have populated this table with a few moving balloon objects. We can

then pose a query (Figure 5-35) on this table in SQL using our UDF getFunctionCount to get the

number of unit functions in each object.

SELECT id, description, mb.mbpp.getFunctionCount()
FROM mbpptable mb;

Figure 5-35. Using a user-defined function in SQL query.


5.6 Case Study: Application to Hurricane Research

So far, we have presented our Moving Balloon Algebra at all abstraction levels as well

as its implementation in a software package MBA which is integrated into an Oracle DBMS.

Thus, we have effectively made our algebra available for use in many real world applications. In

this section, we show how our algebra can be used in the field of hurricane research and how it

transforms the way we look at hurricane data.

Hurricanes are some of the most powerful and deadliest forces of nature. According to the

National Hurricane Center, 1385 tropical storms and hurricanes had been recorded between 1851









of a moving point and a static region. A static region is just a special case of a moving region.

Our balloon predicate model can express the spatiotemporal relationship between all types of

moving objects. Thus, our model has a higher expressive power and is able to express every

relationship that is expressible by this model. For instance, consider the spatiotemporal predicate

Sometime-DefinitelyInside between an uncertain trajectory UTr = (T, r) and a static region R

where T is the future trajectory and r is the uncertainty threshold. Let PMCT denote a possible

motion curve of UTr. The spatiotemporal predicate Sometime -efinitelyinside is defined in

[26] as Sometime JefinitelyJnside(UTr, R) = (t) (VPMCT) : inside(R, PMC, t). The spatial

predicate inside determines whether the value of PMC7 at t is inside the region R. In our model,

the object UTr can be modeled as anfregion object with a uniform confidence distribution.

Likewise the static region R can be temporally lifted into an object of type region as well.

Thus, the spatiotemporal predicate Sometime DefinitelyJnside can be characterized in our

model as SometimeJ)efinitelyJnside(UTr, R) = (3t E time)(Vp E val(atinstant(UTr,t))) :

inside(p,val(atinstant(R,t))). By following this approach, we can also characterize other

spatiotemporal predicates found in [26] in our model.

As a result of this discussion, we have shown the relationship between our Moving Balloon

Algebra and the currently existing moving object models. In addition to providing a more precise

and appropriate way to represent the reality of moving objects, our data model also provides a

more generic set of spatiotemporal data types, in comparison to existing moving object models,

to support a wide variety of moving objects. Furthermore, our algebra can support existing

functionalities which are available in existing models as well as introduce new ones.









MOVING BALLOON ALGEBRA:
DESIGN, IMPLEMENTATION, AND DATABASE INTEGRATION OF
A SPATIOTEMPORAL DATA MODEL FOR
HISTORICAL AND PREDICTIVE MOVING OBJECTS


















By

REASEY PRAING


A DISSERTATION PRESENTED TO THE GRADUATE SCHOOL
OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT
OF THE REQUIREMENTS FOR THE DEGREE OF
DOCTOR OF PHILOSOPHY

UNIVERSITY OF FLORIDA

2008









these models are frequently presented in conceptual terms without any supporting implementa-

tion. Even if we want to compare only the common features, there is no implementation to based

upon. Hence, the only thing we can do is to provide a qualitative assessment of our model and

discuss its modeling capability against that of the existing models.

With respect to the traditional moving object model defined in [32, 61], our historical

movement model is a restricted version of this model. We defined a more precise and appropriate

model for representing the reality of moving objects. This is done by imposing the continuity

property on movements of moving objects. As far as the MOST model [60] is concerned,

this model uses a specific technique/concept, that is, motion vector, to provide the near future

positions of moving points without taking into account the uncertainty aspect of the future

prediction. In fact, this model can be considered as a prediction model for moving points that

provides moving point type predictions. Thus, we can support the MOST model through the

use of our spatiotemporal balloon data type mballoonpp. In addition to the capability of the

MOST model which can keep track of the current position and the current prediction of a moving

point, our algebra can also keep track of the past positions as well as past predictions. Since the

algebra provides data modeling support for the MOST model, this means that it also supports the

FTL query language which is used for entering different types of spatiotemporal queries such as

continuous and persistent queries.

In regard to the uncertainty modeling of moving objects, the model described in [26]

provides data modeling support for the future prediction of a moving point through the use

of an uncertainty threshold. This threshold is applied to a future trajectory or a future motion

plan of a moving point creating a trajectory volume representing the set of all possible future

motion curves. It is obvious that this trajectory volume can be represented in our Moving

Balloon Algebra using the future prediction data typefregion. Thus, the dynamic of the moving

point in this model can be represented in our algebra using the spatiotemporal balloon data

type mballoonpr. Consequently, the spatiotemporal predicate model defined in [26] is a

subset of our balloon predicate model since it is only defined between the future movement




Full Text

PAGE 1

1

PAGE 2

2

PAGE 3

3

PAGE 4

Ithankthechairandmembersofmysupervisorycommitteefortheirmentoring,mycolleaguesfortheirintellectualsupport,andtheComputerSciencedepartmentaswellastheNationalScienceFoundationfortheirnancialsupport.Ithankmyparents,mysistersandbrotherfortheirlovingencouragement,whichmotivatedmetocompletemystudy. 4

PAGE 5

page ACKNOWLEDGMENTS .................................... 4 LISTOFTABLES ....................................... 8 LISTOFFIGURES ....................................... 9 ABSTRACT ........................................... 13 CHAPTER 1INTRODUCTION .................................... 15 1.1Motivation ...................................... 15 1.2ProblemStatement ................................. 15 1.3GoalsandSolutions ................................. 17 2RELATEDWORK .................................... 20 2.1SpatialDataModeling ............................... 20 2.1.1SpatialObjects ............................... 20 2.1.2TopologicalRelationships .......................... 21 2.2SpatiotemporalDataModeling ........................... 23 2.2.1HistoricalMovementsofMovingObjects ................. 23 2.2.2PredictiveMovementsofMovingObjects ................. 25 2.3ImplementationAspectsofSpatialandSpatiotemporalDataModels ....... 27 2.4DatabaseIntegration ................................ 28 3ABSTRACTMODELOFTHEMOVINGBALLOONALGEBRA ........... 30 3.1ModelingHistoricalandPredictedMovements .................. 30 3.1.1ContinuityofMovement .......................... 31 3.1.2ModelingHistoricalMovementsofMovingObjects ............ 40 3.1.3ModelingFuturePredictionsofMovingObjects .............. 40 3.1.3.1Handlingtheuncertaintyofthefuturepositionsandextentofmovingobjects .......................... 41 3.1.3.2Datatypesforfuturepredictionsofmovingobjects ...... 45 3.2ModelingMovingBalloonObjects ......................... 47 3.2.1BalloonDatatypes ............................. 47 3.2.2SpatiotemporalBalloonDataTypes ..................... 50 3.3OperationsoftheMovingBalloonAlgebra ..................... 53 3.3.1OperationsonHistoricalMovements .................... 53 3.3.2OperationsonFuturePredictions ...................... 54 3.3.3OperationsonBalloonObjects ....................... 58 3.3.4OperationsonMovingBalloonObjects ................... 59 3.4SpatiotemporalPredicates .............................. 62 5

PAGE 6

........................ 63 3.4.1.1Generalmechanismforballoonpredicates ........... 63 3.4.1.2Specicationbasedontraditionalspatiotemporalpredicates .. 65 3.4.1.3Canonicalcollectionofballoonpredicates ........... 68 3.4.2ReasoningAboutActualFutureInteractions ................ 69 3.5QueryingUsingtheMovingBalloonAlgebra ................... 71 3.5.1InteroperatingwithPredictionModels ................... 71 3.5.2SpatiotemporalQueries ........................... 72 4DISCRETEMODELOFTHEMOVINGBALLOONALGEBRA ........... 77 4.1Non-TemporalDataTypes ............................. 77 4.1.1BaseDataTypesandTimeDataTypes ................... 77 4.1.2SpatialDataTypes .............................. 79 4.2BasicSpatiotemporalDataTypes .......................... 82 4.2.1TemporalUnitsforBaseTypes ....................... 84 4.2.2TemporalUnitsforSpatialDataTypes ................... 85 4.2.2.1Unitpoint ............................ 86 4.2.2.2Unitline ............................. 88 4.2.2.3Unitregion ............................ 90 4.3BalloonDataTypesandSpatiotemporalBalloonDataTypes ........... 91 4.3.1BalloonDataTypes ............................. 91 4.3.2SpatiotemporalBalloonDataTypes ..................... 93 5IMPLEMENTATIONMODELOFTHEMOVINGBALLOONALGEBRA ...... 96 5.1DataStructures ................................... 96 5.1.1GeneralRequirementsofDatabase-CompatibleDataStructures ...... 97 5.1.2DataStructuresforSpatialDataTypes ................... 97 5.1.3DataStructuresforSpatiotemporalDataTypes ............... 103 5.1.3.1Datastructuresforbasicspatiotemporaldatatypes ....... 104 5.1.3.2Datastructuresforballoonandspatiotemporalballoondatatypes ............................... 106 5.2AlgorithmsforTopologicalPredicatesonComplexSpatialObjects ........ 108 5.2.1BasicAlgorithmicConcepts ........................ 109 5.2.1.1Parallelobjecttraversal ..................... 109 5.2.1.2Overlapnumbers ......................... 111 5.2.1.3Planesweep ........................... 111 5.2.2TheExplorationPhaseforCollectingTopologicalInformation ...... 117 5.2.2.1Theexplorationalgorithmforthepoint2D/point2Dcase .... 119 5.2.2.2Theexplorationalgorithmforthepoint2D/line2Dcase ..... 119 5.2.2.3Theexplorationalgorithmforthepoint2D/region2Dcase ... 123 5.2.2.4Theexplorationalgorithmfortheline2D/line2Dcase ..... 125 5.2.2.5Theexplorationalgorithmfortheline2D/region2Dcase .... 129 5.2.2.6Theexplorationalgorithmfortheregion2D/region2Dcase ... 133 5.2.3TheEvaluationPhaseforMatchingTopologicalPredicates ........ 137 6

PAGE 7

. 137 5.2.3.2The9-intersectionmatrixcharacterizationmethod ....... 140 5.2.3.3Typecombinationdependent9-intersectionmatrixcharacteri-zation ............................... 141 5.2.3.4The9-intersectionmatrixcharacterizationforregion/regioncase 146 5.2.4OptimizedEvaluationMethods ....................... 151 5.2.4.1Matrixthinningforpredicateverication ............ 152 5.2.4.2Minimumcostdecisiontreeforpredicatedetermination .... 157 5.2.5InterfaceMethodsforTopologicalPredicates ............... 165 5.3AlgorithmsforSpatiotemporalPredicates ..................... 166 5.3.1TheAlgorithmicScheme .......................... 166 5.3.2Time-SynchronizedIntervalRenement .................. 171 5.3.3Function-ValuedIntervalRenementandDevelopmentDetermination .. 174 5.3.4PatternMatchingwithQueryPredicate ................... 178 5.4AlgorithmsforBalloonPredicates ......................... 180 5.5DatabaseIntegration ................................ 182 5.6CaseStudy:ApplicationtoHurricaneResearch .................. 185 6MODELANDIMPLEMENTATIONASSESSMENT .................. 191 6.1TopologicalPredicates:Assessment,Testing,andPerformanceStudy ....... 191 6.1.1QualitativeAssessment ........................... 191 6.1.2Testing .................................... 192 6.1.3PerformanceStudyandAnalysis ...................... 193 6.2SpatiotemporalModelAssessment ......................... 196 7CONCLUSIONS ..................................... 199 REFERENCES ......................................... 201 BIOGRAPHICALSKETCH .................................. 206 7

PAGE 8

Table page 3-1Operationsonhistoricalmovementsandfuturepredictionsofmovingobjects. ..... 55 3-2Valueoftheoperationpointset conf(j(a);b;instant)foreachcombinationofj(a)andbwhetheritisalways0,denotedbyavalue0,orameaningfulvalue,denotedbyavalueM. ......................................... 56 3-3Operationsonballoonobjectsandmovingballoonobjects. ............... 60 3-4Assigningnamingprexestopairwisecombinationsofinteractions. .......... 67 3-5Numberofballoonpredicatesbetweenballoon pp,balloon pr,andballoon rrobjects. 69 3-6Inferringthetypesofinteractionbetweenactualobjectsfromthetypesofinteractionbetweentheirpredictions. ................................. 70 5-1StaticanddynamichalfsegmentsequencesoftheregionsR1andR2inFigure 5-6 ... 116 5-2Possiblesegmentclassconstellationsbetweentwoconsecutivesegmentsinthesweeplinestatus. ......................................... 136 5-3Summaryofcompleteandthinnedout9IMsforthetopologicalpredicatesofalltypecombinations. ....................................... 156 5-4MCDTpre-orderrepresentationsforalltypecombinationsonthebasisofequalprob-abilityofoccurrenceofalltopologicalpredicates. .................... 161 5-5SummaryoftheMCDTsforalltypecombinationsonthebasisofequalprobabilityofoccurrenceofalltopologicalpredicates. ........................ 164 5-6Intervalendpointordering. ................................ 173 8

PAGE 9

Figure page 2-1Examplesofspatialobjects.A)Asimplepointobject.B)Asimplelineobject.C)Asimpleregionobject.D)Acomplexpointobject.E)Acomplexlineobject.F)Acomplexregionobject. .................................. 21 2-2The9-intersectionmodelandtopologicalpredicates.A)The9-intersectionmatrix.B)Thenumbersoftopologicalpredicatesbetweentwosimple/complexspatialobjects. 22 2-3Examplesofmovingobjects.A)Asingle-componentmovingpointobject.B)Asingle-componentmovingregionobject.C)Amulti-componentmovingpointobject.D)Amulti-componentmovingregionobject. ......................... 24 2-4Examplesofspatiotemporalfunctionsformovingpoints.A)Partiallydisappear.B)Instantlyappear.C)Haveinstantaneousjumps.D)Havespatialoutliers.Examplesofspatiotemporalfunctionsformovingregions.E)Partiallydisappear.F)Instantlyappear.G)Haveinstantaneousjumps.H)Anexampleofaspatiotemporalpredicate. 26 3-1Examplesoff-continuoustemporalfunctions.A)simultaneousmovement.B)Amerg-ingsituation.C)Asplittingsituation.D)Acombinedmergingandsplittingsituation. 35 3-2Examplesoff-discontinuoustemporalfunctions.A)Aninstantaneousjumpinanmrealobject.B),C)Twoconstellationswithtimeinstantsatwhichthefunctionisevent-f-discontinuous. .................................. 36 3-3Movingpointobjectgivenbyatemporalfunctionwithalocalminimumandalocalmaximum. ........................................ 38 3-4Modelingpotentialfuturepositionsofspatiotemporalobjects.A)Forahurricane'seyeatnow+12hours.B)Withinthe12-hourperiod.C)Foravehicleatnow+15min-utes.D)Withinthe15-minuteperiod.E)Foravehiclewithaconstantspeedatnow+15minutes.F)Withinthe15-minuteperiod. ......................... 42 3-5Representingthefuturepredictionofahurricane'seyeusingamovingregionwithamovingcondencedistribution.Thegradientindicatesvarieddegreeofcondence. .. 45 3-6Examplesofvalidfuturepredictions.A)Acontinuousfpointobject.B)Acontinu-ousfregionobject.C)Adiscontinuousfregionobject.Anexampleofinvalidfuturepredictions.D)Adimensionallycollapsedobjectwithmultipletypes. ......... 46 3-7Exampleofahistoricaltemporaldomaintimehthatstartsfromandendsattcin-clusively. ......................................... 48 3-8Exampleofafuturetemporaldomaintimefthatstartsexclusivelyfromtcandex-tendsindenitelytowards+. .............................. 48 3-9Exampleofamovingballoonobjectoftypemballoon pr. ............... 52 9

PAGE 10

........................................ 57 3-11Relationsbetweentraditionalmovingobjectdatamodelandballoondatamodel. .... 64 3-12PossiblerelationshipsbetweenpartsofballoonobjectsAandB.A)WhenA'scurrentinstantisearlier.B)Atthesametime.C)LaterthanthatofB's. ............. 65 3-13Futurecrossingsituationbetweenaballoon ppobjectPandaballoon probjectR. .. 66 3-14MovementoftheeyeofhurricaneKatrina. ........................ 74 4-1Representationsofalineobject.A)Intheabstractmodel.B)Inthediscretemodel. .. 80 4-2Representationsofaregionobject.A)Intheabstractmodel.B)Inthediscretemodel. 82 4-3Adiscreterepresentationofamovingpointobject.A)Atemporalunit.B)Aslicedrepresentation. ....................................... 83 4-4Representingamovinglineobject.A)Aulinevalue.B)Adiscreterepresentationofamovinglineobject. ................................... 89 4-5Exampleofauregionvalue. ............................... 90 5-1Examplesoftheorderrelationonhalfsegments:h1


PAGE 11

...................................... 125 5-11Algorithmforcomputingthetopologicalfeaturevectorsfortwoline2Dobjects .... 127 5-12Algorithmforcomputingthetopologicalfeaturevectorsforaline2Dobjectandaregion2Dobject ...................................... 131 5-13Specialcaseoftheplanesweep. ............................. 132 5-14Algorithmforcomputingthetopologicalfeaturevectorsfortworegion2Dobjects ... 135 5-15The9-intersectionmatrices.A)Matrixnumber8forthepredicatemeetbetweentwolineobjects.B)Matrixnumber7forthepredicateinsidebetweentworegionobjects. 138 5-16Algorithmforcomputingthethinnedoutversionsofthena;bintersectionmatricesassociatedwiththetopologicalpredicatesbetweentwospatialdatatypesaandb 153 5-17Completeandthinnedoutmatricesforthe5topologicalpredicatesofthepoint/pointcase. ............................................ 154 5-18Completeandthinnedoutmatricesforthe14topologicalpredicatesofthepoint/linecase. ............................................ 155 5-19Completeandthinnedoutmatricesforthe7topologicalpredicatesofthepoint/regioncase. ............................................ 155 5-20Completeandthinnedoutmatricesforthe33topologicalpredicatesoftheregion/regioncase. ............................................ 155 5-21Minimumcostdecisiontreealgorithm .......................... 159 5-22Minimumcostdecisiontrees.A)Forthe5topologicalpredicatesofthepoint/pointcase.B)Forthe7topologicalpredicatesofthepoint/regioncase.C)Forthe14topo-logicalpredicatesofthepoint/linecaseundertheassumptionthatalltopologicalpred-icatesoccurwithequalprobability. ............................ 162 5-23Spatiotemporalpredicateevaluatoralgorithm. ...................... 170 5-24Time-synchronizedrenementoftwounitintervalsequences:twosetsoftimeinter-valsontheleftside,andtheirrenementpartitionfordevelopmentevaluationontherightside. ......................................... 171 5-25Time-synchronizedintervalrenementalgorithm. .................... 172 5-26NextAlgorithm. ...................................... 174 5-27IntersectingunitsegmentsoftwomovingpointsrepresentingthedevelopmentDis-joint.meet.Disjointandthusrequiringafurtherintervalrenement. ......... 174 5-28Function-valuedintervalrenementalgorithm. ...................... 175 11

PAGE 12

................................ 176 5-30Patternmatchingalgorithm. ................................ 179 5-31Balloonpredicateevaluatoralgorithm. .......................... 181 5-32RegistrationofadatatypeandanoperationinOracle. .................. 183 5-33TheintegrationofalgebrainextensibleDBMSs ..................... 185 5-34Creatingatableusingauser-denedtype. ........................ 185 5-35Usingauser-denedfunctioninSQLquery. ....................... 185 5-36VisualizationofhurricaneKatrinausingtheMovingBalloonAlgebra. ......... 187 5-37VisualizinghurricaneKatrina.A)Katrina'sprediction#7inobject-basedperspec-tives.B)TemporalanalysisperspectiveonAugust27,2005at12:00GMT. ...... 189 5-38Hurricaneanalysis.A)Hurricanepredictionanalysisbetween2003and2007.B)Hur-ricaneKate(#1312).C)HurricaneLisa(#1329). ..................... 190 6-1Predicatevericationwithoutandwithmatrixthinning ................. 194 6-2PredicatedeterminationwithoutandwithMCDT .................... 196 12

PAGE 13

Spatiotemporaldatabasesdealwithgeometrieschangingovertime.Recently,movingobjectslikemovingpointsandmovingregionshavebeenthefocusofresearch.Theyrepresenttime-dependentgeometriesthatcontinuouslychangetheirlocationand/orextentandareinterestingformanydisciplinesincludingthegeosciences,geographicalinformationscience,movingobjectsdatabases,location-basedservices,robotics,andmobilecomputing.Sofar,afewmovingobjectdatamodelsandquerylanguageshavebeenproposed.Eachofthemsupportseitherexclusivelyhistoricalmovementsrelatingtothepastorexclusivelypredictedmovementsrelatingtothefuture.Thus,thequerysupportforeachmodelislimitedbythetypeofsupportedmovements.Thispresentsaprobleminmodelingthedynamicnatureofamovingobjectwhenbothitsknownhistoricalmovementanditspredictedfuturemovementaredesiredtobesimultaneouslymanagedandmadeavailableforspatiotemporaloperationsandqueries.Furthermore,currentdenitionsofmovingobjectsaretoogeneralandrathervague.Itisunclearhowamovingobjectisallowedtomoveorevolvethroughspaceandtime.Thatis,thepropertiesofmovement(likeitscontinuity)havenotbeenpreciselyspecied.Itisalsounclearhow,inadatabasecontext,futurepredictionsofamovingobjectcanbemodeledtakingintoaccounttheinherentuncertaintyoffutureevolution.Moreover,implementationsofspatiotemporaldatatypesandoperationsarerareandtheirintegrationintoextensibledatabasemanagementsystems 13

PAGE 14

14

PAGE 15

15

PAGE 16

Thesecondproblemrelatestothemodelingofpredictivemovementsofmovingobjects.Afewspecializedmodelshavebeenproposedtosupportqueriesregardingfuturepredictionsofmovingobjects.However,thesemodelsarerestrictedtomovingpointsonlyandaretailoredtospecicapplicationdomainsandxedpredictionmethods.Allmodelsanticipatefutureobjectmovementsthroughcertainassumptionsontheobjects'inertia,trajectories,andenvironmentalorcontextualconstraints.Theirpredictionmethodsarealmostalwaysentirelybasedonthepastandcurrentmovementsoftheobjects,thusneglectingexternalfactorsordomain-specicparameterswhichmaysignicantlyaffectthefuturemovementsofmovingobjects.Forinstance,informationsuchasatmosphericpressures,temperaturezones,windandoceancurrentsplaysamajorroleinpredictingthefutureevolutionofahurricane.Thisrequireshighlyspecializedandsophisticatedpredictionmodelsandalgorithmsbeyondthoseinwhichonlythepastandcurrentobjectmovementsareconsideredassystemparameters.Infact,thedevelopmenteffortforsuchpredictionmodelsisadisciplinebyitselfandataskofdomainexperts.Inaddition,differentapplicationdomainsmayrequiredifferentpredictionmodels.Forexample,topredictthefuturespreadofaforestre,onemayconsideradifferentsetofparameterssuchasthevolumeofrefuel(forexample,drybrush),surfaceslope,andthecapabilityofresponsiveactionsfromreghtersinadditiontoatmosphericconditionssuchaswindandhumidity.Thus,itisimpossibletodeneaone-size-ts-allpredictionmodelforallapplications.However,wecanassumethatthenatureoftheoutputsofdifferentpredictionmodelsisthesame,oratleastverysimilar.Suchanoutputconsistsofadescriptionofapredictedmovementaswellasameasureofcondence(forexample,probability,fuzziness,roughness)expressingthereliabilityoftheprediction.Wecanrepresentthepredictedmovementthroughspatiotemporaldatatypes.Wedonotseeitasthecapabilityandthetaskofadatabasesystemtopredictthefuturemovementof 16

PAGE 17

Thethirdproblemisthelackofanintegrated,seamless,anduniedmodelthatcansimul-taneouslyrepresentthehistoricalandthefuturemovementsofamovingobjectindatabases.Atatimeinstantt,amovingobjectdoesnotonlyhaveahistoryofitsmovementuptoitsstateattbutitcanalsohaveafuturepredictionstartingatt.Sofar,existingmodelssupporteitherhistoricalmovementsorfuturemovementsonlybutnotbothtogether.Butmodelingthepastandfuturemovementsofanobjectrequiresbothconcepts.Thismeansthatspecialattentionisneededtoaccommodatebothconceptsinasinglemodelsothattheycanbeappliedtothesameobjectwithoutconictingeachotherandsothatspatiotemporaloperationsandpredicatesonmovingobjectscanbeappliedtotheentiretemporaldomain. Attheimplementationlevel,implementationsofspatiotemporaldatatypesarerareandaregenerallydoneaspartofresearchprototypedatabasesystems.Ageneralproblemisthatmanyusefulconceptsandtheirimplementationsinsuchresearchprototypes,whicharetailor-madeforacertainproblemareaandutilizeaspecializedinfrastructure,cannotbeeasilytransferredtocommonlyusedcommercialdatabasemanagementsystems(CDBMS).Therefore,theseimplementationsandtheprototypesofferingthemdonotndanadequateappreciationduetotheirincompatibilitywithcommonlyusedCDBMS.Thiseffectivelylimitstheaccessibilityandusabilityofsuchimplementations.Toaddressthisproblem,animplementationofspatiotemporaldatatypesandoperationsmustbedatabase-independentandatthesametimecanbeintegratedintoanyextensibleDBMSthroughitsextensibilitymechanism. 17

PAGE 18

19 ]).Basically,theadvantageoftheabstractlevelisthatitfocusesontheessenceoftheproblem,isconceptuallycleanandsimple,andisnotimpededbycomputer-specicconstraintsresultingfromthenitenessofcomputersystems.Theadvantageofthediscretelevelisthatitsniterepresentationsaredenedbytakingintoaccountthelimitationofcomputersystemswhilemaintainingtheconceptualconstraintssetforthbytheabstractmodel.Ingeneral,severalniterepresentationsarepossibleforthesameabstractconcept.Forexample,curvescouldalsoberepresentedassplinesatthediscretelevel.Anotherdesignlevelalsoexistscalledimplementationlevel.Inthislevelofmodeling,specicdatastructuresandalgorithmscanbedenedbasedontheniterepresentationsetforthbythediscretemodel.Forexample,datastructuressuchasarraysorlistsoflinesegmentsmaybeusedtoimplementthepolylinerepresentationofcurves,andalgorithmssuchastheplanesweepalgorithmorothersegmentintersectionalgorithmscanbeusedtoimplementoperationsbetweenpolylines.ThedesignoftheMovingBalloonAlgebradescribedinthisresearchispresentedateachofthesethreeabstractionlevels. TheMovingBalloonAlgebraisbasedonthemetaphorofaballoontomodelourknowledgeofamovingobjectataspecictimeinstant:thestringandthebodyofaballoonobjectrepresenttheknownpastmovementandthepredictedfuturemovementofamovingobjectrespectively. 18

PAGE 19

Withthismodel,wesolvethersttwoconceptualproblemsbyprovidingapreciseandfor-maldenitionofmoving(balloon)objectsalongwithappropriatespecicationsofthepropertiesoftheirmovements.Wesolvethethirdconceptualproblembyseamlesslymodelingthedynamicofboththepast(asfacts)andthefuture(aspredictions)throughballoonobjects.Besidealreadyavailableconceptsthatweintendtopreserveandrene(liketheapproachesin[ 22 32 ]),wein-troducenewfunctionalitysuchastheabilitytoanalyzetheaccuracyofpredictionsovertime.Wealsoofferaninterfaceforcooperatingwithspecic(forexample,probabilistic,fuzzy)predictionmodelsformovingobjects.Finally,weaddresstheimplementationproblembydesigninganim-plementationmodeloftheMovingBalloonAlgebrathatcanbeusedtoimplementthealgebraasatypesystemlibrarywhichcanbeintegratedintoanextensibleDBMS.Inthisresearch,wearemainlyinterestedinthefundamentalmodels,semantics,andtheirimplementationsindatabases.Otheroptimizationandlteringconceptssuchasspatiotemporalindexingtechniquesarebeyondthescopeofthisresearch. 19

PAGE 20

Besidestheconceptoftime,spatialobjectsformtheconceptualfoundationofmovingobjects.WesummarizethestateoftheartofspatialdatamodelingandsketchtherelevantconceptsofspatialdatatypesandtopologicalpredicatesinSection 2.1 .Then,inSection 2.2 ,wedelineatethestateoftheartofspatiotemporaldatamodelingandpresenttheimportantconceptsofspatiotemporaldatatypesandspatiotemporalpredicates.InSection 2.3 ,wediscusscurrentimplementationaspectsofspatialandspatiotemporaldatatypes.Finally,inSection 2.4 ,weexplorethecurrentintegrationofsuchimplementationindatabasesystems. 2-1 A-C)[ 12 29 48 ].Sincethesesimplegeometricstructuresareunabletorepresentthevarietyandcomplexityofgeographicphenomena,thesecondgenerationofdatamodelsprovidesmoreexpressiverepresentationsofspatialobjectsthatallowsupportformulti-componentobjectsaswellasobjectswithholes[ 5 44 59 62 ].Theyarerepresentedbycomplexspatialdatatypesforcomplexpoints,complexlines,andcomplexregions(Figure 2-1 D-F).Theirformaldenitioncan,forexample,befoundin[ 59 ].Informally,acomplexpointobjectisanitesetofsinglepoints.Acomplexlineisdenedasaninnitepointsetthatstructurallyconsistsofanitesetofblocks.Eachblockcontainsanitenumberofsimplelines.Acomplexregionisdenedasaninnitepointsetthatstructurallyconsistsofanitesetoffaces.Eachfacehasanoutersimpleregionandcontainsanitesetofdisjointsimpleregionscalledholes. 20

PAGE 21

Figure2-1. Examplesofspatialobjects.A)Asimplepointobject.B)Asimplelineobject.C)Asimpleregionobject.D)Acomplexpointobject.E)Acomplexlineobject.F)Acomplexregionobject. Theobjectdenitionofeachspatialdatatypedistinguishesthreecomponents:theinterior,boundary,andexterior.Forexample,theboundaryofalineobjectconsistsofitsendpoints.Itsinteriorconsistsofthelinepartthatconnectstheendpoints.Theexteriorofalineobjectconsistsofallpointsoftheplanethatarenotpartoftheinteriororboundary.Theboundaryofaregionobjectisthelineobjectdeningitsborder.Theinteriorofaregionobjectconsistsofallpointsenclosedbytheborder.Theexteriorcontainsallpointsthatareneitherpartoftheboundarynortheinterior.Theseconcepts,whichareformallydenedin[ 59 ],areleveragedforthemodelingoftopologicalrelationshipsdiscussedinthenextsubsectionaswellastheinteractionsofpredictedmovingobjectsdescribedinSection 3.4.2 .WeusethiscomplexspatialdatamodelasthebasisforourMovingBalloonAlgebraduetoitsexpressivenessofrepresentationanditsclosurepropertyunderspatialoperations. 56 ]basedonspatiallogicandthe9-intersectionmodel[ 13 15 ]basedonpointsettopology.The9-intersectionmodeldenestopologicalrelationshipsbasedontheninepossibleintersectionsoftheboundary(A),theinterior(A),andtheexterior(A)ofaspatialobjectAwiththecorrespondingcomponentsofanotherobjectB.Eachintersectionistestedwithregardto 21

PAGE 22

2-2 A. Topologicalrelationshipshavebeenrstinvestigatedforsimplespatialobjects(Figure 2-2 B),thatis,fortwosimpleregions(disjoint,meet,overlap,equal,inside,contains,covers,coveredBy)[ 9 14 ],fortwosimplelines[ 7 15 ],andforasimplelineandasimpleregion[ 16 ].Topologicalpredicatesinvolvingsimplepointsaretrivial.Thetwoworksin[ 8 ]and[ 17 ]aretherstbutrestrictedattemptstoadenitionoftopologicalrelationshipsoncomplexspatialobjects.In[ 8 ],theTRCR(TopologicalRelationshipsforCompositeRegions)modelonlyallowssetsofdisjoint,simpleregionswithoutholes.Topologicalrelationshipsbetweenthesecompositeregionsaredenedinanadhocmannerandarenotsystematicallyderivedfromtheunderlyingmodel.Theworkin[ 17 ]onlyconsiderstopologicalrelationshipsofsimpleregionswithholes;multi-partregionsarenotpermitted.Amainproblemofthisapproachisitsdependenceonthenumberofholesoftheoperandobjects. Theworkin[ 59 ],withtwoprecursorsin[ 2 ]and[ 58 ],givesathorough,systematic,andcompletespecicationoftopologicalrelationshipsforallcombinationsofcomplexspatialdatatypes.Detailsaboutthedeterminationprocessandprototypicaldrawingsofspatialscenariosvisualizingalltopologicalrelationshipscanbefoundinthesepublications.Thisapproach,whichisalsobasedonthe9-intersectionmodel,isthebasisofourtopologicalpredicateimplementationinSection 5.2 .Figure 2-2 Bshowstheincreaseoftopologicalpredicatesforcomplexobjects point 2/53/143/7line 3/1433/8219/43region 3/719/438/33AB Figure2-2. The9-intersectionmodelandtopologicalpredicates.A)The9-intersectionmatrix.B)Thenumbersoftopologicalpredicatesbetweentwosimple/complexspatialobjects. 22

PAGE 23

49 ].Amongthem,afewmovingobjectmodelshavebeenrecentlydesignedthatareofsignicantinterestformanynewemergingapplications[ 34 ].Movingobjectmodelscanbedistinguishedwithrespecttothetypeofmovementtheysupport.InSection 2.2.1 ,werstdiscussanexistingmovingobjectmodelandacorrespondingspatiotemporalpredicate(STP)modelthatsupportthepastevolutionofmovingobjects.Then,inSection 2.2.2 ,wetakealookatanumberofdatamodelsaswellasSTPmodelsthatsupportspecictypesofnearfuturedevelopmentsofmovingobjects. 32 61 ].Thepastdevelopmentisahistoricalfactthatismodeledasafunctionfromtimetospace[ 18 25 ].Foranarbitrarynon-temporaldatatypea,itscorrespondingtemporaldatatypeisprovidedbyatypeconstructort(a)whichisafunctiontypethatmapsfromthetemporaldomaintimetoa,thatis,t(a)=time!a.Byapplyingthetypeconstructorttothespatialdatatypespoint,line,andregion,weobtainthecorrespondingspatiotemporaldatatypesnamedmpointformovingpoints,mlineformovinglines,andmregionformovingregions[ 19 ]: 2.1.1 )ateachtimeinstantatwhichitisdened;asingle-componentspatialobjectasafunctionvalueatatimeinstantisthusaspecialcase.Figures 2-3 Aand 2-3 Bshowsingle-componentmovingpointandmovingregionobjectsrespectivelywhileFigures 2-3 Cand 23

PAGE 24

Figure2-3. Examplesofmovingobjects.A)Asingle-componentmovingpointobject.B)Asingle-componentmovingregionobject.C)Amulti-componentmovingpointobject.D)Amulti-componentmovingregionobject. 2-3 Dillustratecorrespondingmulti-componentobjects.AnapplicationexampleforFigure 2-3 Disabrushrethatoriginatesatdifferentlocationsatdifferenttimes. Thetypeconstructortisdenedinaverygeneralwayandallowsanykindoftemporalfunction.Forinstance,wecoulddeneafunctionthatmapseachtimeinstantrepresentedbyarationalnumbertothepoint(1;1)andeachtimeinstantrepresentedbyanirrationalnumbertothepoint(2;2).However,thisdoesnotdescribemovement,andhencethequestioniswhichspatiotemporalfunctionsrepresentvalidmovements.Forexample,theunrestricteddenitionoftalsoallowsamovingpointtomovecontinuously(Figures 2-3 A, 2-3 B),disappearforperiodsoftime(Figure 2-4 A, 2-4 E),appearinstantly(Figures 2-4 B, 2-4 F),havespatialoutliers(Figure 2-4 D),orhaveinstantaneousjumps(Figures 2-4 C, 2-4 G).Adenitionismissingthatpreciselystateswhichspatiotemporalfunctionsrepresentallowedmovementsandwhichfunctionsdonotconformtoourintuitiveunderstandingofmovement.Furthermore,thisapproachdoesnotsupportfuturepredictionsofmovingobjects.Inourmodel,weemployasimilarapproachofusingatypeconstructortoconstructspatiotemporaltypesforrepresentinghistoricalmovementsofmovingobjects.However,wetaketheextrastepofpreciselyspecifyingthepropertiesofobjectmovementsaswellasdescribinghowanobjectmovesandevolvesinthepastandhowitsfuturepredictedmovementandextensioncanberepresented. Basedonthemovingobjectsmodeljustdescribed,theSTPmodelpresentedin[ 22 ]providesspatiotemporalpredicatesforpastmovementsandisabletocharacterizethetemporal 24

PAGE 25

2-4 HdepictsthespatiotemporalpredicateCross.Inotherwords,aspatiotemporalpredicatebetweentwomovingobjectsisatemporalcompositionofperiodandinstantpredicatesbetweenthetwoobjects.TheSTPmodelisonlyabletocapturethetemporaldevelopmentoftopologicalrelationshipsbetweenhistoricalmovingobjects.Butitisunabletorepresenttheuncertaintyofthetopologicalrelationshipsbetweenpredictedmovingobjectsaswellasthecombinationofpastandfuturedevelopmentsoftopologicalrelationships. 60 ],whichisbasedontheconceptofmotionvector,isabletorepresentnearfuturedevelopmentsofmovingobjectsthroughtheassumptionontheobjects'inertiathatthecurrentmotiondirectiondoesnotchangeinthenearfuture.Althoughthismodelisabletorepresentthenearfuturemovementofamovingobject,thepredictedmovementislimitedtoasinglemotionconceptthatcannotbemodied.Theaspectofuncertaintysuchastheprobabilityofoccurrenceisnotpartofthemodel.Othermodelsareabletocapturetheuncertaintyaspectoffuturemovementsthroughtheuseofatrajectoryormotionplanwithaconstant[ 26 ]orvariableuncertaintythreshold[ 43 ].Theapproachin[ 38 ]makesuseofaconceptcalledspace-timeprismtomodeltheuncertaintyofmovementbetweenknownstatesofanobject'strajectorywithcertainassumptionsontheobject'svelocity.Anotherapproachpresented 25

PAGE 26

EFGH Figure2-4. Examplesofspatiotemporalfunctionsformovingpoints.A)Partiallydisappear.B)Instantlyappear.C)Haveinstantaneousjumps.D)Havespatialoutliers.Examplesofspatiotemporalfunctionsformovingregions.E)Partiallydisappear.F)Instantlyappear.G)Haveinstantaneousjumps.H)Anexampleofaspatiotemporalpredicate. in[ 36 ]modelsandpredictsfuturemovementsofmovingobjectsinaconstrainednetworkenvironment.Itisimportanttonotethatanaspectwhichallofthesemodelshaveincommonisthateithertheytrytopredictthefuturemovementbyassumingaspecicpredictiontechniqueortheyaredesignedtohandleaspecictypeofmotiononly.AsemphasizedintheIntroduction,thegoalofourefforthereisnotabouthowtopredictaspecictypeofmovementbutabouthowtoprovidegeneralpurposedatamodelsupportformovements(includingfuturepredictions)indatabases. Withregardtothemodelingofspatiotemporalpredicatesforfuturepredictions,themodelpresentedin[ 26 ]capturestheuncertaintyaspectofthefuturetopologicalrelationshipbetweenamovingpointandastaticregion.Thefuturemovementofamovingpointisdenedbyafuturemotionplanortrajectoryandathresholdvaluesignifyinganacceptabledeviationoftheactualmovementfromthetrajectory.Theapplicationofathresholdaroundafuturetrajectorycreatesatrajectoryvolumewhichrepresentsthesetofallpossiblefuturemotioncurves.Aspatiotemporalpredicate(forexample,sometimesinside)isthendenedbasedonthetopologicalrelationship 26

PAGE 27

6 30 31 59 62 ]aretheonlyformalapproaches;theyallsharethesame,mainstructuralfeatures.TheOpenGISConsortium(OGC)hasproposedsimilargeometricstructurescalledsimplefeaturesinitsOGCAbstractSpecication[ 45 ]andinitsGeographyMarkupLanguage(GML)[ 46 ],whichisanXMLencodingforthetransportandstorageofgeographicinformation.ThesegeometricstructuresaredescribedinformallyandarecalledMultiPoint,MultiLineString,andMultiPolygon.AnothersimilarbutalsoinformallydescribedspatialdatatypespecicationisprovidedbyESRI'sSpatialDatabaseEngine(ArcSDE)[ 24 ].Further,databasevendorshaveaddedspatialextensionpackagesthatincludespatialdatatypesthroughextensibilitymechanismstotheirdatabasesystems.ExamplesaretheInformixGeodeticDataBlade[ 35 ],theOracleSpatialCartridge[ 47 ],andDB2'sSpatialExtender[ 11 ].Theseimplementationsofferlimitedsetsofnamedtopologicalpredicatesforsimpleandcomplexspatialobjects.Buttheirdenitionsareunclearandtheirunderlyingalgorithmsunpublished.TheopensourceJTSTopologySuite[ 37 ]conformstothesimplefeaturesspecication[ 45 ]oftheOpenGISConsortiumandimplementstheaforementionedeighttopologicalpredicatesforcomplexspatialobjectsthroughtopologygraphs.Atopologygraphstorestopologyexplicitlyandcontainslabelednodesandedgescorrespondingtotheendpointsandsegmentsofaspatialobject'sgeometry.Foreachnodeandedgeofaspatialobject,onedetermineswhetheritislocatedintheinterior,intheexterior,orontheboundaryofanother 27

PAGE 28

5.2 ,weprodiveoursolutionforanefcientimplementationoftopologicalpredicatesoncomplexspatialobjectswhichrequireslinearithmic(loglinear)timeandlinearspace. Unlikethoseofspatialdatamodels,implementationsofspatiotemporaldatamodelsareveryrareand,inmostcases,onlyexistintheformofresearchprototypes.AnexampleofsuchanimplementationcanbefoundaspartoftheSECONDOprototypesystem[ 4 ].ThespatiotemporalmoduleofSECONDOisdevelopedbasedontheapproachin[ 32 61 18 25 ]whichonlysupportsthepastmovementofmovingobjects.However,ourmaininteresthereisonthemodelingandimplementationofamovingobjectalgebrawhichcansupportboththepastandpredictedmovementsofmovingobjects. 28

PAGE 29

5.5 ). 29

PAGE 30

Inthischapter,wedescribetheabstractmodelwhichisthehighestlevelofabstractionoftheMovingBalloonAlgebra 3.1.1 ,wedescribehowspatialobjectscanmovebyidentifyingsomefundamentalpropertiesofmovement.Especially,wedenewhatcontinuousmovementofaspatialobjectmeans.TheknowledgegainedfromthissectionenablesusinSection 3.1.2 todirectlyderive(abstract)datatypesforhistoricalmovementsofmovingobjects.Modelingfuturemovementmeansdealingwiththefutureandisinherentlyafictedwiththefeatureofuncertainty.InSection 3.1.3 ,wepresentourviewofthisprobleminadatabasecontextandpresent(abstract)datatypesforpredictedmovementsasasolution.AlltheseconceptswillbeusedinSection 3.2 tomodel 53 ]inpreparationforajournalsubmission. 30

PAGE 31

59 ].Wecan,forexample,thenexpressthattheintersectionoftwodisjointregionobjectsistheemptyregionobject. Tomodelthechangeofobjectsovertime,weadoptourownmodelingapproachfrom[ 19 22 32 ]anddeneatemporallychangingentityasafunctionovertime.Thatis,wemodelvaluesofanontemporaltypeathatchangeovertimeasafunctionoftype tisatypeconstructorthatconstructsthetemporalcounterpartforagivennontemporaldatatype.Typet(a)thendenotesallfunctionsfromtimetoa.Wecallanelementoft(a)atemporalfunctionoratemporalobject.Incasethata=realholds,t(real)denotesadatatypefortemporalrealnumbers.Thesecan,forexample,beusedtorepresenttemperaturecurves.Similarly,weobtaindatatypesfortemporalBooleans,temporalintegers,andtemporalstrings.Ifa2fpoint;line;regiong,weobtainspatiotemporaldatatypesformovingpoints,movinglines,andmovingregions.Thatis,wedenote(spatial)changeovertimeasmovement.Wealsonameallmentionedtypesmbool,mint,mstring,mreal,mpoint,mline,andmregionrespectively. 31

PAGE 32

Asecondobservationisthattemporalobjectscanshowacontinuousevolution.Formovingspatialobjects,continuityiseventheessentialfeature.Continuousevolutioncan,ingeneral,bedescribedbyacontinuousfunctionforwhich,intuitively,smallchangesintheinputresultinsmallchangesintheoutput.Thisleadsustothequestionhowthechangebetweentwonon-spatialobjects,thatis,betweentwoBooleanvalues,twointegernumbers,andtworealnumbers,canbespecied,and,muchmoreinterestingly,howthechangebetweentwospatialobjects,thatis,betweentwopoints,twolines,andtworegions,canbecharacterizedintheEuclideanspace.Eachcharacterizationshouldalsocapturediscretechanges.Forthispurpose,Denition 3.1 introducesadissimilaritymeasurefforeachdatatype. 32

PAGE 33

3.2 ,wespecifytwopredicatesdfbanddftthatcheckwhetherfisdenedattfromthebottomandfromthetoprespectively. (i)dfb(f;t):=9e2R+80
PAGE 34

3-2 Agivesanexampleofthissituation.Thedashedlineattimetrepresentsaninstantaneousjumpandconnectsthemovementbeforeandafterthejump.Thehollowcircleindicatesthatthisisnotthefunctionvalueattimet;itisgivenbythefullcircle. Thesituationisdifferentfortemporalobjectsbasedonspatialdatatypes,thatis,formoving(spatial)objects.Ateachtimeinstantofitsdomain,amovingobjectmayincludemultiplesimplespatialvalues.Apointobjectmayconsistofseveralsinglepoints,alineobjectmayincludeseveralblocks,andaregionobjectmayincorporateseveralfaces(Section 2.1.1 ).Thiscan,forexample,beillustratedwithFigure 2-3 Cinwhichanyplaneparalleltothe(x;y)-planeandbetweenthetwodashedlinesintersectsthemovingpointobjectinasetofone,two,orthree 34

PAGE 35

2-3 D,aplaneparalleltothe(x;y)-planebetweenthetwoupperdashedlinesintersectsthemovingregionobjectinasetoftwofacesmakinguparegionobject.Themultiplesimplevaluesofamovingobjectatatimeinstantmaymovesimultaneouslyovertime,stayseparatefromeachother,interact,coincide,merge,split,partiallystoptoexist,orpartiallystarttoexist.Thegoalofthefollowingdenitionsistoallowthesedifferentbehaviors. InDenition 3.4 ,wespecifytheimportantconceptofcontinuityatatimeinstantforamovingobject.ItrestsonthelimitconceptofDenition 3.3 (i)fisf-continuousfromthebottomattif,andonlyif,limfd!0f(td)=f(t)(ii)fisf-continuousfromthetopattif,andonlyif,limfd!0f(t+d)=f(t)(iii)fisf-continuousattif,andonlyif,limfd!0f(td)=f(t)(iv)fisf-discontinuousattif,andonlyif,fisnotf-continuousatt Figure3-1. Examplesoff-continuoustemporalfunctions.A)simultaneousmovement.B)Amergingsituation.C)Asplittingsituation.D)Acombinedmergingandsplittingsituation. Thisdenitionimplies,forexample,thatthemovingobjectsinFigure 2-3 AandFig-ure 2-3 Baref-continuousontheopenintervalsindicatedbythedashedlines.Theyaref-discontinuousatthetimeintervalendpointssincetheyaref-continuousfromthetopatthelowerendpoints,andf-continuousfromthebottomattheupperendpoints.Wendsimilarsituations 35

PAGE 36

3-1 A(simultaneousmovement), 3-1 B(amergingsituation), 3-1 C(asplittingsitua-tion),and 3-1 D(acombinedmergingandsplittingsituation)whichalsosatisfythepropertyoff-continuityintheopentimeintervalsandf-discontinuityinthetimeintervalendpoints.NotethatinFigure 3-1 D,themovingpointobjectisf-continuousatthetimeinstantwhenitstwocomponentsintersect. ABC Figure3-2. Examplesoff-discontinuoustemporalfunctions.A)Aninstantaneousjumpinanmrealobject.B),C)Twoconstellationswithtimeinstantsatwhichthefunctionisevent-f-discontinuous. Thediscontinuitiesatthetimeintervalendpointsareallowedandareexamplesoftopolog-icalevents.Theyariseheresincethemovingobjectsareundenedoutsidethesetimeintervals.Anotherviewisthatcomponentsofamovingobjectstarttoexistatlowerintervalendpointsandceasetoexistatupperintervalendpoints.DiscontinuitiescanalsobefoundinFigures 2-3 Cand 2-3 DaswellasinFigures 2-4 AtoG.Surprisingly,mostdiscontinuitiesdescribeameaningfulandthuscorrecttemporalbehaviorofmovingobjectsandhavetobepermitted.Thereasonisthatmultiplesimplespatialvaluesofthesamemovingobjectmayevolveindependently.Intuitively,atopologicaleventarisesinFigures 2-3 Cand 2-3 Dwhenthenumberofbasicsimplevalueschangesatatimeinstant.Figures 3-2 Band 3-2 Cillustratethisinmoredetail.ThemovingobjectinFigure 3-2 Bisf-continuousfromthetopbutnotfromthebottomatt1(changefromzerotoonecomponent)andt2(changefromonetotwocomponents)aswellasf-continuousfromthebottombutnotfromthetopatt3(changefromtwotoonecomponent)andt4(changefromonetozerocomponents).Figure 3-2 Cshowsacasewhenamovingobjectisneitherf-continuousfromthetopnorfromthebottomatatimeinstantt(changefromtwocomponentsbeforetto 36

PAGE 37

2-4 Aand 2-4 Erepresentmovingobjectsthatarealternatelycontinuousanddiscontinuousondisjointtimeintervals,thatis,theyarerepresentedbypartialfunctions.Figures 2-4 Band 2-4 Fillustratethecaseofaninstantlyappearingmovingobjectwithisolated(time,spatialobject)pairs.Weallowthiskindofdis-continuityalthoughitisdebatablewhetheramovingobjectcanexistatatimeinstantonly.Ourmainmotivationtoallowthissituationconsistsindesiredclosurepropertiesofspatiotemporaloperations.If,forexample,twomovingpointobjectsintersectinasinglepointatatimet,wewouldliketobeabletorepresenttheintersectionresultasamovingpointobject.Similarly,atime-sliceoperationshouldbeabletoyieldaregionobjectattimetasamovingregionobject.WealsopermitthecasesinFigures 2-4 Cand 2-4 Gasvalidmovingobjects.Thereasonisthatinstantaneousjumpscanalsobeinterpretedastheterminationofonecomponentandtheemer-genceofanothercomponentatthesametimeinstant.Figure 2-4 Galsoshowstwointerestingsituationswherethebottomregionofanuppercomponentislocatedinthetopregionofaloweradjacentcomponent.Thefunctionvalueatsuchatimeinstantisthelargerregion.Again,itisdoubtfulwhethersuchaninstantaneousshrinking(orgrowing)canhappeninspatialrealitybutclosurepropertiesrequiretheacceptanceofsuchsituations.Aunionofthreemovingregionobjects,eachrepresentingoneofthethreecomponents,leadstothemovingregioninFigure 2-4 G.Wedenoteallaforementionedsituationsofpermitteddiscontinuoustopologicaleventsasevent-f-discontinuous. AsituationwedonotallowisaspatialoutlieratatimeinstanttasinFigure 2-4 D.Itisgivenbyatemporalfunctionthatdoesnotrepresentarealisticmovementsinceintuitivelyitdeviatesfromitsgeneralrouteandreturnstoitforatimeinstantonly.Denition 3.5 providesthefulldenitionofevent-f-discontinuity. 37

PAGE 38

3.5 (i)meansthatfisisolatedatt.Denitions 3.5 (ii)and(iii)preventaspatialoutlieratanendpointtofatimeintervalofthedomainoff.Inbothcases,thelimitmustbepartofthefunctionvalueatt.Ifaspatialoutlieroccursinthemiddleofatimeinterval,wehavetodistinguishtwocases.Ifthelimitsfromthetopandfromthebottomaredifferent,theymustbepartoforequaltothefunctionvalueattimet(Denition 3.5 (iv)).Ifthelimitsareequal,thecommonlimitmustbeproperlycontainedinf(t)sinceequalitywouldmeanf-continuityattincontrasttoourassumption(Denition 3.5 (v)). Figure3-3. Movingpointobjectgivenbyatemporalfunctionwithalocalminimumandalocalmaximum. Aninterestingobservationisthatthepropertyofmonotonicitywithrespecttothetimeaxisdoesnotplayaroleforthedenitionofmovement.Thereasonisthatcomplex(andnotsimple)spatialobjectsarethebasisofconstructingmovingobjects.Figure 3-3 showsatemporalfunctionofamovingpointobjectwithalocalminimumatt1andalocalmaximumatt2.Theonlyvalidinterpretationofthisgureisthatatt1twonewcomponentsariseatthelocalminimum.Theleftofthesetwocomponentsmergesandterminateswiththeoutermostleftcomponentatt2. 38

PAGE 39

3.4 and 3.5 ,wearenowableinDenition 3.6 tospecifythedesiredpropertiesofthetypeconstructortforrepresentingvalidmovingobjects.Thenotations[a;b]and]a;b[representclosedandopenintervalsrespectivelywithendpointsaandb. (i)9n2N:dom(f)=Sni=1[t2i1;t2i](ii)81in:t2i1t2i(iii)81i
PAGE 40

Ourmodelingofhistoricalmovementassumesfullknowledgeaboutthepastlocationsandextentofmovingobjectsintheirtimedomains(thatis,whentheyaredened).Byusingpartialtemporalfunctions,lackingknowledgeisexpressedbytimeintervalswhensuchfunctionsareundened.Spatiotemporaldatatypesforhistoricalmovingobjectscanbedirectlymodeledonthebasisofthetconstructor.Wedeneatypeconstructorqwithq(a)t(a)fora2fpoint;line;regionginDenition 3.7 2.2.1 34 ].Examplesaretheanticipationofpossibleterroristactivities,homelandsecurityingeneraltoprotectterritoryfromhazards,reoutbreakandhurricanepredictiontodetermineevacuationareas,anddisastermanagementtoinitiateemergencypreparednessandmitigationefforts. 40

PAGE 41

3.1.3.1 ,wepresentourapproachforhandlingfuturepredictionsofmovingobjects.Takingintoaccounttheinherentuncertaintyofthefuture,weexplorehowthefuturepositionsandextentofamovingobjectcanberepresented.Wepresentcorrespondingspatiotem-poraldatatypesinSection 3.1.3.2 Weconsiderafewexamplesinordertounderstandtheuncertainnatureofmovingobjectsinthefutureandtherequirementsoftheirrepresentation.Thecentralissueistherepresentation 41

PAGE 42

DEF Figure3-4. Modelingpotentialfuturepositionsofspatiotemporalobjects.A)Forahurricane'seyeatnow+12hours.B)Withinthe12-hourperiod.C)Foravehicleatnow+15minutes.D)Withinthe15-minuteperiod.E)Foravehiclewithaconstantspeedatnow+15minutes.F)Withinthe15-minuteperiod. ofthepotentialfuturepositionsand/ortheextentofapredictedmovingobjectsincebothitspositionsanditsextentareafictedwithuncertainty.Forexample,thepositionoftheeyeofahurricaneat12hoursfromnowmaypossiblybeanywherewithinapredictedregion(Figure 3-4 A).Thatis,thisregionrepresentsallpotentialfuturepositionsofthehurricane'seyeat12hoursfromnow.Likewise,ifweareinterestedinthefuturepositionsforacertainperiodinthefuture,forexample,fromthepresenttimeto12hoursinthefuture,thentheactualpositioncanbeanywherewithinapredictedvolumeifweadoptathree-dimensionalinterpretation(Figure 3-4 B).Thisvolumerepresentsthegeometricunionofthepredictedregionsatalltimeinstantsduringthe12-hourperiod.Itcanalsobeinterpretedasthedevelopmentofapredictedregionoveraperiodoftime.Hence,itresemblesamovingregionwhichcanberepresentedbyusingourspatiotemporaldatatypet(region). Similarly,ifwewanttomodelthefuturepositionofavehicletravelinginaroadnetwork,wecanonlystatethatthepositionofthevehicleat15minutesfromnowwillbesomewherebetweenmilemarker10and15.Thatis,thecorrespondingsegmentoftheroadrepresentsthe 42

PAGE 43

3-4 C).Similarstatementscanbemadeforothertimeinstantssuchasat5minutesand10minutes.Byformingthegeometricunionofthepredictedroadsegmentsatalltimeinstantsduringthe15-minuteperiod,weobtainasurfaceinthethree-dimensionalspace(Figure 3-4 D).Thissurfacerepresentsallpotentialpositionsofthevehicleduringthe15-minuteperiod.Thesurfacecanalsoberegardedasthedevelopmentofapredictedroadsegmentoveraperiodoftime.Hence,ithasthesamefeatureasamovinglineandcanthusberepresentedbyusingourspatiotemporaldatatypet(line). Incasethatthevehiclealwaysmaintainsaconstantspeed,wecanmorepreciselysaythatitspositionat15minutesfromnowwillbeataspecicpoint(iftheroaddoesnotsplit)oramongasetofpoints(iftheroadsplits)(Figure 3-4 E).Inthiscase,thepotentialpositionsofthevehicleoveraperiodoftimecanbemodeledasamovingpointandcanthusberepresentedbyourspatiotemporaldatatypet(point)(Figure 3-4 F). Sofar,wehaveassumedthatapointobjectmoves.Ifweconsideranobjectwithextentlikealineobject,itsfuturepredictionovertimecanbedescribedbyeitheramovinglineoramovingregiondependingontheenvironmentandthenatureofitsmovement.Forexample,ifwetreatatrainasalineobjectduetoitspossiblyverylonglength,thefuturepredictionofitsextentinarailroadnetworkatatimeinstantinthefuturecanberepresentedbyalineobject.Foraperiodoftime,thedevelopmentofthepredictioncanberepresentedbyamovinglineobjectoftypet(line).Ifweconsiderthemovementoftheboundarybetweenfreshwaterofariverandsaltwaterofanoceanwheretheriverowsinto,wemayusearegiontorepresentthepotentialwhereaboutoftheboundaryatatimeinstantinthefuture.Thisisbecausethemovementoftheboundaryinanoceanisunrestricted.Foraperiodoftime,thedevelopmentofthisregioncanberepresentedbyamovingregionobjectoftypet(region). Theothertypeofobjectwithextentotherthanalineobjectisaregionobject.Foraregionobjectsuchasastorm,afuturepredictionofitsextentataninstantinthefutureisalwaysaregion.Thisisbecauseitiscounter-intuitivetopredicttheextentofastormtobealineobjector 43

PAGE 44

Inourdiscussionoffuturespatiotemporalevolution,wehaveexclusivelyconcentratedonitsgeometricaspects.Likehistoricalspatiotemporalevolution,itcanalsobemodeledbymovingobjectsoftypet(a).However,wehavesofarcompletelyneglectedtheuncertaintyafictedwithit.Thatis,ourconceptsofardoesnotspecifytherelativechanceordegreeofcondencewithwhichapointwilleventuallyrepresentthepositionorpartoftheextentofapredictedmovingobjectatafuturetimeinstant. Todothis,werequireaconceptofcondencedistribution(C)inDenition 3.8 suchthateachpointofapredictedspatialobjectasthefunctionvalueofapredictedmovingobjectataparticulartimeinstantisassociatedwithadegreeofcondence. TheabovedenitionallowsanytypeofdistributionforC(a).Forexample,C(a)canbeaprobabilitydistributionoveradescribingtheprobabilitydensity(condencelevel)ofeachpointina.Moreover,C(a)canalsobeafuzzysetindicatingthelevelofmembershipforeachpointina.Toapplythisconceptofcondencedistributiontoamovingobjectforrepresentingfuturepredictionsovertime,wecanusetheconceptofspatiotemporalmappingtotemporallyliftCovertimetodeneamovingcondencedistribution(MC)asshowninDenition 3.9 Here,wedonotrestricthowMC(a)developsovertimesincethecondencedistributioninformationisdomainspecic,thusitmaytakeanyshapeorformdependingonagiven 44

PAGE 45

Figure3-5. Representingthefuturepredictionofahurricane'seyeusingamovingregionwithamovingcondencedistribution.Thegradientindicatesvarieddegreeofcondence. Toillustratetheconceptspresented,considertheexampleofahurricane.Wecanmodelthesetofpotentialpositionsoftheeyeofthishurricaneusinganhregionobject(Figure 3-4 B).Byapplyingamovingcondencedistributiononthehregionobject,weobtainanewkindofobjectwhichrepresentsthesetofpotentialfuturepositions,eachwithadegreeofcondence,ofthehurricane'seye(Figure 3-5 ).Thismeansthatthefuturemovementtrajectoryofthehurricane'seyeispredictedtobeapartofthisobject.Wedenethedatatypesforthiskindofobjectsinthenextsection. 45

PAGE 46

3-6 ABCD Figure3-6. Examplesofvalidfuturepredictions.A)Acontinuousfpointobject.B)Acontinuousfregionobject.C)Adiscontinuousfregionobject.Anexampleofinvalidfuturepredictions.D)Adimensionallycollapsedobjectwithmultipletypes. Itisimportanttounderstandthatthesefuturedatatypesaredenedonlyforfuturepre-dictionsofmovingobjects.Theydonotmakeanyreferenceorassumptiononthehistoricalspatiotemporaldatatypesofthemovingobjects.Forexample,anobjectoftypefregioncanbeusedtorepresentthefuturepredictionofeitheramovingpoint,amovingline,oramovingregion.Tomodelthenatureofmovementofamovingobjectproperly,werequireboththepastmodelandthefuturemodel.Wewillseeinthenextsectionthatnotallcombinationsofthepastandfuturedatatypesrepresentvalidmovements. 46

PAGE 47

3.2.1 torepresentsnapshots(eachconsistingofahistoryofmovementandpossiblyaprediction)ofourknowledgeaboutmovingobjectsatspecictimeinstantsoftheirmovement.Basedonthisconcept,thespatiotemporalde-velopmentofthisknowledgewhichisacontinuousstreamofthesesnapshotsisthenrepresentedbyourspatiotemporalballoondatatypesdenedinSection 3.2.2 InSection 3.1.2 ,wehavedenedourmodelforhistoricalmovementsresultinginatypeconstructorq(a).Sinceweusethistypeconstructortoconstructdatatypesforhistoricalmovements,alltimeintervalsspeciedasthedomainofthesedatatypesmustbeintervalsinthepast.Thelatestknownstateofamovingobjectisassumedtobethecurrentstateoftheobject.Thismeansthatthecurrentstateoftheobjectchangesforeveryupdateoftheobject'sposition.Eachupdatecaneithersignifyacontinualmovementofthelastintervalofknowledgeoraperiodofnoknowledgefollowedbyanewinstantofknowledge.Inanycase,thecurrentstateoftheobjectisalwaysdenedasthestateoftheobjectatthelastinstantofthehistoricalmovement.Wedenotethecurrentstateofanobjectbytc.Itispossiblethattcmaybeearlier(older)thantheabsolutepresent(thecurrentclocktimenow),denotedbyta.Thissituationcanhappenwhenwedonothaveinformationaboutthestateoftheobjectattheabsolutepresent(Figure 3-7 )possiblyduetodelayinobtainingsensordata.Ontheotherhand,itisimpossiblefortctobelater(younger)thantheabsolutepresent.Thiswouldmeanthattheobjecthasalreadymovedinthefuturewhichisimpossible.Hence,itisrequiredthattctaholdsforallmovingobjects.We 47

PAGE 48

3-7 illustratesanexampleofahistoricaltemporaldomaintimehforamovingobject. Figure3-7. Exampleofahistoricaltemporaldomaintimehthatstartsfromandendsattcinclusively. Forfuturepredictionsofmovingobjects,wehavedenedatypeconstructorj(b)whichacceptsasaparameteraspatialtypebwhosevaluerepresentsthesetoffuturepositionsorextentofamovingobjectataspecicinstantinthefuture.Here,wewouldliketorestrictthetemporaldomainofthefuturedatatypesproducedbyjsuchthatthesedatatypesdescribeonlythefuturepredictionsofmovingobjects. Figure3-8. Exampleofafuturetemporaldomaintimefthatstartsexclusivelyfromtcandextendsindenitelytowards+. Wedeneatemporaldomaintimefforfuturepredictionsofamovingobjectasahalf-inniteopenintervaloftimewhichstartsexclusivelyfromtcandextendsindenitelytowards+.Hence,timef=(tc;+).Wechoosetobegintimeffromtcbecausethiswouldallowapredictiontobemadeasclosetothelatestknownstateoftheobjectasdesiredirrespectivetothe 48

PAGE 49

3-8 depictsanexampleoftimefforamovingobject. Havingdenedtimehandtimeftorestrictthetemporaldomainsofhistoricalmovementsandfuturepredictionsofmovingobjects,wearenowreadytodeneourballoondatatypes.Weintegratethepast(q)andthefutureprediction(j)typeconstructorstoformanewtypeconstructorWforballoonobjectswhichisdenedontheentiretimedomain.Thistimedomainisaresultofatemporalcompositionoftimehandtimef.Sincethespatialtypeastheargumentofqreferstoadifferentspatialobjectthanthatofthespatialtypeastheargumentofj,wedenotetheformerbyaandthelatterbyb.Thus,wehaveW(a;b)=q(a)j(b).Thatis,foraballoonobjectb=(h;f),h2q(a)representsthepastmovementofaspatialobjectoftypeaandf2j(b)representsthefuturepredictionofbgiventhatthesetofitspotentialfuturepositionsatafuturetimeinstantisdescribedbyaspatialobjectoftypeb.Asindicatedearlier,notallcombinationsofaandbconstitutevalidmovements.Forexample,itisnotpossibletousefpointtorepresentthefutureextentofamovingregion.Ifthisweretobepossible,thismeansthat,atafuturetimeinstant,theregionobjectwouldhaveevolvedintoapointobject.Thisisnotpossiblesinceourdenitionofmovementdoesnotallowmovementsinvolvingdimensionalcollapseintoadifferenttype.Therefore,thecombinationforwhichaistheregiontypeandbisthepointtypehasbeenprovedtobeaninvalidcombination.Thegeneralideahereisthatthesetofpotentialfuturepositionsorextentofamovingobjectatafuturetimeinstantmustbeaspatialobjectofdimensiongreaterthanorequaltothedimensionoftheobjectthatismoving.Thismeansthatanobjectcanmoveorevolvesuchthatatafuturetimeinstant,ittsinorequaltoitspredictionwithoutcollapsingitsdimension.Letdimbeafunctionthatreturnsthedimensionofaspatialtype.Itisrequiredthatdim(b)dim(a)holdsforallvalidcombinationsofaandb.WenowdeneourtypeconstructorWforballoondatatypesinDenition 3.11 49

PAGE 50

pp=W(point;point)=hpointfpointballoon pl=W(point;line)=hpointineballoon pr=W(point;region)=hpointfregionballoon ll=W(line;line)=hlineineballoon lr=W(line;region)=hlinefregionballoon rr=W(region;region)=hregionfregion pp,aballoon pl,andaballoon probjectareshowninFigure 3-6 A, 3-4 D,and 3-6 Brespectively. 50

PAGE 51

3.12 (i)8t2dom(f):f(t):tc=t(ii)8t1;t22dom(f);t1
PAGE 52

pp=time!balloon ppmballoon pl=time!balloon plmballoon pr=time!balloon prmballoon ll=time!balloon llmballoon lr=time!balloon lrmballoon rr=time!balloon rr Exampleofamovingballoonobjectoftypemballoon pr. Anexampleofamovingballoonobjectoftypemballoon prisdepictedinFigure 3-9 .Whenworkingwithmovingballoonobjects,wemustdistinguishthedifferentmeaningsofatimeinstant.Withrespecttoamovingballoonobject,atimeinstanttreferstoaninstantofthedomainoffatwhichweobtainaballoonobject.Wedistinguishthistimedomainasthedynamictimedomain.Withrespecttoaballoonobjectataspecicinstanttofthedynamictimedomain,atimeinstanttsreferstoaninstantofthedomainoff(t)whichistheunionoftimehandtimefatwhichweobtainthepositionorextentoftheobjectoritsprediction.Wedistinguishthistimedomainasthesnapshottimedomain.Nowwecanusethesespatiotemporalballoondatatypes 52

PAGE 53

32 ]whichare:(i)Designoperationsasgenericaspossible;(ii)Achieveclosureandconsistencybetweenoperations;(iii)Captureinterestingphenomena.Eachoftheseprinciplesisachievedintheexistingoperationsdenedinthetraditionalmovingobjectmodel[ 32 ]whichisavague,unrestrcitedversionofourhistoricalmovementmodeldescribedinSection 3.1.2 .Thus,theseoperationsarealsoapplicabletoourhistoricalmovementdatatypes.Letthetypeperiodsrepresentsthesetofalldenedintervalsanddenedinstantsofamovement.Assumealsothatthetypeintime(a)=ainstantrepresentsthestateofthemovementofaspatialobjectoftypeaataspecicinstantintime.Thefunctionmin(a;b)returnsthespatialtypeaorbwhicheverhasthesmallerdimension.Theoperationsareclassiedintovecategories:projection,interaction,temporallylifted,rateofchange,andpredicateoperations.Projectionoperationsreturnprojectionsofthemovementintoeitherthetimedomainorthespacerange.Interactionoperationsincludedecompositionsandinstantiationsofthemovement.Temporallyliftedoperationsarethosenon-temporaloperationsthathavebeenliftedovertimeintotemporaloperations.Rateofchangeoperationsincludethedifferenttypesofdifferentiationsassociatedwithmovementsuchasvelocityandturningrate.Finally,predicateoperationsareusedtoanswer 53

PAGE 54

3-1 liststheseoperationsalongwiththeirsignatures.Thesemanticsfortheseoperationsastheyareappliedtohistoricalmovementdatatypesarepresentedin[ 32 ]. Binarypredicatesincludepredicatesbetweenhomogeneoustypesaswellasheterogeneoustypes.SomeofthebasicspatiotemporalpredicatesareDisjoint,Meet,Overlap,Equal,Covers,CoveredBy,Contains,Inside,etc.SomeofthecomplexspatiotemporalpredicatesincludeTouch,Snap,Release,Bypass,Excurse,Into,OutOf,Enter,Leave,Cross,Melt,Separate,Spring,Graze,etc.Thedetailmodelingofthesespatiotemporalpredicatesisdescribedin[ 22 ].Forallotheroperations,theyhavebeendenedin[ 32 ].Sowewillnotgointodetailaboutthemhere.However,whatstillneedtobedonehereare:(1)determinewhetherandhowtheseoperationscanbeappliedtoournewlyintroduceddatatypesincludingthefuturepredictiondatatypes,theballoondatatypes,andthespatiotemporalballoondatatypes;and(2)discovernewoperationsforthesenewdatatypes. 3.1.3 ,eachofourfuturepredictiondatatypesiscomposedofamovementdatatyperepresentingthemovinggeometryofapredictionandamovingcondencedistributionrepresentingtheuncertaintyoftheprediction.Thus,wecandenetwodecomposi-tionoperations,mgeoandmconf,toobtainthemovinggeometryandthemovingcondencefromapredictionrespectively.Bydecomposingapredictioninthisway,wecandeneallgeometryrelatedoperationsonapredictiontohavethesamesemanticasiftheseoperationsareappliedtothemovinggeometrycomponentoftheprediction.Similarly,allcondencerelatedoperationsareapplicabletothemovingcondencecomponentoftheprediction.TheseoperationsareshowninTable 3-1 .Weonlydescribethemodiedandnewlyintroducedoperationshere.Letthetypeinfutime(a)=aC(a)instantrepresentsthestateofapredictionataninstantintime.Thedecompositionofthistypecanbedoneusingthethreeoperationsinst,val,andconftoobtaineachofthecomponent.Theoperationsatinstant,initial,andnalreturnsanobjectofthetypeinfutime(a)whenappliedtoapredictionoftypej(a).Thepoint confandpointset conf

PAGE 55

Operationsonhistoricalmovementsandfuturepredictionsofmovingobjects. deftime,lifespanq(a)!periodsj(a)!periodslocationsq(point)!pointj(point)!pointtrajectoryq(point)!linej(point)!linetraversedq(line)!regionj(line)!regiontraversedq(region)!regionj(region)!regionroutesq(line)!linej(line)!line mgeoN/Aj(a)!t(a)mconfN/Aj(a)!MC(a)atinstantq(a)instant!intime(a)j(a)instant!infutime(a)instintime(a)!instantinfutime(a)!instantvalintime(a)!ainfutime(a)!aconfN/Ainfutime(a)!C(a)point confN/Aj(a)pointinstant!realpointset confN/Aj(a)binstant!realatperiodsq(a)periods!q(a)j(a)periods!j(a)initial,nalq(a)!intime(a)j(a)!infutime(a)presentq(a)instant!boolj(a)instant!boolpresentq(a)periods!boolj(a)periods!boolatq(a)b!q(min(a;b))j(a)b!t(min(a;b))passesq(a)b!boolj(a)b!boolwhenq(a)(a!bool)!q(a)j(a)(a!bool)!j(a) intersectionq(a)b!q(min(a;b))j(a)b!t(min(a;b))intersectionq(a)q(b)!q(min(a;b))j(a)j(b)!t(min(a;b))union,minusq(a)a!q(a)j(a)a!t(a)union,minusq(a)q(a)!q(a)j(a)j(a)!t(a)crossingsq(line)line!q(point)j(line)line!t(point)crossingsq(line)q(line)!q(point)j(line)j(line)!t(point)touch pointsq(region)line!q(point)j(region)line!t(point)touch pointsregionq(line)!q(point)regionj(line)!t(point)touch pointsq(region)q(line)!q(point)j(region)j(line)!t(point)common borderq(region)region!q(line)j(region)region!t(line)common borderq(region)q(region)!q(line)j(region)j(region)!t(line)no componentsq(a)!q(int)j(a)!t(int)lengthq(line)!q(real)j(line)!t(real)areaq(region)!q(real)j(region)!t(real)perimeterq(region)!q(real)j(region)!t(real)distanceq(a)b!q(real)j(a)b!t(real)distanceq(a)q(b)!q(real)j(a)j(b)!t(real)directionq(point)point!q(real)j(point)point!t(real) derivativeq(real)!q(real)j(real)!t(real)turn,velocityq(point)!q(real)j(point)!t(real) isemptyq(a)!boolj(a)!boolq(a)q(b)!boolj(a)j(b)!boolinteraction potentialN/Aj(a)j(b)!t(real)interaction possibleN/Aj(a)j(b)!boolinteraction possibleN/Aj(a)q(b)!bool

PAGE 56

Inthecaseofaprobability-basedpredictionmodel,thepoint confoperationisusedtoretrievethedensityvalueofagivenpointatagiventimeinstantduringthepredictionperiod.Notethatthisdensityvalueisnotnecessarilytheprobabilityvalueofoccurrence.Thesetwovaluesarethesameonlyinthecaseofadiscreteprobabilitydistributionwhichisapplicabletoapredictionoftypej(point).Thisisnotthecaseforacontinuousprobabilitydistributionwhichisapplicabletoapredictionoftypej(line)orj(region).Weusetheoperationpointset conftodeterminetheprobabilityofoccurrence(percentageofchance)thatapointaspartofthemovingobjectwillfallwithinthegivenpoint-setatagiventimeinstant.Foracontinuousprobabilitydistributionoveralinebased(orregionbased)prediction,theprobabilityofoccurrenceistheintegrationofaprobabilitydistributionfunction(pdf)overapoint-set,whichcorrespondstoeitheranarea(forj(line))oravolume(forj(region))underthecurveorsurface,respectively,ofthepdf.Thus,theprobabilityvalueforapointinthesecontinuousdistributionsisalways0sincewecannotobtainanareaoravolumebyintegratingoverapoint.Similarly,theprobabilityvalueforalineinatwodimensionalcontinuousdistributionoveraregion-basedpredictionisalsoalways0sincewecannotobtainavolumebyintegratingoveraline.Table 3-2 showsthevalueoftheoperationpointset conf(j(a);b;instant)whenappliedtodifferenttypecombinationsofj(a)andbfora;b2fpoint;line;regiong. Table3-2. Valueoftheoperationpointset conf(j(a);b;instant)foreachcombinationofj(a)andbwhetheritisalways0,denotedbyavalue0,orameaningfulvalue,denotedbyavalueM. Tofurtherclarifythemeaningoftheseoperations,considerpredictionsatatimeinstantasshowninFigure 3-10 .ThedensityvalueofthepointpinFigure 3-10 Ais0.25.Sincethispredictionisofthetypej(point),wehaveadiscreteprobabilitydistributionoveraniteset 56

PAGE 57

3-10 Billustratesacontinuousprobabilitydistributionoveraline-basedprediction.Thedensityvalueofthepointpinthiscaseis0.25.However,theprobabilityofoccurrenceatpis0becausewecannotobtainanareabyintegratingthepdfatp.Ameaningfulprobabilityvaluecanonlybeobtainedbyintegratingthepdfoverasegmentoflinewhichisasubsetoftheprediction.Inthisexample,weshowthattheprobabilitythatapointofthemovingobjectwillbeonthelinesegment(p;q)is30%(theareaunderthepdfcurvebetweenpandq).Similarly,Figure 3-10 Cshowsaprobabilityof20%thatapointeventwillfallwithinaregionAwhichisasubsetofaregion-basedprediction.Here,theprobabilityvalueisthevolumedenedbyAunderthepdfsurface. ABC Figure3-10. Examplesofpredictionsatatimeinstant.A)Apoint-basedpredictionwithadiscreteprobabilitydistribution.B)Aline-basedpredictionwithaone-dimensionalcontinuousdistribution.C)Aregion-basedpredictionwithatwo-dimensionalcontinuousdistribution. Unlikeaprobability-basedpredictionmodel,afuzzy-basedpredictionmodelisdesignedtomodelthepotentialinclusion,calledmembershipvalue,ofeachpointofapredictionaspartofapoint-setevent.Thus,thepoint confoperationreturnsthemembershipvalueforagivenpointsignifyingthelevelofcondencethatthispointwillbepartofthemovingobject.Thepointset confreturnstheaveragemembershipvalueofagivenpoint-set.Hencethisoperation 57

PAGE 58

Fortemporallyliftedoperations,allsuchoperationsproducebasicspatiotemporalobjectsinsteadoffuturepredictions.Thisisbecausethefuturepredictionisdecomposedintoitsmovinggeometrycomponentbeforeapplyingtheseoperations. Withrespecttopredicates,thebinarypredicateoperationbetweenpredictionshasthesamesemanticasthebinarypredicateoperationbetweentheirmovinggeometrycomponents.However,withthecondencedistributioninformation,wecanalsodeterminethedegreeinwhichtheactualmovingobjectscanpotentiallyinteract(non-disjoint)witheachotherduringtheperiodofthepredictions.Thisisgivenbytheinteraction potentialoperationwhichreturnsamovingrealnumberindicatingthepotentialofinteractionbetweentheactualobjectsoverthepredictionperiod.Thepossibilityoftheactualobjectinteractiondependsontheinteractionbetweentheirpredictionsandthisisgivenbytheinteraction possibleoperation.ThistopicisfurtherdiscussedinSection 3.4.2 components,length,area,perimeter,distance,anddirection.Thesemanticoftheseoperationscanbeexpressedastheunion,fornon-temporalreturntype,ortemporalcomposition,fortemporalreturntype,betweentheresultsofapplyingtheoperationstobothhistoricalandfuturecomponentsoftheballoonobjects.Althoughmostoftheoperationsonballoondatatypescanbeappliedtotheentireobject,afewoftheoperations,thatis,atinstant,initial,andnal),canonlybeappliedbyrstdecomposingaballoonobjectintoitstwocomponentsandthenapplyingthecorrespondingoperationtothecomponentwhosetimedomainisrelevant.Forexample,theatinstantoperationisappliedtothehistoricalmovementcomponentifthegiveninstantiswithinthetimedomainofthiscomponent.Otherwise,itisappliedtothefutureprediction.Inbothcases,adecompositionoperationmustbeappliedin 58

PAGE 59

projandfuture proj,toobtainthehistoricalmovementandfuturepredictioncomponentofaballoonobjectrespectively.Byusingthesedecompositionoperations,wecanapplyallsupportedoperationsdescribedinprevioussectionsforthesecomponents.Withrespecttospatiotemporalpredicatesbetweenballoonobjects,wedescribeamodelforthesepredicatesinSection 3.4.1 .Theinteraction possibleandinteraction potentialoperationsdeterminewhetherthereisanyinteractionandthedegreeofinteractionrespectivelybetweentwoballoonobjectsforthedurationoftheirdenedperiods.Letgbeaspatialdatatype.TheoperationsthatareapplicabletoballoondatatypesarelistedinTable 3-3 3-9 ,thedenedperiodofthemovingballoonobjectistheperiodbetweent0andt4.Thisensuresthatatanyinstantofthisdenedperiod,wecanobtainaballoonobject.Inotherwords,theactualmovementmadebytheobjectduringthisdenedperiodcanbeobtainedfromthepastcomponentofthecurrent(latest)balloonobject(usingtheatperiodsoperationonthispastcomponentgiventhedenedperiodofthemovingballoonobject).Infact,thisactualmovementoftheobjectwhichisoftypeq(a)isusedtodeterminetheresultstomanyoperationssuchaslocations,trajectory,traversed,present,passes,no components,length,perimeter,area,distance,direction,turn,andvelocity. Assumingthatwehaveatypeindytime(a;b):=W(a;b)instantrepresentingastateofamovingballoonobjectatatimeinstantofthedynamictimedomain,thecurrentballoonobjectcanbeobtainedbyusingthenaloperationandthenapplyingthevalfunctiontoextracttheballoonobjectfromtheresultingnalstate.Similarly,theinitialstateisprovidedbythe 59

PAGE 60

Operationsonballoonobjectsandmovingballoonobjects. deftime,lifespanW(a;b)!periodsmW(a;b)!periodslocationsW(point;point)!pointmW(point;point)!pointtrajectoryW(point;point)!linemW(point;point)!linetraversedW(line;line)!regionmW(line;line)!regiontraversedW(line;region)!regionmW(line;region)!regiontraversedW(region;region)!regionmW(region;region)!region past projW(a;b)!q(a)N/Afuture projW(a;b)!j(b)N/AatinstantN/AmW(a;b)instant!indytime(a;b)instN/Aindytime(a;b)!instantvalN/Aindytime(a;b)!W(a;b)atperiodsN/AmW(a;b)periods!mW(a;b)initial,nalN/AmW(a;b)!indytime(a;b)presentW(a;b)instant!boolmW(a;b)instant!boolpresentW(a;b)periods!boolmW(a;b)periods!boolpassesW(a;b)g!boolmW(a;b)g!boolupdateN/AmW(a;b)W(a;b)!mW(a;b)updateN/AmW(a;b)intime(a)j(b)!mW(a;b)verify prediction atN/AmW(a;b)instant!boolhas bad predictionN/AmW(a;b)!boolaccuracy atN/AmW(a;b)instant!t(real)accuracy atN/AmW(a;b)instantinstant!real no componentsW(a;b)!t(int)mW(a;b)!t(int)lengthW(line;line)!t(real)mW(a;b)!t(real)areaW(region;region)!t(real)mW(region;region)!t(real)perimeterW(region;region)!t(real)mW(region;region)!t(real)distanceW(a;b)g!t(real)mW(a;b)g!t(real)distanceW(a1;b1)W(a2;b2)!t(real)mW(a1;b1)mW(a2;b2)!t(real)directionW(point;point)point!t(real)mW(point;point)point!t(real) turn,velocityW(point;point)!t(real)mW(point;point)!t(real) isemptyW(a;b)!boolmW(a;b)!boolW(a1;b1)W(a2;b2)!boolmW(a1;b1)mW(a2;b2)!boolmW(a1;b1)mW(a2;b2)instant!boolinteraction potentialW(a1;b1)W(a2;b2)!t(real)mW(a1;b1)mW(a2;b2)!t(real)mW(a1;b1)mW(a2;b2)instant!t(real)interaction possibleW(a1;b1)W(a2;b2)!boolmW(a1;b1)mW(a2;b2)!boolmW(a1;b1)mW(a2;b2)instant!bool

PAGE 61

Besidesthenormalsetofoperations,thespatiotemporalballoondatatypessupportaspecialsetofoperationsthatallowsonetoperformcertainanalysisabouttheaccuracyofpredictions.Thisisoneofthemainfeaturesofthisdatamodelwhichcanbeofparticularimportancetodomainexpertsinresearchanddevelopmentofpredictionmodels.Themovingballoondatamodelallowsonetoverifywhetherornot,theobject'sactualmovementstayswithinaspecicpredictionmadeinthepast.Thisisachievedbyusingtheverify prediction atoperation.Givenamovingballoonobjectandaspecictimeinstant,thisoperationintersectsthepredictionmadeatthisinstant,ifsuchapredictionexists,withasegmentoftheactualmovementoftheobjectwithintheperiodoftheprediction.Iftheresultingintersectionisthesameasthesegmentoftheactualmovement,thismeansthattheobject'smovementhadalwaysbeenwithintheconnementoftheprediction,andthuswesaythatthispredictionprovidesfullcoverageofthemovement.Otherwise,thepredictionprovidesonlypartialcoveragewhichcanbethoughtofasaninaccurateorabadprediction.Anexampleofapartialcoveragepredictionisthepredictionmadeatt2asshowninFigure 3-9 .Otherpredictionsmadeatt1,t3,andt4arefullcoveragepredictions.Todeterminewhetheramovingballoonobjecthasanybadprediction,weusetheoperationhas bad prediction.Thisoperationisusefulinpersistentqueriesformonitoringtheaccuracyofpredictionsastheobjectmovesintime.WewilldiscusspersistentqueriesandothertypesofspatiotemporalqueriesinSection 3.5 .Sofar,wehaveonlydiscussedwhetherapredictionprovidespartialorfullcoverage,butanevenmoreinterestingaspectisthequanticationofthe 61

PAGE 62

atoperationforthispurpose. Asfarasthepredicateoperationsareconcerned,theunaryoperationisemptyisobvious.Therelationshipbetweentheentiremovingballoonobjectsdoesnotmakemuchsenseandisdifculttondanypracticalmeaning.However,therelationshipbetweentheirballoonobjectcomponentssuchastheirnalballoonobjectsoffersinsightintothespatiotemporalrelationshipbetweentheirpastmovementsaswellastheirfuturepredictions.Thus,wedenethebinarypredicateoperationbetweentwomovingballoonobjectstohavethesamesemanticasthebinarypredicateoperationbetweentheirnalballoonobjects.Ifaninstantofthedynamictimedomainisspecied,theballoonobjectsatthisinstantwillbeusedtodeterminethespatiotemporalrelationship.Similarly,theinteraction potentialandinteraction possibleoperationsalsohavethesamesemanticasiftheyareappliedtothenalballoonobjectsorthecorrespondingballoonobjectsataspecieddynamictimeinstant.Therefore,onecanalwaysdetermineorverifythespatiotemporalrelationshipbetweenanystates(balloonobjects)ofmovingballoonobjects.Wediscussthistopicinmoredetailinthenextsection. Deningtherelationshipbetweenuncertainmovementsofmovingobjectsisaverycomplextask.Forinstance,considerapredictionofanairplanethatcrossesapredictionofahurricane.Itisnotnecessarythattheairplanewillalwayscrossthehurricane;itmayonlygetclosetoortouchtheactualhurricaneeventhoughitspredictioncrossesthehurricane'sprediction.However,thereisachancethattheairplanewouldcrossthehurricaneaswell.Thequanticationofthischanceoffutureinteractionofthetwoobjectsdependsonacomplexcalculationofthe 62

PAGE 63

3.4.1 ,wedenepredicatesbetweenballoonobjects(balloonpredicates)andexploretheirpropertiesbyfocusingonlyontherelationshipbetweentheirmovinggeometries.Hence,wecantreatthefuturepredictioncomponentj(b)assimplyt(b).Therefore,theballoondatatypeconstructorcanbewrittenforthispurposeasW(a;b)=q(a)t(b).Foraballoonobjectb=(bh;bp)2W(a;b),therstmovingobjectbh,calledthehistorypart,describesthehistoricalmovementofb.Thesecondmovingobjectbp,calledthepredictionpart,describesthemovinggeometryofapredictionoftheballoonobject.Forthetreatmentofthesecondtypeofinformation,weprovideourreasoningaboutthepotentialfutureinteractionbetweentheactualobjectsinSection 3.4.2 3.4.1.1 .WethendiscusshowaballoonpredicatecanbespeciedusingtraditionalSTPsinSection 3.4.1.2 .Finally,wedeterminethecanonicalcollectionofballoonpredicatesinSection 3.4.1.3 22 ].Sinceballoonobjectsareconstructedbasedonmovingobjects.ItisonlyconsistenttohaveballoonpredicatesbeconstructedfromSTPs.Withthisgoal,wecanbenetfromboththeoreticalandimplementationadvantagessuchthattheformalismandimplementationof 63

PAGE 64

3-11 showstherelationshipsbetweentraditionalmovingobjectdatamodelandballoonobjectdatamodel. Figure3-11. Relationsbetweentraditionalmovingobjectdatamodelandballoondatamodel. Thegeneralmethodweproposecharacterizesballoonpredicatesbasedontheideathatastwospatialobjectsmoveovertime,therelationshipbetweenthemmayalsochangeovertime.Byspecifyingthischangingrelationshipasapredicate,wecanaskatrue/falsequestionofwhetherornotsuchachangingrelationship(development)occurs.Thus,wecandeneaballoonpredicateasafunctionfromballoondatatypestoaBooleantype. Thechangeofrelationshipovertimebetweentwoballoonobjectsindicatesthatthereisasequenceofrelationshipsthatholdatdifferenttimes.Thissuggeststhataballoonpredicatecanalsobemodeledasadevelopment(sequence)ofspatialandspatiotemporalpredicates.Duetothefactthataballoonobjectconsistsofahistorypartfollowedbyapredictionpart,thespecicationofaballoonpredicatemusttakeintoaccounttherelationshipsbetweenbothparts.Todothis,letusrstexplorehowrelationshipsbetweenballoonobjectscanbemodeled.Eachballoonobjecthasadenedcurrentstateatitscurrentinstanttcwhichseparatesthehistorypartandthepredictionpart.BetweentwoballoonobjectsA=(Ah;Ap)andB=(Bh;Bp),A'scurrentinstantmayeitherbeearlier,atthesametime,orlaterthanB'scurrentinstant.Ineachofthesescenarios,certainsequencesofspatiotemporalrelationshipsarepossiblebetweenthepartsofAandB.Here,weareonlyinterestedintherelationshipbetweenapartofAandanotherpartofB

PAGE 65

3-12 illustratesallthepossiblerelatedpairsforeachscenariobetweenpartsofAandB. ABC Figure3-12. PossiblerelationshipsbetweenpartsofballoonobjectsAandB.A)WhenA'scurrentinstantisearlier.B)Atthesametime.C)LaterthanthatofB's. Althoughtherearefourpossibletypesofrelationshipsbetweenallpartsoftwoballoonobjects,itturnsoutthatinanycase,thereareatmostthreetypesofrelationshipsthatmayexistbetweenpartsofanytwoballoonobjects.Theseincludehistory/history,history/predictionorprediction/history,andprediction/predictionrelationships.Thehistory/predictionandprediction/historyrelationshipscannotexistatthesametimeduetothetemporalcompositionbetweenthehistoryandpredictionpartsofaballoonobject. ppobjectP=(Ph;Pp)andahurricanerepresentedbyaballoon probjectR=(Rh;Rp)(Figure 3-13 ).Inthepast,PhasbeendisjointfromR'spathaswellaspartofR'sprediction.However,thepredictedrouteofPcrossesthepredictedfutureofR. TherelationshipbetweenPandRcanbedescribedasadevelopmentorsequenceofuncertainspatialandspatiotemporalpredicateswhichholdatdifferenttimes,thatis, 65

PAGE 66

Futurecrossingsituationbetweenaballoon ppobjectPandaballoon probjectR. Asaresult,weareleftwithasequenceofthreeSTPseachappliedtodifferentcombinationpairsofpartsoftheballoonobjects.ThisexampleillustratesthatballoonpredicatescanbeappropriatelymodeledbysequencesofthreeSTPsbetweentherelatedpartsoftheobjects.Hence,wecanspecifyballoonpredicatesbasedonthetraditionalSTPsasfollows: 66

PAGE 67

WeconsideranSTPbetweentwomovingobjectstobemeaningfulifandonlyifthereexistsaperiodoftimeforwhichbothobjectsaredened.Hence,eachelementoftheabovesequenceismeaningfulonlyiftherelationshipbetweenthecorrespondingpartsismeaningful.Thepredicateoftherstelementinthesequencerepresentsaninteractionthatdidoccur.Therstandsecondalternativepredicatesofthesecondelementinthesequencerepresentsaninteractionthatmayhaveoccurred.ThesepredicateoptionsreecttheconstraintdescribedinSection 3.4.1.1 whichdictatesthatthetwopredicatescannotexistatthesametime.Thepredicateofthethirdelementinthesequencedenotesaninteractionthatprobablywilloccur.Thus,thesecondandthirdelementsindicateswhetherthereisapossibilitythataninteractionwilloccurwhereastherstelementtellsexactlywhetherornotaninteractionhasoccurred.Thecombinationsofmultipleoftheseinteractionsrepresentsamorecomplexrelationshipbetweenballoonobjects.Forexample,aninteractionthatdidoccurinthepastandprobablywilloccurinthefuturecanindicatethatthereisachancethatitprobablyalwaysoccurs.Table 3-4 showsanexampleofassigningameaningfulprextothenameforeachpairwisecombinationbetweentheseinteractions.Other Table3-4. Assigningnamingprexestopairwisecombinationsofinteractions. didmayhaveprobablywill did-mayhavebeenprobablyalwaysmaymayhavebeen-probablywillhaveprobablywillprobablyalwaysprobablywillhavecombinationswithlargernumberofinteractionsalsoexist,butitisusuallynotobvioustonametheserelationships.Herearesomeexamplesofballoonpredicates: cross:=Cross(t(a1);t(a2))probably will cross:=Crossu(t(b1);t(b2))may have been disjoint:=Disjoint(t(a1);t(a2)).Disjointu(t(a1);t(b2))probably always inside:=Inside(t(a1);t(a2)).Insideu(t(b1);t(b2))

PAGE 68

22 ].Anotherimportantfactorthataffectsthecanonicalcollectioniswhetherdependenciesexistbetweenthethreeelementsofthesequence.Morespecically,weneedtoinvestigatewhethertheexistenceofaSTPasanelementofthesequencecanpreventorrestrictanotherSTPfromrepresentinganotherelementofthesequence. Accordingto[ 22 ],thedependencybetweenSTPs,whicharepartsofacontinuousde-velopment,isexpressedusingadevelopmentgraph.ThisgraphdescribesallthepossibledevelopmentsofSTPswhichcorrespondtocontinuoustopologicalchangesofmovingobjects.Forexample,ifamovingpointisinsideamovingregion,itmustmeettheboundaryofthemovingregionbeforeitcanbedisjointfromtheregion.Thisconstraintreliesonthecontinuityofthemovingpoint.Ifweallowdiscontinuitysuchasaperiodofunknownmovementasinthecaseoftheballoonmodeltomodelourlimitedknowledgeofthemovement,thensuchconstraintcannotbeapplied.Althoughthehistorypartandthepredictionpartofaballoonobjectcannottemporallyoverlapeachother,itispossiblethattheycanbeseparatedbyaperiodofunknownmovement.Further,therecanalsobeperiodsofunknownmovementwithinthehistoryorthepredictionpartofaballoonobject.Duetothepossiblediscontinuityofballoonobjects,wecandeducethateachelementofthepredicatesequence,whichisaSTPbetweenthepartsoftwoballoonobjects,isindependentofeachother.Thus,allthecombinationsoftheSTPsinvolvedarepossible.ThismeansthatthecanonicalcollectionofballoonpredicatescanbedeterminedsolelybasedonthecanonicalcollectionsofthetraditionalSTPsinvolved.Asprovidedin[ 22 ],thereare13distincttemporalevolutionsbetweentwomovingpointswithoutrepetitions,28betweenamovingpointandamovingregion,and2,198betweentwomovingregions.Withthisinformation,wecandetermine,forexample,thenumberofdistinct,non-repetitiveballoonpredi-catesbetweentwoballoon ppobjectstobe13(13+13)13=4;394.Eachofthethreeparts 68

PAGE 69

Numberofballoonpredicatesbetweenballoon pp,balloon pr,andballoon rrobjects. ppballoon prballoon rr balloon pp4,39414,92443,904balloon pr14,9241,600,144136,996,944balloon rr43,904136,996,94421,237,972,784 ofthemultiplicationrepresentsthenumberofdistinctSTPsforeachelementofthesequence.Similarly,wecandeterminethenumberofballoonpredicatesbetweenalltypecombinationsofballoon pp,balloon pr,andballoon rrasshowninTable 3-5 .SincethenumbersofSTPsthatinvolvemovinglineobjectsarenotspeciedin[ 22 ],weomitthosecalculationsthatinvolveballoonobjectswhicharebasedonmovinglineobjects. Recallthatthefuturepredictionofaballoonobjectrepresentsthesetofallpotentialfuturepositionsorextentsofthemovingobject.Thismeansthatanon-interactionrelationshipwiththisfuturepredictioncomponentguaranteesanon-interactionrelationshipwiththeactualobjectinthefuture.However,aninteractionrelationshipwiththisfuturepredictioncomponentcanonlysignifyapotentialinteractionwiththeactualobjectinthefuture.Forexample,iftherouteofashipdoesnotintersectthefuturepredictionofahurricane,thismeansthatthereisnochancethattheshipwillencounterthehurricaneinthefuture.However,iftheroutecrossesthehurricane's 69

PAGE 70

Theproblemoftherstquestionissimilartotheproblemofinferringthesetofpotentialtopologicalrelationshipsbetweentwospatialobjectsgiventhetopologicalrelationshipbetweentheirboundingboxesasdescribedin[ 10 ].However,afuturepredictionisnotaboundingbox.Infact,atanyinstantofaprediction,amovingobjectcanbeanywherewithinitsprediction.Thisallowsplentyoffreedomforanypossiblecongurationoftheobjectwithinitsprediction,morespecically,withinanydivisiblepartoftheinteriorofitsprediction.Thismeansthatforaninteractionbetweentwopredictionswheretheinteriorsofthepredictionsintersect,allpossibletypesofinteractionarepossiblebetweentheactualobjects.Ontheotherhand,iftheinteriorsofthepredictionsdonotintersectbuttheirboundariesintersect,theactualmovingobjectscaneitherinteractbysharingtheirboundariesorbedisjoint.Finally,ifthepredictionsaredisjoint,thisimpliesthattheactualmovingobjectswillbedisjointaswell.Table 3-6 summarizestheseinteractioninferences. Table3-6. Inferringthetypesofinteractionbetweenactualobjectsfromthetypesofinteractionbetweentheirpredictions. PredictionInteractionsPossibleObjectInteractions interiorintersectionanyinteractionpossibleboundaryintersectionboundaryintersection,disjointdisjointdisjoint Inordertoanswerthesecondquestion,letusconsidereachtypeofpredictioninteractions.Fordisjointpredictions,itisguaranteedthattheobjectwillbedisjoint.Thusthechanceofinteractioninthiscaseis0.Forpredictionswithboundaryintersection,thechanceoftheactualobjectssharingtheirboundariesatthisintersectionisproportionaltotheproductofthepoint-setcondencevaluesoftheintersectionwithrespecttoeachobject.Thisquantityisaninnitelysmallpositivenumberapproaching0sincethedimensionoftheboundaryintersectionisalways 70

PAGE 71

potentialforthispurpose.Theresultofthisoperationisoftypet(real)indicatingthetemporallydependentvalueofthechancethattheobjectswillbeintheproximity(intersection)whereinteractionispossible.Todeterminewhetherthereisapossibilityofinteractionthusdistinguishingtheinteriorintersectionandboundaryintersectioncasesfromthedisjointcase,weusethepredicateinteraction possible.Byusingthecombinationoftheseoperationstogetherwiththebinarypredicateoperation,onecanobtaintheuncertaintyinformationoffutureinteractionsbetweenmovingobjects. 3.5.1 .ThenwediscusshowourdatamodelsupportsdifferenttypesofspatiotemporalqueriesinSection 3.5.2 confandpointset confoperations.The 71

PAGE 72

conf:C(a)pointinstant!realpointset conf:C(a)binstant!real Thereareatleasttwotypesofpredictionmodels,probabilitybasedmodelsandfuzzy-basedmodels,whichcanbeusedinconjunctionwithourMovingBalloonAlgebra.Therefore,inordertoposequeriesthatrequireretrievalsofpredictiondata,wemustrstindicatetheappropriatepredictionmodeltobeused.Forexample,assumingthatwehaveamovingballoonobjectoftypemW(point;region)representingashipmovinginanocean.Wecanposeaqueryonthisobjectasfollows: confoperationasitisappliedtothefuturepredictiondatatypej(region).Thisoperationinturninvokesthepointset confoperationforC(region)whichmustbeprovidedbythespeciedProbability Prediction Model. 60 ]).However,inspatiotemporaldatabases,thisisnotnecessarilyalwaysthecase.Spatiotemporaldatabasesmanagetemporallydependentobjectssuchasmovingobjectswhicharecontinuouslychanging.Thus,movementhistoriesandpredictionscanbestoredsuchthattheycanbeusedtoanswerqueriesatdifferentstatesof 72

PAGE 73

60 ],therearethreetypesofspatiotemporalqueries:instantaneous,continuous,andpersistentqueries.Thesamequerycanbeenteredasinstantaneous,continuous,orpersistent,producingdifferentresultsineachcase.Aninstantaneousqueryenteredattimetisevaluatedbasedonthecurrentdatabasestateattwhereasacontinuousqueryenteredattimetisasequenceofinstantaneousqueriesattimet0>tevaluatedateachtimet0.Ontheotherhand,apersistentqueryenteredattimetisasequenceofinstantaneousqueriesattimetthatareevaluatedateachtimet0>tforwhichthedatabaseisupdated.ThesequerytypescanbesupportedthroughtheuseofaFutureTemporalLogic(FTL)querylanguageasdescribedin[ 60 ].AllthatisneededtosupportthesequerytypesisanimplementationofanFTLqueryprocessorontopofourMovingBalloonAlgebra.ThisispossibleonlyifouralgebrasatisesallthedatamodelrequirementsofFTL.Itturnsoutthatthisisthecase.FTLrequiresadatamodelthatcanrepresentfuturedevelopmentsofmovingobjectsandthataccesstofuturestatesofmovingobjectsisavailable.OurMovingBalloonAlgebraprovidesthisfunctionalitythroughtheuseofafuturepredictiondatatype.Infact,thealgebraoffersmuchmoredatamodelsupportthanthatisneededbyFTLincludinghistoricalmovementsaswellasfutureuncertainty. Asanexample,considerascenarioinwhichtheU.S.coastguardrescueteamneedstoknowaboutallsmallshipswithlessthat100feetinlengthwhichwillinterceptthestormAlbertwithinthenext3hours.ThisquerycanbeenteredinFTLasfollows: within c(g)assertsthatthepredicategwillbesatisedwithinctimeunitsfromthecurrentinstant.Ifthequeryisenteredasaninstantaneousquery,theresultwillincludeallless-than-100-feetshipsthatwillbeinsidethestormwithin3hoursfromthecurrentinstant.However,ifthequeryisenteredasacontinuousquery,thisquerywillbeevaluatedcontinuouslyastimemoveson.Theresultwillalsoincludeothersmallshipsthatdonotsatisfythecriteria 73

PAGE 74

Besidesthesequerytypes,ourdatamodeldesignoffersmanynewfunctionalitiesincludingqueryingabouttheuncertaintyoffuturepredictionsaswellastheaccuracyofsuchpredictions.Forthepurposeofillustratethesefunctionalities,weuseasimpleSQLlikequerylanguage.Consideranapplicationscenarioofahurricaneprediction.Themovementoftheeyeofahurricanecanbemodeledasamovingballoonpointwithamovingregiontypeprediction,thatis,anmballoon probject.Fortheextentofthehurricaneforcewind,wemodelitsmovementusinganmballoon rrobject.Forcities,werepresenttheirgeographybyaregionobject.Hence,wehavethefollowingrelations: MovementoftheeyeofhurricaneKatrina. Assumingthattheserelationshavebeenpreviouslypopulatedwithallnecessarydata.Forthepurposeofourexample,assumealsothathurricaneKatrinaiscurrentlymakingitswayacrosstheGulfofMexico(Figure 3-14 ).WecanaskaqueryaboutthefuturepredictionofthehurricaneWhatareawillpotentiallybeaffectedbytheeyeofhurricaneKatrinaat12hoursfromnow? 74

PAGE 75

bad predictionoperationcanbeusedforthispurpose. 20 ]tosupporttextualspecicationsofspatiotemporalpredicates.STQLallowsustotextuallyformulatespatiotemporalqueriesthatinvolvetheuseofspatiotemporalpredicates.Toillustrate 75

PAGE 76

ppobjectsduetotheirwelldenedroutes.Wecancreatethecorrespondingrelationsfortheseobjects. crossbetweenmovingballoonobjects.Forthepurposeofthisexample,weassumethatthispredicatehasbeendenedbetweenmovingballoonobjectsoftypemballoon ppandmballoon rr. 23 21 ].Thisvisuallanguageallowsaconvenientandintuitivegraphicalspecicationofspatiotemporalpredicatesaswellasprovidessupportfortheformulationofspatiotemporalquerieswiththesepredicates. 76

PAGE 77

Inthischapter,wedescribehowwecandeneaniterepresentationforallthedatatypesoftheabstractmodeloftheMovingBalloonAlgebra.Themainideabehindthischapteristodetermineanitesetofinformation(thatis,denedbyadiscretetype)whichcanbeusedtorepresentaninnitesetofvalues(thatis,denedbyanabstracttype).Forexample,wecanrepresentasegmentwhichconsistsofaninnitesetofpointsbytwoendpointswhichisanitesetofinformation;yetwecaninterpolatethesetwoendpointstoobtainanypointsonthesegment.TodeneaniterepresentationfortheMovingBalloonAlgebra,wemustdeneadiscretetypeforeachabstracttypeofthealgebra.Indoingso,ourapproachistostartfromthebottom,mostbasiclevelofthealgebra'sdatatypehierarchyandworkourwaytothetop.Wedescribeaniterepresentationfornon-temporaldatatypesofthealgebrainSection 4.1 .Formovementovertime,wemakeuseofaconceptcalledslicedrepresentationtodeneaniterepresentationforbasicspatiotemporaldatatypesinSection 4.2 .Finally,weshowhowtheballoondatatypesandspatiotemporalballoondatatypescanbenitelyrepresentedinSection 4.3 .Theworkinthischapterhasbeenincludedinoneofourtechnicalreports[ 52 ]inpreparationforajournalsubmission. 77

PAGE 78

4.1 4.2 disjoint(rightdisjoint),disjoint,r adjacent(rightadjacent),andadjacentinDenition 4.3 disjoint(i;j),ri
PAGE 79

4.4 ,anitesetoftimeintervals(anintervalset)suchthatithasauniqueandminimalrepresentation. setisdenedas:interval set=fUintervalj(i;j2U^i6=j))disjoint(i;j)^:adjacent(i;j)g 59 ],aniterepresentationforspatialdatatypessuchaspoint,line,andregionhavebeenstudiedinourimplementationoftopologicalpredicatesbetweencomplexspatialobjects[ 54 51 ].Here,wegiveanoverviewofthisrepresentation.Recallthatthetypepointrepresentscomplexpoints(thatis,collectionsofsinglepoints).Hence,werstdenehowasinglepoint,representedbythetypepoi,canbedescribed.Intwo-dimensionalEuclideanspace,asinglepointcanbedescribedbyapairofcoordinates(x;y)asshowninDenition 4.5 4.6 ,avalueofthetypepointissimplydeneasasetofsinglepoints. 32 ]denesalineasasetofcurvesintheplane.Wecandiscretelyrepresentcurvesbypolylines 79

PAGE 80

4.7 showshowthetypesegrepresentingalinesegmentcanbediscretelydenedbyitstwoendpoints. 4.8 4-1 showsanexampleofalineobjectoftheabstractmodelanditscorrespondingdiscreterepresentation. AB Figure4-1. Representationsofalineobject.A)Intheabstractmodel.B)Inthediscretemodel. Aregionobjectcanberepresenteddiscretelyasacollectionofpolygonalfaceswithpolygonalholes.Theyaredenedbasedontheconceptofcycles.AcycleisasimplepolygonandisdenedinDenition 4.9 80

PAGE 81

intersect(s;t)^:touch(s;t)(iii)8p2points(S):card(p;S)=2(iv)9hs0;:::;sn1i:fs0;:::;sn1g=S^(8i2f0;:::;n1g:meet(si;s(i+1)modn))g intersectcheckswhethertwosegmentsintersectintheirinterior.Twosegmentstouchifanendpointofasegmentliesintheinterioroftheothersegment.Thefunctionpoints(S)returnsalltheendpointsofthesegmentsinS,thuspoints(S)=fp2poij9s2S:s=(p;q)_s=(q;p)g.ThenumberofoccurrenceofanendpointpinSisgivenbythefunctioncard(p;S)=jfs2Sjs=(p;q)_s=(q;p)gj.Therefore,acycleis(i)acollectionof3ormoresegmentswhere(ii)nosegmentsintersectortouchoneanother,(iii)eachendpointoccursinexactlytwosegments,and(iv)allthesegmentstogetherformasinglecycle. Usingthedenitionofcycle,wedene,inDenition 4.10 ,afaceasapairconsistingofanoutercycleandasetof0ormoreholecycles. inside(h;c)(iii)8h1;h22H:h16=h2)edgedisjoint(h1;h2)(iv)anycyclethatcanbeformedfromthesegmentsofcorHiseithercoroneofthecyclesofHg 81

PAGE 82

AregionisthendenedinDenition 4.11 asasetofedge-disjointfaces. disjoint(f1;f2)g 4-2 showsanexampleofaregionobjectinbothabstractanddiscreterepresentation. AB Figure4-2. Representationsofaregionobject.A)Intheabstractmodel.B)Inthediscretemodel. 25 ].Theideaistorepresentamovementofanobjectbyasequenceofsimplemovementscalledslicesortemporalunits.Atemporalunitofamovingdatatypeaisamaximaltimeintervalwherevaluestakenbyaninstantofacanbedescribedbyasimplefunction.Thus,atemporalunitrepresentstheevolutionofavaluevofsometypeainagiventimeintervaliwhilemaintainingtype-specicconstraintsduringsuchevolution.Figure 4-3 Ashowsatemporalunitofamovingpointobjectconsistingoftwopointmovingindependently.Eachtemporalunitisapair(i;v),whereiiscalledtheunitintervalandviscalledtheunit

PAGE 83

4.12 ,temporalunitsaredescribedasagenericconcepttoformulatethedenitionoftheslicedrepresentation.Theirspecializationtovariousdatatypesisprovidedinthenextsubsectionswherewedeneunittypessuchasureal,upoi,upoint,uline,anduregion. Figure4-3. Adiscreterepresentationofamovingpointobject.A)Atemporalunit.B)Aslicedrepresentation. Theslicedrepresentationisprovidedbyamappingtypeconstructorwhichrepresentsamovingobjectasasequenceoftemporalunits.Itstypedependsonthetypeofthetemporalunits(thatis,theunittype).Figure 4-3 Billustratesaslicerepresentationwiththreetemporalunitsorslicesforamovingpointobject.WedenethemappingtypeconstructorinDenition 4.13 disjoint(ij;ij+1)(iii)8j2f1;:::;n1g:adjacent(ij;ij+1))vj6=vj+1g disjointwithrespecttothenext 83

PAGE 84

Bydeningthismappingtypeconstructor,wecanconstructdiscretespatiotemporaldatatypesforallofourabstracttypes.Forinstance,assumingthatwehavetemporalunittypesupoint,uline,anduregion(whichwewilldenelaterinthenextsection),wecanconstructdiscretespatiotemporaldatatypesmapping(upoint),mapping(uline),andmapping(uregion)torepresentmovingpoint,movingline,andmovingregionobjectsrespectively.Althoughthisissomewhatstraightforward,wemustbecarefultoensurethateachtemporalunitdescribesavaliddevelopmentofamovingobject. Sincetemporalunitsdescribecertainsimplefunctionsoftime,wedene,inDenition 4.14 ,agenericfunctionioneachunittypetoevaluatetheunitfunctionatagiventimeinstant.Thisfunctionisessentialfordeningsemanticrequirementsofeachunittypeaswewillseelater. 4.15 thatproducesatemporalunitforanon-temporaltypea. 84

PAGE 85

Fortherealtype,weintroduceaunittypeurealinDenition 4.16 fortherepresentationofmovingrealnumberswithinatemporalunit.Tobalancethetrade-offbetweentheexpressivenessandsimplicityoftherepresentation,thesimplefunctionforthisunittypeischosentobeeitherapolynomialofdegreelessthanorequaltotwoorasquarerootofsuchapolynomial.Suchsquarerootfunctionsarerequiredtoexpressthetime-dependentdistancefunctionsinEuclideanmetric.Thus,withthischoice,onecanimplementthetemporallyliftedversionsofthesize,perimeter,anddistanceoperations. 85

PAGE 86

Inordertodescribethepermittedbehaviorofmovingspatialobjectswithinatemporalunit,weneedtospecifyhowtype-specicconstraintsaresatisedduringsuchunit.Werequirethatconstraintsaresatisedonlyduringtherespectiveopenintervalofaunitintervalsincetheendpointsofaunitintervalindicateachangeinthedescriptionofthemovement.Forexample,acollapseofcomponentsofamovingobjectcanoccurattheendpointsoftheunitinterval.Similarly,abirthofanewcomponentcanalsooccuratthebeginningofaunitinterval.Thisiscompletelyacceptablesinceoneofthereasonsfortheintroductionoftheslicedrepresentationistohavesimpleandcontinuousdescriptionofthemovingvaluewithineachunitintervalandtolimitdiscontinuitiesinthedescriptiontoanitesetofinstants.Thus,theslicedrepresentationconceptalsoallowsonetomodelappearancesanddisappearancesofobjectcomponentsatendpointsofintervals.Thismeansthattheslicedrepresentationcanalsorepresenteventpointswhichareinstanceswhenthetemporalfunctionofamovingobjectisevent-f-discontinuousasspeciedintheabstractmodel.Inthissection,wedenetemporalunittypesupoint,uline,anduregion.Theyareusedtoconstructthespatiotemporalmappingsmapping(upoint),mapping(uline),andmapping(uregion)whichdescribeaniterepresentationforthebasicspatiotemporaldatatypesmpoint,mline,andmregionrespectively. 86

PAGE 87

4.17 4.18 4-3 A.Foraunitpoint(i;M),anevaluationattimetwithintheintervaliisgivenby:i(M;t)=[m2Mfi(m;t)g 87

PAGE 88

Beforewecandeneuline,wedeneasetMSegasthesetofallpairsofcoplanarlinesproducedbyapairofmovingsinglepointsin3Dspace,whichwillbeusedtorepresentmovingsegments.MSeg=f(p;q)jp;q2MPoi;p6=q;piscoplanarwithqg 4.19 isbasedonasetofmovingsegmentswiththeaboverestrictionandwhichneveroverlapsatanyinstantwithintherespectiveopeninterval. 4-4 Ashowsanexampleofavalidulineobject. Sinceidistributesthroughsetsandtuples,wecanusei(M;t)whichrepresentsthevalueofaunitlineatatimeinstantttodenethestructuralconstraintthatrequiresthisvaluetobeavalidlinecomposedofsegments.Forinstance,condition(i)requiresthat,ateachtimeinstanttofthe 88

PAGE 89

Figure4-4. Representingamovinglineobject.A)Aulinevalue.B)Adiscreterepresentationofamovinglineobject. openinterval,wecanobtainasegmentfromeachofthemovingsegmentsofM.8t;l
PAGE 90

4-5 .Followingthesamestructuredapproachfordeningtheregiondatatypes,wecandenea Figure4-5. Exampleofauregionvalue. 90

PAGE 91

4.20 4.3.1 aswellasthespatiotemporalballoondatatypesinSection 4.3.2 91

PAGE 92

Forthefuturepredictiondatatypes,onlythegeometryaspectoffuturepredictionsisrelevantheresincetherepresentationofthecondencedistributionaspectisdomain-specicandcanbeassumedtobegivenbypredictionmodels.Thegeometryaspectofthefuturepredictiondatatypesisdenedusingthebasicspatiotemporaldatatypes.Hence,theirdiscreterepresentationisthesame,thatis,theycanalsobediscretelyrepresentedusingtheslicedrepresentationconcept. Aballoondatatypewhichconsistsofbothhistoricalmovementandfuturepredictioninformationcanthenbedescribedasaspatiotemporalmappingofboththehistoricalpartandthepredictedpartsuchthatthemappingofthehistoricalpartprecedesthatofthepredictedpart.Inotherwords,thelastunitintervalofthehistoricalpartmustber disjointwiththerstunitintervalofthepredictedpart.ThisspatiotemporalmappingforaballoonobjectisformallydenedinDenition 4.21 disjoint(in;in+1)g 92

PAGE 93

Asmentionedintheabstractconcept,thedevelopmentofthemovementhistoryisahistoricalaccumulationphenomenonwhichmeansthat,asanobjectmovesorevolvesovertime,newmovementinformationisappendedtotheexistingmovementhistory.Thus,themovementhistoryateachtimeinstanttinthepastisapartofthecurrenthistory.Thatis,itisthehistorystartingfromthebeginninginstantuptotheinstantt.Therefore,itissufcienttorepresentthedevelopmentofmovementhistorybythelatestknownmovementhistoryandprovidinganappropriate,separateinstantiationfunctioniha(asopposedtoiawhichretrievethepositionorextentvalue)toobtainthemovementhistoryatanytimeinstanttofthedevelopment.Letuabeaunittypeofaspatialtypea.Thedevelopmentofmovementhistoryisdiscretelyrepresentedasaslicedrepresentationofaunittypeuawithanihafunctiondenedas:iha=mapping(ua)instant!mapping(ua) Thesecondpartofthespatiotemporalballoondatatypesisthetemporaldevelopmentoffutureprediction.Sinceeachfuturepredictionisprovidedbyapredictionmodelwhichisaconceptoutsidethecontrolofthealgebra,wecannotmakeanyassumptiononthecontinuityaspectbetweendifferentpredictions.However,wecansafelyassumethateachpredictionisdiscretelymadewithrespecttoaspecictimeinstantandprovidedbyapredictionmodeleither 93

PAGE 94

4.22 formallydescribesaniterepresentationofadevelopmentofprediction. Bydiscretelyrepresentingthedevelopmentofthemovementhistoryandthefuturepredic-tion,weeffectivelyobtainarepresentationforamovingballoonobject,asdenedinDeni-tion 4.23 ,whichisacombinationofthetwo. 94

PAGE 95

HavingdeneddiscretedatatypesforeachoftheabstractdatatypesofourMovingBalloonAlgebra,wecannowusethisdiscretemodelasaspecicationtodevelopimplementabledatastructuresforsupportingalgorithmicdesignandimplementationofoperations. 95

PAGE 96

Intheimplementationmodel,weareinterestedinhowwecanimplementtheniterep-resentationsetforthinthediscretemodel.Thus,weareinterestedindeningdatastructuresforeachdatatypesofthealgebraaswellasalgorithmsforoperationsandpredicates.Sincetheimplementationofspatiotemporaldatatypesandspatiotemporalpredicatesrequirestheuseofspatialdatatypesandtopologicalpredicates,werstpresentourdatastructuresforspatialdatatypesandspatiotemporaldatatypes(Section 5.1 ).Then,wepresentourtopologicalpredicateimplementationincludingthealgorithmsfordeterminingthetopologicalrelationshipbetweentwospatialobjects 5.2 ).Thesealgorithmsarethenusedtosupporttheimplementationofspatiotemporalpredicatesbetweenmovingobjects(Section 5.3 )whichinturnisthebasisforimplementingballoonpredicates(Section 5.4 ).Sincethealgebraistobemadeavailableforuseinadatabasesystem,wealsodescribeourmechanismforintegratingthealgebraintoaDBMS(Section 5.5 ).Finally,weprovideacasestudydescribinganapplicationofouralgebraintheeldofhurricaneresearch(Section 5.6 ). 51 54 ]. 96

PAGE 97

Second,ourspatialandspatiotemporaldatatypesareset-valued.Thisrequiresthatauniqueorderisdenedonthesetdomainsandtostoreelementsinthearrayinthatorder.Twospatialorspatiotemporalvalues,respectively,areequaliftheirarrayrepresentationsareequal.Thisenablesefcientcomparisons. Third,thedatastructuredesignisalsoaffectedbytherequirementofthealgorithms.Forinstance,inspatialdatamodel,algorithmsbasedontheplanesweepparadigmareessentialforefcientimplementationoftopologicalpredicatesandsetoperations.Thesealgorithmsrequiresadatastructurewithdatapointsorsegmentsinlexicographicalorder.WedescribedatastructuresforspatialdatatypesinSection 5.1.2 .Inspatiotemporaldatamodel,thealgorithmfortheatinstantoperationisthemostfundamental,anditisthefoundationforimplementingmanyotheroperations.Hence,itisimportanttoconsidertheefciencyofthisoperationinthedesignofthedatastructures.Forthisreason,thedatastructuresforspatiotemporaldatatypesaredesignedwiththetemporalunitasthemajorordersuchthatasearchinthetemporaldomaincanbedoneefciently.WedescribethisaspectinmoredetailinSection 5.1.3 97

PAGE 98

Thetypeseg2Dincludesallstraightsegmentsboundedbytwoendpoints.Thatis 98

PAGE 99

Atthenexthigherlevel,weassumethegeometriccomponentdatatypehalfsegment2Dthatintroduceshalfsegmentsasthebasicimplementationcomponentsofobjectsofthespatialdatatypesline2Dandregion2D.Ahalfsegment,whichisstoredinarecord,isahybridbetweenapointandasegment.Thatis,ithasfeaturesofbothgeometricstructures;eachfeaturecanbeinquiredondemand.Wedenethesetofallhalfsegmentsasthecomponentdatatype Therepresentationofline2Dandregion2Dobjectsrequiresanorderrelationonhalfseg-ments.Fortwodistincthalfsegmentsh1andh2withacommonendpointp,letabetheenclosedanglesuchthat0
PAGE 100

Examplesoftheorderrelationonhalfsegments:h1


PAGE 101

Thespatialdatatypeline2Disdenedasline2D=fhh1;:::;h2nij(i)n2N0(ii)81i2n:hi2halfsegment2D(iii)8hi=(si;di)2fh1;:::;h2ng9hj=(sj;dj)2fh1;:::;h2ng;1i
PAGE 102

Asanexample,Figure 5-2 showsaline2DobjectL(withtwocomponents(blocks))andaregion2DobjectR(withasinglefacecontainingahole).Bothobjectsareannotatedwithsegmentnamessi.WedeterminethehalfsegmentsequencesofLandRandlethli=(si;true)andhri=(si;false)denotethelefthalfsegmentandrighthalfsegmentofasegmentsirespectively.ForLweobtaintheorderedhalfsegmentsequence 102

PAGE 103

Aline2DobjectLandaregion2DobjectR 5-1 ,wetakeawayallsubcasesofcase1exceptfortheupperleftsubcaseaswellascase3,therestrictedorderrelationcanalreadybeleveragedforcomplexlinesandcomplexregions.Incasethatallspatialobjectsofanapplicationspacearedenedoverthesamerealm 30 57 ],therestrictedorderrelationcanalsobeappliedforaparalleltraversalofthesequencesoftwo(ormore)realm-basedline2Dorregion2Dobjects.Onlyinthegeneralcaseofintersectingspatialobjects,thefullorderrelationonhalfsegmentsisneededforaparalleltraversaloftheobjects'halfsegmentsequences. 4.2 and 4.3 offersaprecisebasisforthedesignofdatastructureswhichformthebasisfordescribingthealgorithmicschemeemployedforspatiotemporalpredicateevaluations(Section 5.3 ).Infact,thediscretemodelisahighlevelspecicationofsuchdatastructures.Inthissection,we 103

PAGE 104

pbb;hup1;:::;upnii=hn;hti1;:::;tiki;((xl;yl);(xu;yu));h(unit pbb1;c1;i1;v1);:::;(unit pbbn;cn;in;vn)ii Attheendofmp,itsunitsequenceisstoredinasubarraycontainingnunitpointsupiwith1in.Eachunitconsistsoffourcomponents.Therstcomponentcontainstheunitprojectionboundingbox(byanalogywiththeobjectprojectionboundingbox).Thesecondcomponentstoresthenumberofmovingunitsinglepointintheunit.Thethirdcomponentistheunitintervalik=(lk;rk;lck;rck)with1knwherelk;rk2instantdenotetheleft(start)andright(end)timeinstantofikandthetwoBooleanagslckandrckindicatewhetherikisleft-closedand/orright-closed.Werequirethatik
PAGE 105

4.2.2.1 ).Foruniquenessandminimalityofrepresentationwerequireinadditionthat adjacent(ik;il))(vk6=vl) Therepresentationofamovinglineoramovingregionisinprinciplethesameasformovingpoints.Butduetothehighercomplexityofthesetypes,theunitfunctionofaulineorauregionvalueismorecomplex.Itessentiallydescribesalineoraregionwhoseverticesmovelinearly(i.e.,whosevertexpositionsarelinearfunctionsoftime),suchthatforallinstantsintheunitintervaltheevaluationofthevertexfunctionsyieldsacorrectlineorregionvaluerespectively. Ingeneral,aulineunitconsistsofasequenceofmovingunitsegmentswhereeachmovingunitsegmentisanelementofthesetMSegdenedinSection 4.2.2.2 .Amovingunitsegmentms=(u;v)withu;v2MPoiisapairofmovingunitsinglepointsthatarecoplanarinthe3Dspace.Consequently,amovingunitsegmentthatisrestrictedtoatimeintervalformsatrapezium,or,inthedegeneratecase,atriangleinthe3Dspace.Rotationsofsegmentsarenotpermittedsincethisleadstocurvilinearlateralsurfaces(viewedfromthe3Dperspective)whosecomputationaltreatmentisratherdifcult(seeFigure 4-4 andSection 4.2.2.2 ).Thedatastructureofamovinglineml2mapping(uline)andamovingregionmr2mapping(uregion)cannowbedescribedasfollows: pbb;hul1;:::;ulnii=hn;hti1;:::;tiki;((xl;yl);(xu;yu));h(unit pbb1;c1;i1;v1);:::;(unit pbbn;cn;in;vn)ii pbb;hur1;:::;urnii=hn;hti1;:::;tiki;((xl;yl);(xu;yu));h(unit pbb1;c1;i1;v1);:::;(unit pbbn;cn;in;vn)ii pbb,tij,unit pbbl,andilhavethesamemeaningandpropertiesasformovingpoints.Inparticular,wehavethesameorderonunitintervalsasformovingpoints,and 105

PAGE 106

41 ].Thiseliminatestheneedtorepresentintermediatestructuressuchasblocksforalineobjectorfaceandholecyclesforaregionobjectsincethesestructuresaregenerallyusedforvalidationpurposes,andiftheyareneeded,theycanbecomputedfromthesetofsegmentsbyusingasimilaravorofourvalidationalgorithms.AnotherimportantdifferencebetweentherepresentationofamovinglineandthatofamovingregionisthatamovingunitsegmentmskinthecaseofamovingregioncontainsanadditionalinformationiawhichisaBooleanvalueindicatingwhethertheinterioroftheregionisabovethesegmentatalltimeinstantsoftheunitinterval.Thisallowsonetoderivearegiondatastructurerepresentationatanytimeinstantoftheunitintervalsincesuchadatastructurearecomposedofattributedhalfsegments(seeSection 5.1.2 )whichcanbeconstructedbyusingthisinformation. 106

PAGE 107

pbb;h;pi pbbrepresentthecombined/mergedlifespanandprojectionboundingboxrespectivelyofboththehistoricalmovementandthepredictedmovementoftheballoonobject.Thecomponenthrepresentsthehistoricalmovementwhichisofthetypemapping(ua)andhasadatastructureofthecorrespondingbasicspatiotemporaldatatype.Similarly,thecomponentpdescribesthepredictedmovementoftypemapping(ub)andalsohasadatastructureofthecorrespondingbasicspatiotemporaldatatype.Asspeciedinthediscretemodel,arestrictionbetweenhandpmustbepreservedsuchthatthelifespanofhmustprecedethatofp. Foramovingballoonobjectmb2mballoon(ua;ub),itsdatastructureisslightlymorecomplexthanthatofaballoonobjectsincenowweneedtorepresentasequenceofpredictedmovements.Thedatastructureofmbcanbedescribedasfollows: pbb;h;h(t1;p1);:::;(tn;pn)ii pbbrepresentthecombined/mergedlifespanandprojectionboundingboxrespectivelyofthehistoricalmovementandallofthepredictedmovements.Thecomponenthrepresentsthedevelopmentofthehistoricalmovement.Sinceweassumethatthisdevelopmentobeysthehistoricalaccumulationphenomenonstatedintheabstractanddiscretemodels,wecanrepresentthisdevelopmentbyusingthedatastructureofacorrespondingbasicspatiotemporaldatatypeandprovideaspecialtemporalinstantiationfunctioniha(Section 4.3.2 )toobtainanyhistoricalmovementknowledgeatanyinstantinthepast.Inthelastcomponent,eachofthetuple(tk;pk)with0knrepresentsapredictedmovementpkproducedattimetk.Notethatthepredictedmovementsareoptional.Thisisthecasewhenk=0forwhichthesequenceofpredictedmovementsisempty.Insuchcase,themovingballoonobjectisnothingmorethanabasicmovingobject.Hence,amovingballoonobjectcanbeclassiedasahighlevel,generalized 107

PAGE 108

Ourgoalinthissectionistodevelopandpresentefcientimplementationstrategiesfortopologicalpredicatesbetweenallcombinationsofthethreecomplexspatialdatatypespoint2D,line2D,andregion2D.Wedistinguishtwophasesofpredicateexecution:Inanexplorationphase(Section 5.2.2 ),aplanesweepscansagivencongurationoftwospatialobjects,detectsalltopologicalevents(likeintersections),andrecordstheminso-calledtopologicalfeaturevectors.Thesevectorsserveasinputfortheevaluationphase(Section 5.2.3 )whichanalyzesthesetopologicaldataanddeterminestheBooleanresultofatopologicalpredicate(query1)orthekindoftopologicalpredicate(query2).Tospeeduptheevaluationprocess,wealsopresent,inSection 5.2.4 ,twone-tunedandoptimizedapproachesofmatrixthinningforpredicatevericationandminimumcostdecisiontreesforpredicatedetermination.Thetwo-phaseapproachprovidesadirectandsoundinteractionandsynergybetweenconceptualwork(9-intersectionmodel)andimplementation(algorithmicdesign).InterfacemethodsforaccessingourimplementationofthisconceptisgiveninSection 5.2.5 .WebeginbypresentingsomebasicalgorithmicconceptsneededfortheexplorationalgorithmsinSection 5.2.1 108

PAGE 109

5.2.2 .Theseconceptsaretheparallelobjecttraversal(Sec-tion 5.2.1.1 ),overlapnumbers(Section 5.2.1.2 ),andtheplanesweepparadigm(Section 5.2.1.3 ).Parallelobjecttraversalandoverlapnumbersareemployedduringaplanesweep.Wewillnotdescribethesethreeconceptsinfulldetailhere,sincetheyarewellknownmethodsinCompu-tationalGeometry[ 3 ]andspatialdatabases[ 33 ].However,wewillfocusonthespecialtiesoftheseconceptsinoursetting,includingsomeimprovementscomparedtostandardplanesweepimplementations.Thesecompriseasmoothlyintegratedhandlingofgeneral(thatis,intersecting)andrealm-based(thatis,non-intersecting)pairsofspatialobjects.Anobjectiveofthissectionisalsotointroduceanumberofauxiliaryoperationsandpredicatesthatmakethedescriptionoftheexplorationalgorithmslatermucheasierandmorecomprehensible. Iftheoperandobjectshavealreadybeenintersectedwitheachother,likeintherealmcase[ 30 ],theparallelobjecttraversalhasonlytooperateontwostaticpointorhalfsegmentsequences.Butinthegeneralcase,intersectionsbetweenbothobjectscanexistandaredetected 109

PAGE 110

5.2.1.3 Tosimplifythedescriptionofthisparallelscan,twooperationsareprovided.LetO12aandO22bwitha;b2fpoint2D;line2D;region2Dg.Theoperationselect rst(O1,O2,object,status)selectstherstpointorhalfsegmentofeachoftheoperandobjectsO1andO2andpositionsalogicalpointeronbothofthem.Theparameterobjectwithapossiblevalueoutofthesetfnone,rst,second,bothgindicateswhichofthetwoobjectrepresentationscontainsthesmallerpointorhalfsegment.Ifthevalueofobjectisnone,nopointorhalfsegmentisselected,sinceO1andO2areempty.Ifthevalueisrst(second),thesmallerpointorhalfsegmentbelongstoO1(O2).Ifitisboth,therstpointorhalfsegmentofO1andO2areidentical.Theparameterstatuswithapossiblevalueoutofthesetfend of none,end of rst,end of second,end of bothgdescribesthestateofbothobjectrepresentations.Ifthevalueofstatusisend of none,bothobjectsstillhavepointsorhalfsegments.Ifitisend of rst(end of second),O1(O2)isexhausted.Ifitisend of both,bothobjectrepresentationsareexhausted. Theoperationselect next(O1,O2,object,status),whichhasthesameparametersasselect rst,searchesforthenextsmallestpointorhalfsegmentofO1andO2.Twopoints(halfsegments)arecomparedwithrespecttothelexicographic(halfsegment)order.Forthecomparisonbetweenapointandahalfsegment,thedominatingpointofthehalfsegmentandhencethelexicographicorderisused.Ifbeforethisoperationobjectwasequaltoboth,select nextmovesforwardthelogicalpointersofbothsequences;otherwise,ifobjectwasequal 110

PAGE 111

5-3 givesanexample. 3 55 ]isawellknownalgorithmicschemeinComputationalGeometry.Itscentralideaistoreduceatwo-dimensionalgeometricproblemtoasimplerone-dimensionalgeometricproblem.Averticalsweeplinetraversingtheplanefromlefttoright 111

PAGE 112

Exampleofthesegmentclassicationoftworegion2Dobjects stopsatspecialeventpointswhicharestoredinaqueuecalledeventpointschedule.Theeventpointschedulemustallowonetoinsertneweventpointsdiscoveredduringprocessing;thesearenormallytheinitiallyunknownintersectionsoflinesegments.Thestateoftheintersectionofthesweeplinewiththegeometricstructurebeingsweptatthecurrentsweeplinepositionisrecordedinverticalorderinadatastructurecalledsweeplinestatus.Wheneverthesweeplinereachesaneventpoint,thesweeplinestatusisupdated.Eventpointswhicharepassedbythesweeplineareremovedfromtheeventpointschedule.Notethat,ingeneral,anefcientandfullydynamicdatastructureisneededtorepresenttheeventpointscheduleandthat,inmanyplane-sweepalgorithms,aninitialsortingstepisneededtoproducethesequenceofeventpointsin(x;y)-lexicographicalorder. Inourcase,theeventpointsareeitherthepointsofthestaticpointsequencesofpoint2Dobjectsorthe(attributed)halfsegmentsofthestatichalfsegmentsequencesofline2D(region2D)objects.Thisespeciallyholdsandissufcientfortherealmcase.Inaddition,inthegeneralcase,neweventpointsaredeterminedduringtheplanesweepasintersectionsoflinesegments;theyarestoredaspointsorhalfsegmentsinthedynamicsequencepartsoftheoperandobjectsandareneededonlytemporarilyfortheplanesweep.AswehaveseeninSection 5.2.1.1 ,theconceptsofpointorder,halfsegmentorder,andparallelobjecttraversalavoidanexpensiveinitialsortingatthebeginningoftheplanesweep.Weusetheoperationget eventtoprovidetheelementtowhichthelogicalpointerofapointorhalfsegmentsequenceiscurrentlypointing.TheBooleanpredicatelook aheadtestswhetherthedominatingpointsofagivenhalfsegmentandthenexthalfsegmentafterthelogicalpointerofagivenhalfsegmentsequenceareequal. 112

PAGE 113

sweepcreatesanew,emptysweeplinestatus.Ifaleft(right)halfsegmentofaline2Dorregion2Dobjectisreachedduringaplane-sweep,theoperationadd left(del right)stores(removes)itssegmentcomponentinto(from)thesegmentsequenceofthesweeplinestatus.Thepredicatecoincidentcheckswhetherthejustinsertedsegmentpartiallycoincideswithasegmentoftheotherobjectinthesweeplinestatus.Theoperationset attr(get attr)sets(gets)anattributefor(from)asegmentinthesweeplinestatus.ThisattributecanbeeitheraBooleanvalueindicatingwhethertheinterioroftheregionisabovethesegmentornot(theInteriorAboveag),oritcanbeanassignedsegmentclassication.Theoperationget pred attryieldstheattributefromthepredecessorofasegmentinthesweeplinestatus.Theoperationpred exists(common point exists)checkswhetherforasegmentinthesweeplinestatusapredecessoraccordingtotheverticaly-order(aneighboredsegmentoftheotherobjectwithacommonendpoint)exists.Theoperationpred of psearchesthenearestsegmentbelowagivenpointinthesweeplinestatus.Thepredicatecurrent existstestswhethersuchasegmentexists.Thepredicatepoi on seg(poi in seg)checkswhetheragivenpointlieson(in)anysegmentofthesweeplinestatus. Figure5-4. Changingoverlapnumbersafteranintersection. Intersectionsoflinesegmentsstemmingfromtwolines2Dobjects,tworegion2Dobjects,oraline2Dobjectandaregion2Dobjectareofspecialinterest,sincetheyindicatetopologicalchanges.Iftwosegmentsoftwoline2Dobjectsintersect,thiscan,forexample,indicateaproperintersection,orameetingsituationbetweenbothsegments,oranoverlappingofbothsegments.Ifasegmentofaline2Dobjectintersectsasegmentofaregion2Dobject,theformersegmentcan,forexample,entertheregion,leavetheregion,oroverlapwiththelattersegment.Overlapnumberscanbeemployedheretodetermineenteringandleavingsituations.Ifsegments 113

PAGE 114

5.2.1.2 wehavetacitlyassumedthatanytwosegmentsfrombothregion2Dobjectsareeitherdisjoint,orequal,ormeetsolelyinacommonendpoint.Onlyifthesetopologicalconstraintsaresatised,wecanusetheconceptsofoverlapnumbersandsegmentclassesforaplanesweep.Butthegeneralcaseinparticularallowsintersections.Figure 5-4 showstheproblemofsegmentclassesfortwointersectingsegments.Thesegmentclassofs1[s2]leftoftheintersectionpointis(0=1)[(1=2)].Thesegmentclassofs1[s2]rightoftheintersectionpointis(1=2)[(0=1)].Thatis,aftertheintersectionpoint,seenfromlefttoright,s1ands2exchangetheirsegmentclasses.Thereasonisthatthetopologyofbothsegmentschanges.Whereas,totheleftoftheintersection,s1(s2)isoutside(inside)theregiontowhichs2(s1)belongs,totherightoftheintersection,s1(s2)isinside(outside)theregiontowhichs2(s1)belongs. Inordertobeabletomaketheneededtopologicaldetectionsandtoenabletheuseofoverlapnumbersfortwogeneralregions,incasethattwosegmentsfromtwodifferentregionsintersect,partiallycoincide,ortoucheachotherwithintheinteriorofasegment,wepursueasplittingstrategythatisexecutedduringtheplanesweeponthey.Ifsegmentsintersect,theyaretemporarilysplitattheircommonintersectionpointsothateachofthemisreplacedbytwosegments(thatis,fourhalfsegments)(Figure 5-5 A).Iftwosegmentspartiallycoincide,theyarespliteachtimetheendpointofonesegmentliesinsidetheinterioroftheothersegment.Dependingonthetopologicalsituations,whichcanbedescribedbyAllen'sthirteenbasicrelationsonintervals[ 1 ],eachofthetwosegmentseitherremainsunchangedorisreplacedbyuptothreesegments(thatis,sixhalfsegments).Fromthethirteenpossiblerelations,eightrelations(fourpairsofsymmetricrelations)areofinteresthere(Figure 5-5 B).Ifanendpointofonesegmenttouchestheinterioroftheothersegment,thelattersegmentissplitandreplacedbytwosegments(thatis,fourhalfsegments)(Figure 5-5 C).Thissplittingstrategyisnumericallystableandthusfeasiblefromanimplementationstandpointsinceweassumenumerically 114

PAGE 115

Splittingofsegments.A)twointersectingsegments.B)twopartiallycoincidingsegments(withoutsymmetriccounterparts).C)Asegmentwhoseinterioristouchedbyanothersegment.Digitsindicatepartnumbersofsegmentsaftersplitting. robustgeometriccomputationthatensurestopologicalconsistencyofintersectionoperations.Intersectingandtouchingpointscanthenbeexactlycomputed,leadtorepresentablepoints,andarethuspreciselylocatedontheintersectingortouchingsegments. However,asindicatedbefore,thesplittingofsegmentsentailssomealgorithmiceffort.Ontheonehand,wewanttokeepthehalfsegmentsequencesoftheline2Dandregion2Dobjectsunchanged,sincetheirupdateisexpensiveandonlytemporarilyneededfortheplanesweep.Ontheotherhand,thesplittingofhalfsegmentshasaneffectonthesesequences.Asacompromise,foreachline2Dorregion2Dobject,wemaintainitsstaticrepresentation,andthehalfsegmentsobtainedbythesplittingprocessarestoredinanadditionaldynamichalfsegmentsequence.ThedynamicpartisalsoorganizedasanAVLtreewhichisembeddedinanarrayandwhoseelementsarelinkedinsequenceorder.Assumingthatksplittingpointsaredetectedduringtheplanesweep,weneedO(k)additionalspace,andtoinsertthemrequiresO(klogk)time.Aftertheplanesweep,thisadditionalspaceisreleased. Figure5-6. Sweeplinestatus.A)Beforethesplitting(s4tobeinserted).B)Afterthesplitting.Theverticaldashedlineindicatesthecurrentpositionofthesweepline. 115

PAGE 116

StaticanddynamichalfsegmentsequencesoftheregionsR1andR2inFigure 5-6 (hls4;2;f) (hrs4;2;f) (hls2;f) (hls3;t) (hls4;f) (hrs3;t) (hrs2;f) (hrs4;f) (hls5;f) (hrs5;f) (hrs1;t) (hlv2;f) (hrv2;f) (hlv3;f) (hrv3;f) (hrv1;t) (hlv1;2;t) (hrv1;2;t) 5-5 .Werstconsiderthecasethattheplanesweepdetectsanintersection.ThisleadstoasituationlikeinFigure 5-6 A.ThetwostaticandthetwodynamichalfsegmentsequencesofR1andR2areshowninTable 5-1 .Togethertheyformtheeventpointscheduleoftheplanesweepandareprocessedbyaparallelobjecttraversal.Beforethecurrentpositionofthesweepline(indicatedbytheverticaldashedlineinFigure 5-6 ),theparallelobjecttraversalhasalreadyprocessedtheattributedhalfsegments(hls1;t),(hls2;f),(hlv1;t),and(hlv2;f)inthisorder.Atthecurrentpositionofthesweepline,theparallelobjecttraversalencountersthehalfsegments(hls3;t)and(hls4;f).Foreachlefthalfsegmentvisited,thecorrespondingsegmentisinsertedintothesweeplinestatusaccordingtothey-coordinateofitsdominatingpointandcheckedforintersectionswithitsdirectupperandlowerneighbors.Inourexample,theinsertionofs4leadstoanintersectionwithitsupperneighborv1.Thisrequiressegmentsplitting;wesplitv1intothetwosegmentsv1;1andv1;2ands4intothetwosegmentss4;1ands4;2.Inthesweeplinestatus,wehavetoreplacev1byv1;1ands4bys4;1(Figure 5-6 B).Thenewhalfsegments(hrs4;1;f),(hls4;2;f),and(hrs4;2;f)areinsertedintothedynamichalfsegmentsequenceofR1.IntothedynamichalfsegmentsequenceofR2,weinsertthehalfsegments(hrv1;1;t),(hlv1;2;t),and(hrv1;2;t).Weneednotstorethetwohalfsegments(hls4;1;f)and(hlv1;1;t)sincetheyrefertothepastandhavealreadybeenprocessed. Onpurposewehaveacceptedalittleinconsistencyinthisprocedure,whichcanfortunatelybeeasilycontrolled.Since,forthedurationoftheplanesweep,s4(v1)hasbeenreplacedbys4;1(v1;1)ands4;2(v1;2),theproblemisthatthestaticsequencepartofR1(R2)stillincludesthenowinvalidhalfsegment(hrs4;f)((hrv1;t)),whichwemaynotdelete(seeFigure 5-6 B).However,this 116

PAGE 117

ForthesecondandthirdcaseinFigure 5-5 ,theprocedureisthesamebutmoresplitscanoccur.Incaseofoverlapping,collinearsegments,weobtainuptosixnewhalfsegments.Incaseofatouchingsituation,thesegmentwhoseinterioristouchedissplit. Ourresearchshowsthatitisunfavorabletoaimatdesigningauniversalexplorationalgorithmthatcoversallcombinationsofspatialdatatypes.Thishasthreemainreasons.First,eachofthedatatypespoint2D,line2D,andregion2Dhasverytype-specic,wellknownpropertiesthataredifferentfromeachother(likedifferentdimensionality).Second,foreachcombinationofspatialdatatypes,thetopologicalinformationwehavetocollectisveryspecicandespeciallydifferentfromallothertypecombinations.Third,thetopologicalinformationwecollectabouteachspatialdatatypeisdifferentindifferenttypecombinations.Therefore,usingthebasicalgorithmicconceptsofSection 5.2.1 ,inthissection,wepresentexplorationalgorithmsforallcombinationsofcomplexspatialdatatypes.Betweentwoobjectsoftypespoint2D,line2D,orregion2D,wehavetodistinguishsixdifferentcases,ifweassumethatthe 117

PAGE 118

Dependingonthetypesofspatialobjectsinvolved,abooleanvectorvFconsistingofaspecialsetoftopologicalagsisassignedtoeachobjectF.Wecallitatopologicalfeaturevector.Itsagsareallinitializedtofalse.Oncecertaintopologicalinformationaboutanobjecthasbeendiscovered,thecorrespondingagofitstopologicalfeaturevectorissettotrue.Topologicalagsrepresenttopologicalfactsofinterest.Weobtainthembyanalyzingthetopologicalintersectionsbetweentheexterior,interiorandboundaryofacomplexspatialobjectwiththecorrespondingcomponentsofanothercomplexspatialobjectaccordingtothe9-intersectionmatrix(Figure 2-2 A).Thatis,theconceptistomapthematrixelementsofthe9-intersectionmatrix,whicharepredicates,intoatopologicalfeaturevectorandtoeliminateredundancygivenbysymmetricmatrixelements.Foralltypecombinations,weaimatminimizingthenumberoftopologicalagsofbothspatialargumentobjects.Insymmetriccases,onlytherstobjectgetstheag.Thetopologicalfeaturevectorsarelaterusedintheevaluationphaseforpredicatematching.Hence,theselectionoftopologicalagsishighlymotivatedbytherequirementsoftheevaluationphase(Section 5.2.3 ,[ 51 ]). LetP(F)bethesetofallpointsofapoint2DobjectF,H(F)bethesetofall(attributed)halfsegments[includingthoseresultingfromoursplittingstrategy]ofaline2D(region2D)objectF,andB(F)bethesetofallboundarypointsofaline2DobjectF.Forf2H(F),letf:sdenoteitssegmentcomponent,and,ifFisaregion2Dobject,letf:iadenoteitsattributecomponent.Thedenitionsinthenextsubsectionsmakeuseoftheoperationsonrobustgeometricprimitivesandhalfsegments(Section 5.1.2 ). 2-2 A)ofp. 118

PAGE 119

disjoint.ButonlyvFinadditiongetstheagpoi sharedsincethesharingofapointissymmetric.Weobtain(thesymbol:,meansequivalentbydenition): (i)vF[poi shared]:,9f2P(F)9g2P(G):f=g(ii)vF[poi disjoint]:,9f2P(F)8g2P(G):f6=g(iii)vG[poi disjoint]:,9g2P(G)8f2P(F):f6=g 5-7 shows.Thewhile-loopterminatesifeithertheendofoneoftheobjectshasbeenreachedoralltopologicalagshavebeensettotrue(lines7and8).Intheworstcase,theloophastobetraversedl+mtimeswherel(m)isthenumberofpointsoftherst(second)point2Dobject.Sincethebodyofthewhile-looprequiresconstanttime,theoveralltimecomplexityisO(l+m). 59 ].ItfollowsfromthisdenitionthateachboundarypointofGisanendpointofa(half)segmentofGandthatthisdoesnotnecessarilyholdviceversa,asFigure 5-8 Aindicates.TheblacksegmentendpointsbelongtotheboundaryofG,sinceexactlyonesegmentemanatesfromeachofthem.Intuitively,theyboundG.Incontrast,the 119

PAGE 120

rst(F,G,object,status);07whilestatus=end of noneandnot(vF[poi disjoint]08andvG[poi disjoint]andvF[poi shared])do09ifobject=rstthenvF[poi disjoint]:=true10elseifobject=secondthenvG[poi disjoint]:=true11else/*object=both*/12vF[poi shared]:=true;13endif14select next(F,G,object,status);15endwhile;16ifstatus=end of rstthenvG[poi disjoint]:=true17elseifstatus=end of secondthen18vF[poi disjoint]:=true19endif20endExplorePoint2DPoint2D. Figure5-7. Algorithmforcomputingthetopologicalfeaturevectorsfortwopoint2Dobjects greysegmentendpointsbelongtotheinteriorofG,sinceseveralsegmentsemanatefromeachofthem.Intuitively,theyareconnectorpointsbetweendifferentsegmentsofG. ABC Figure5-8. Boundarypointintersections.A)Boundarypoints(inblack)andconnectorpoints(ingrey)ofaline2Dobject.B)Ascenariowhereaboundarypointofaline2Dobjectexiststhatisunequaltoallpointsofapoint2Dobject.C)Ascenariowherethisisnotthecase. ThefollowingargumentationleadstotheneededtopologicalagsforFandG.SeenfromtheperspectiveofF,wecandistinguishthreecasessincetheboundaryofFisempty[ 59 ]andtheinteriorofFcaninteractwiththeexterior,interior,orboundaryofG.First,(theinteriorof)apointfofFcanbedisjointfromG(agpoi disjoint).Second,apointfcanlieintheinterior 120

PAGE 121

on interior).Thisincludesanendpointofsuchasegment,iftheendpointisaconnectorpointofG.Third,apointfcanbeequaltoaboundarypointofG(agpoi on bound).SeenfromtheperspectiveofG,wecandistinguishfourcasessincetheboundaryandtheinteriorofGcaninteractwiththeinteriorandexteriorofF.First,GcancontainaboundarypointthatisunequaltoallpointsinF(agbound poi disjoint).Second,GcanhaveaboundarypointthatisequaltoapointinF.Buttheagpoi on boundalreadytakescareofthissituation.Third,theinteriorofasegmentofG(includingconnectorpoints)cancomprehendapointofF.Thissituationisalreadycoveredbytheagpoi on interior.Fourth,theinteriorofasegmentofGcanbepartoftheexteriorofF.ThisisalwaystruesinceasegmentofGrepresentsaninnitepointsetthatcannotbecoveredbythenitenumberofpointsinF.Hence,weneednothandlethisasaspecialsituation.Formally,wedenethesemanticsofthetopologicalagsasfollows: (i)vF[poi disjoint]:,9f2P(F)8g2H(G)::on(f;g:s)(ii)vF[poi on interior]:,9f2P(F)9g2H(G)8b2B(G):on(f;g:s)^f6=b(iii)vF[poi on bound]:,9f2P(F)9g2B(G):f=g(iv)vG[bound poi disjoint]:,9g2B(G)8f2P(F):f6=g 5-9 .Thewhile-loopisexecuteduntiltheendoftheline2Dobject(line9)andaslongasnotalltopologicalagshavebeensettotrue(lines10to11).Theoperationsselect rstandselect nextcompareapointandahalfsegmentaccordingtotheorderrelationdenedinSection 5.1.2 inordertodeterminethenextelement(s)tobeprocessed.Ifonlyapointhastobeprocessed(line12),weknowthatitdoesnotcoincidewithanendpointofasegmentofGandhencenotwithaboundarypointofG.ButwehavetocheckwhetherthepointliesintheinteriorofasegmentinthesweeplinestatusstructureS.Thisisdonebythesearchoperationpoi in segonS(line13).Ifthisisnotthecase,thepointmustbelocatedoutsidethesegment(line14).Ifonlyahalfsegment 121

PAGE 122

sweep();last dp:=e;08select rst(F,G,object,status);09whilestatus6=end of secondandstatus6=end of bothand10not(vF[poi disjoint]andvF[poi on interior]and11vF[poi on bound]andvG[bound poi disjoint])do12ifobject=rstthenp:=get event(F);13ifpoi in seg(S,p)thenvF[poi on interior]:=true14elsevF[poi disjoint]:=trueendif15elseifobject=secondthen16h:=get event(G);/*h=(s;d)*/17ifdthenadd left(S,s)elsedel right(S,s)endif;18ifdp(h)6=last dpthenlast dp:=dp(h);19ifnotlook ahead(h;G)then20vG[bound poi disjoint]:=true21endif22endif23else/*object=both*/24h:=get event(G);/*h=(s;d)*/25ifdthenadd left(S,s)elsedel right(S,s)endif;26last dp:=dp(h);27iflook ahead(h;G)then28vF[poi on interior]:=true29elsevF[poi on bound]:=trueendif30endif31select next(F,G,object,status);32endwhile;33ifstatus=end of secondthen34vF[poi disjoint]:=true35endif36endExplorePoint2DLine2D. Figure5-9. Algorithmforcomputingthetopologicalfeaturevectorsforapoint2Dobjectandaline2Dobject 122

PAGE 123

dp(line18)andiftheoperationlook aheadndsoutthatvdoesalsonotcoincidewiththedominatingpointofthenexthalfsegment(lines19to20).IncasethatapointvofFisequaltoadominatingpointofahalfsegmenthinG(line23),weknowthatvhasneverbeenvisitedbeforeandthatitisanendpointofthesegmentcomponentofh.BesidestheupdateofS(line25),itremainstodecidewhethervisaninteriorpoint(line28)oraboundarypoint(line29)ofh.Forthis,welookahead(line27)toseewhetherthenexthalfsegment'sdominatingpointisequaltovornot. IflisthenumberofpointsofFandmisthenumberofhalfsegmentsofG,thewhile-loopisexecutedatmostl+mtimes.TheinsertionofalefthalfsegmentintoandtheremovalofarighthalfsegmentfromthesweeplinestatusneedsO(logm)time.Thecheckwhetherapointlieswithinoroutsideasegment(predicatepoi in seg)alsorequiresO(logm)time.Altogether,theworsttimecomplexityisO((l+m)logm).Thewhile-loophastobeexecutedatleastmtimesforprocessingtheentireline2Dobjectinordertondoutifaboundarypointexiststhatisunequaltoallpointsofthepoint2Dobject(Figures 5-8 BandC). inside),ontheboundaryofG(agpoi on bound),oroutsideofregionG(agpoi outside).SeenfromtheperspectiveofG,wecandistinguishfourcasesbetweentheboundaryandtheinteriorofGwiththeinteriorandexteriorofF.Theintersectionoftheboundary(interior)ofGwiththeinteriorofFimpliesthatapointofFislocatedontheboundary(inside)ofG.Thissituationisalreadycoveredbytheagpoi on bound(poi inside).Theintersectionoftheboundary(interior)ofGwiththeexteriorofFisalwaystrue,sinceF

PAGE 124

(i)vF[poi inside]:,9f2P(F):poiInRegion(f;G)(ii)vF[poi on bound]:,9f2P(F)9g2H(G):on(f;g:s)(iii)vF[poi outside]:,9f2P(F)8g2H(G)::poiInRegion(f;G)^:on(f;g:s) 5-10 .Thewhile-loopisexecutedaslongasnoneofthetwoobjectshasbeenprocessed(line9)andaslongasnotalltopologicalagshavebeensettotrue(lines9to10).Ifonlyapointhastobeprocessed(line11),wemustcheckitslocation.Therstcaseisthatitliesonaboundarysegment;thisischeckedbythesweeplinestatuspredicatepoi on seg(line12).Otherwise,itmustbelocatedinsideoroutsideofG.Weusetheoperationpred of p(line13)todeterminethenearestsegmentinthesweeplinestatuswhoseintersectionpointwiththesweeplinehasalowery-coordinatethanthey-coordinateofthepoint.Thepredicatecurrent existscheckswhethersuchasegmentexists(line14).Ifthisisnotthecase,thepointmustbeoutsideofG(line17).Otherwise,weaskfortheinformationwhethertheinteriorofGisabovethesegment(line14).Wecanthenderivewhetherthepointisinsideoroutsidetheregion(lines15to16).IfonlyahalfsegmenthhastobeprocessedorapointvofFisequaltoadominatingpointofahalfsegmenthinG(line20),h'ssegmentcomponentisinsertedinto(deletedfrom)Sifhisaleft(right)halfsegment(line20to21).Incaseofalefthalfsegment,inaddition,theinformationwhethertheinteriorofGisabovethesegmentisstoredinthesweeplinestatus(line21).Ifvandthedominatingpointofhcoincide,weknowthatthepointisontheboundaryofG(line23). IflisthenumberofpointsofFandmisthenumberofhalfsegmentsofG,thewhile-loopisexecutedatmostl+mtimes.Eachofthesweeplinestatusoperationsadd left,del right, 124

PAGE 125

sweep();08select rst(F,G,object,status);09whilestatus=end of noneandnot(vF[poi inside]10andvF[poi on bound]andvF[poi outside])do11ifobject=rstthenp:=get event(F);12ifpoi on seg(S,p)thenvF[poi on bound]:=true13elsepred of p(S,p);14ifcurrent exists(S)thenia:=get attr(S);15ifiathenvF[poi inside]:=true16elsevF[poi outside]:=trueendif17elsevF[poi outside]:=true18endif19endif20elseh:=get event(G);ia:=get attr(G);/*h=(s;d)*/21ifdthenadd left(S,s);set attr(S,ia)22elsedel right(S,s)endif;23ifobject=boththenvF[poi on bound]:=trueendif24endif25select next(F,G,object,status);26endwhile;27ifstatus=end of secondthen28vF[poi outside]:=true29endif30endExplorePoint2DRegion2D. Figure5-10. Algorithmforcomputingthetopologicalfeaturevectorsforapoint2Dobjectandaregion2Dobject on seg,pred of p,current exists,get attr,andset attrneedsO(logm)time.ThetotalworsttimecomplexityisO((l+m)logm). 125

PAGE 126

shared).Second,ifasegmentofFdoesnotpartiallyorcompletelycoincidewithanysegmentofG,weregisterthisintheagseg unshared.Third,wesettheaginterior poi sharediftwosegmentsintersectinasinglepointthatdoesnotbelongtotheboundariesofForG.Fourth,aboundaryendpointofasegmentofFcanbelocatedintheinteriorofasegment(includingconnectorpoints)ofG(agbound on interior).Fifth,bothobjectsFandGcanshareaboundarypoint(agbound shared).Sixth,ifaboundaryendpointofasegmentofFliesoutsideofallsegmentsofG,wesettheagbound disjoint.SeenfromtheperspectiveofG,wecanidentifythesamecases.Butduetothesymmetryofthreeofthesixtopologicalcases,wedonotneedallagsforG.Forexample,ifasegmentofFpartiallycoincideswithasegmentofG,thisalsoholdsviceversa.Hence,itissufcienttointroducetheagsseg unshared,bound on interior,andbound disjointforG.Wedenethesemanticsofthetopologicalagsasfollows: (i)vF[seg shared]:,9f2H(F)9g2H(G):segIntersect(f:s;g:s)(ii)vF[interior poi shared]:,9f2H(F)9g2H(G)8p2B(F)[B(G):poiIntersect(f:s;g:s)^poiIntersection(f:s;g:s)6=p(iii)vF[seg unshared]:,9f2H(F)8g2H(G)::segIntersect(f:s;g:s)(iv)vF[bound on interior]:,9f2H(F)9g2H(G)9p2B(F)nB(G):poiIntersection(f:s;g:s)=p(v)vF[bound shared]:,9p2B(F)9q2B(G):p=q(vi)vF[bound disjoint]:,9p2B(F)8g2H(G)::on(p;g:s)(vii)vG[seg unshared]:,9g2H(G)8f2H(F)::segIntersect(f:s;g:s)(viii)vG[bound on interior]:,9f2H(F)9g2H(G)9p2B(G)nB(F):poiIntersection(f:s;g:s)=p(ix)vG[bound disjoint]:,9q2B(G)8f2H(F)::on(q;f:s)

PAGE 127

sweep();last dp in F:=e;last dp in G:=e;07last bound in F:=e;last bound in G:=e;08select rst(F,G,object,status);09whilestatus6=end of bothandnot(vF[seg shared]10andvF[interior poi shared]andvF[seg unshared]11andvF[bound on interior]andvF[bound shared]12andvF[bound disjoint]andvG[bound disjoint]13andvG[bound on interior]andvG[seg unshared])do14ifobject=rstthenh:=get event(F);/*h=(s;d)*/15ifdthenadd left(S,s)16elsedel right(S,s);vF[seg unshared]:=trueendif;17ifdp(h)6=last dp in Fthenlast dp in F:=dp(h);18ifnotlook ahead(h;F)then19last bound in F:=dp(h);20iflast bound in F=last bound in Gthen21vF[bound shared]:=true22elseiflast bound in F=last dp in Gthen23vF[bound on interior]:=true24elseifnotlook ahead(h;G)then25vF[bound disjoint]:=true26endif27endif28endif;29ifdp(h)6=last bound in Fthen30ifdp(h)=last bound in Gthen31vG[bound on interior]:=true32elseifdp(h)=last dp in Gthen33vF[interior poi shared]:=true34endif35endif event(G);37:::/*likelines15to35withFandGswapped*/38else/*object=both*/39h:=get event(F);vF[seg shared]:=true;40ifdthenadd left(S,s)elsedel right(S,s)endif;41ifdp(h)6=last dp in Fthenlast dp in F:=dp(h);42ifnotlook ahead(h;F)then43last bound in F:=dp(h)44endif45endif;46ifdp(h)6=last dp in Gthenlast dp in G:=dp(h);47ifnotlook ahead(h;G)then48last bound in G:=dp(h)49endif50endif;51iflast bound in F=last bound in Gthen52vF[bound shared]:=true53else54iflast bound in F=last dp in Gthen55vF[bound on interior]:=true56endif;57iflast bound in G=last dp in Fthen58vG[bound on interior]:=true59endif60endif61endif;62ifstatus=end of rstthen63vG[seg unshared]:=true;64elseifstatus=end of secondthen65vF[seg unshared]:=true;66endif67select next(F,G,object,status);68endwhile;69endExploreLine2DLine2D. Algorithmforcomputingthetopologicalfeaturevectorsfortwoline2Dobjects

PAGE 128

5-11 .Thewhile-loopisexecuteduntilbothobjectshavebeenprocessed(line9)andaslongasnotalltopologicalagshavebeensettotrue(lines9to13).Ifasingleleft(right)halfsegmentofF(line14)hastobeprocessed(thesameforG(line36)),weinsertitinto(deleteitfrom)thesweeplinestatus(lines15and16).ThedeletionofasinglerighthalfsegmentfurtherindicatesthatitisnotsharedbyG(line16).Ifthecurrentdominatingpoint,sayv,isunequaltothepreviousdominatingpointofF(line17)andiftheoperationlook aheadndsoutthatvisalsounequaltothedominatingpointofthenexthalfsegmentofF(line18),vmustbeaboundarypointofF(line19).Inthiscase,weperformthreechecks.First,ifvcoincideswiththecurrentboundarypointinG,bothobjectsshareapartoftheirboundary(lines20to21).Second,otherwise,ifvisequaltothecurrentdominatingpoint,sayw,inG,wmustbeaninteriorpointofG,andtheboundaryofFandtheinteriorofGshareapoint(lines22to23).Third,otherwise,ifvisdifferentfromthedominatingpointofthenexthalfsegmentinG,FcontainsaboundarypointthatisdisjointfromG(lines24to25).Ifvhasnotbeenidentiedasaboundarypointinthepreviousstep(line29),itmustbeaninteriorpointofF.Inthiscase,wecheckwhetheritcoincideswiththecurrentboundarypointinG(lines30to31)orwhetheritisalsoaninteriorpointinG(lines32to33).Ifahalfsegmentbelongstobothobjects(line38),wecanconcludethatitissharedbythem(line39).Dependingonwhetheritisaleftorrighthalfsegment,itisinsertedintoordeletedfromthesweeplinestatus(line40).Lines41to45(46to50)testwhetherthedominatingpointvofthehalfsegmentisaboundarypointofF(G).Afterwards,wecheckwhethervisaboundarypointofbothobjects(lines51to52).Ifthisisnotthecase,weexaminewhetheroneofthemisaboundarypointandtheotheroneisaninteriorpoint(lines54to59).Lines62to66handlethecasethatexactlyoneofthetwohalfsegmentsequencesisexhausted. Letl(m)bethenumberofhalfsegmentsofF(G).Segmentsofbothobjectscanintersectorpartiallycoincide(Figure 5-5 ),andwehandlethesetopologicalsituationswiththesplittingstrategydescribedinSection 5.2.1.3 .If,duetosplitting,kisthetotalnumberofadditionalhalfsegmentsstoredinthedynamichalfsegmentsequencesofbothobjects,thewhile-loopis 128

PAGE 129

leftanddel rightforinsertinganddeletinghalfsegments;theyrequireO(log(l+m+k))timeeach.Nospecialpredicateshavetobedeployedfordiscoveringtopologicalinformation.Duetothesplittingstrategy,alldominatingendpointseitherarealreadyendpointsofexistingsegmentsorbecomeendpointsofnewlycreatedsegments.Theoperationlook aheadneedsconstanttime.Intotal,thealgorithmrequiresO((l+m+k)log(l+m+k))timeandO(l+m+k)space. inside).Second,theinteriorofasegmentofFintersectswithaboundarysegmentofGifeitherbothsegmentspartiallyorfullycoincide(agseg shared),oriftheyproperlyintersectinasinglepoint(agpoi shared).Third,theinteriorofasegmentofFintersectswiththeexteriorofGifthesegmentisdisjointfromG(agseg outside).Fourth,aboundarypointofFintersectstheinteriorofGiftheboundarypointliesinsideofG(agbound inside).Fifth,ifitliesontheboundaryofG,wesettheagbound shared.Sixth,ifitliesoutsideofG,wesettheagbound disjoint. SeenfromtheperspectiveofG,wecandifferentiatethesamesixcasesasbeforeandobtainmostofthetopologicalagsasbefore.First,iftheinteriorsofGandFintersect,asegmentofFmustpartiallyortotallylieinG(alreadycoveredbyagseg inside).Second,iftheinteriorofGandtheboundaryofFintersect,theboundarypointofasegmentofFmustbelocatedinG(alreadycoveredbyagbound inside).Third,thecasethattheinteriorofGintersectstheexteriorofFisalwaystrueduetothedifferentdimensionalityofbothobjects;hence,wedonotneedaag.Fourth,iftheboundaryofGintersectstheinteriorofF,asegmentofFmustpartiallyorfullycoincidewithaboundarysegmentofG(alreadycoveredbyagseg shared).Fifth,iftheboundaryofGintersectstheboundaryofF,aboundarypointofasegmentofFmustlieonaboundarysegmentofG(alreadycoveredbyagbound shared).Sixth,iftheboundary 129

PAGE 130

unshared).Moreformally,wedenethesemanticsofthetopologicalagsasfollows: (i)vF[seg inside]:,9f2H(F)8g2H(G)::segIntersect(f:s;g:s)^segInRegion(f:s;G)(ii)vF[seg shared]:,9f2H(F)9g2H(G):segIntersect(f:s;g:s)(iii)vF[seg outside]:,9f2H(F)8g2H(G)::segIntersect(f:s;g:s)^:segInRegion(f:s;G)(iv)vF[poi shared]:,9f2H(F)9g2H(G):poiIntersect(f:s;g:s)^poiIntersection(f:s;g:s)=2B(F)(v)vF[bound inside]:,9f2H(F):poiInRegion(dp(f);G)^dp(f)2B(F)(vi)vF[bound shared]:,9f2H(F)9g2H(G):poiIntersect(f:s;g:s)^poiIntersection(f:s;g:s)2B(F)(vii)vF[bound disjoint]:,9f2H(F)8g2H(G)::poiInRegion(dp(f);G)^dp(f)2B(F)^:on(dp(f);g:s)(viii)vG[seg unshared]:,9g2H(G)8f2H(F)::segIntersect(f:s;g:s) TheexplorationalgorithmforthiscaseisgiveninFigure 5-12 .Thewhile-loopisexecuteduntilatleasttherstobjecthasbeenprocessed(line10)andaslongasnotalltopologicalagshavebeensettotrue(lines11to14).IncasethatweonlyencounterahalfsegmenthofF(line15),weinsertitssegmentcomponentsintothesweeplinestatusifitisalefthalfsegment(line16).Ifitisarighthalfsegment,wendoutwhetherhislocatedinsideoroutsideofG(lines18to23).WeknowthatitcannotcoincidewithaboundarysegmentofG,sincethisisanothercase.Thepredicatepred existscheckswhethershasapredecessorinthesweeplinestatus(line18);itignoressegmentsinthesweeplinestatusthatstemfromF.Ifthisisnotthecase(line22),s

PAGE 131

sweep();last dp in F:=e;last dp in G:=e;08last bound in F:=e;09select rst(F,G,object,status);10whilestatus6=end of rstandstatus6=end of both11andnot(vF[seg inside]andvF[seg shared]12andvF[seg outside]andvF[poi shared]13andvF[bound inside]andvF[bound shared]14andvG[bound disjoint]andvG[seg unshared])do15ifobject=rstthenh:=get event(F);/*h=(s;d)*/16ifdthenadd left(S,s)17else18ifpred exists(S;s)then19(mp=np):=get pred attr(S,s);20ifnp=1thenvF[seg inside]:=true21elsevF[seg outside]:=trueendif22elsevF[seg outside]:=trueendif;23del right(S,s);24endif;25ifdp(h)6=last dp in Fthenlast dp in F:=dp(h);26ifnotlook ahead(h;F)then27last bound in F:=dp(h);28iflast bound in F=last dp in G29orlook ahead(h;G)then30vF[bound shared]:=true31else32ifpred exists(S;s)then33(mp=np):=get pred attr(S,s);34ifnp=1thenvF[bound inside]:=true outside]:=trueendif36elsevF[bound outside]:=trueendif37endif38endif39endif;40ifdp(h)6=last bound in Fand41(dp(h)=last dp in Gorlook ahead(h;G))then42vF[poi shared]:=true43endif44elseifobject=secondthen45h:=get event(G);ia:=get attr(G);46ifdthenadd left(S,s);set attr(S,ia)47elsedel right(S,s);vG[seg unshared]:=trueendif;48ifdp(h)6=last dp in Gthen49last dp in G:=dp(h)endif;50else/*object=both*/vF[seg shared]:=true;51h:=get event(G);ia:=get attr(G);52ifdthenadd left(S,s);set attr(S,ia)53elsedel right(S,s)endif;54ifdp(h)6=last dp in Fthenlast dp in F:=dp(h);55ifnotlook ahead(h;F)then56vF[bound shared]:=true57elsevF[poi shared]:=trueendif58endif;59ifdp(h)6=last dp in Gthen60last dp in G:=dp(h)endif;61endif;62ifstatus=end of secondthen63vF[seg outside]:=trueendif;64select next(F,G,object,status);65endwhile;66ifstatus=end of rstthen67vG[seg unshared]:=trueendif68endExploreLine2DRegion2D. Algorithmforcomputingthetopologicalfeaturevectorsforaline2Dobjectandaregion2Dobject

PAGE 132

ahead.Ifthisisthecase,wedeterminewhetherthispointissharedbyG(lines28to30)orwhetherthispointislocatedinsideoroutsideofG(lines31to38).Last,ifthedominatingpointturnsoutnottobeaboundarypointofF,wecheckwhetheritisaninteriorpointthatsharesaboundarypointwithG(lines40to43).IncasethatweonlyobtainahalfsegmenthofG(line44),weinsertitssegmentcomponentsintothesweeplinestatusandattachtheBooleanagiaindicatingwhethertheinteriorofGisabovesornot(line46).Otherwise,wedeletearighthalfsegmenthfromthesweeplinestatusandknowthatitisnotsharedbyF(line47).IncasethatbothFandGshareahalfsegment,weknowthattheyalsosharetheirsegmentcomponents(line50).Thesweeplinestatusisthenmodieddependingonthestatusofh(lines52to53).IfweencounteranewdominatingpointofF,wehavetocheckwhetherFsharesaboundarypoint(lines55to56)oraninteriorpoint(line57)withtheboundaryofG.IfthehalfsegmentsequenceofGshouldbeexhausted(line62),weknowthatFmusthaveasegmentwhoseinteriorisoutsideofG(line63).Ifafterthewhile-looponlyFisexhaustedbutnotG(line66),GmusthaveaboundarysegmentthatisdisjointfromF(line67). LetlbethenumberofhalfsegmentsofF,mbethenumberofattributedhalfsegmentsofG,andkbethetotalnumberofnewhalfsegmentscreatedduetooursplittingstrategy.Thewhile-loopisthenexecutedatmostl+m+ktimes.AlloperationsneededonthesweeplinestatusrequireO(log(l+m+k))timeeach.Duetothesplittingstrategy,alldominatingendpointsarealreadyendpointsofexistingsegmentsorbecomeendpointsofnewlycreated Figure5-13. Specialcaseoftheplanesweep. 132

PAGE 133

aheadneedsconstanttime.Intotal,thealgorithmrequiresO((l+m+k)log(l+m+k))timeandO(l+m+k)space. (i)vF[(0=1)]:,9f2H(F):f:ia^pts(f:s)G(ii)vF[(1=0)]:,9f2H(F)::f:ia^pts(f:s)G(iii)vF[(1=2)]:,9f2H(F):f:ia^pts(f:s)G(iv)vF[(2=1)]:,9f2H(F)::f:ia^pts(f:s)G(v)vF[(0=2)]:,9f2H(F)9g2H(G):f:s=g:s^f:ia^g:ia(vi)vF[(2=0)]:,9f2H(F)9g2H(G):f:s=g:s^:f:ia^:g:ia(vii)vF[(1=1)]:,9f2H(F)9g2H(G):f:s=g:s^((f:ia^:g:ia)_(:f:ia^g:ia))(viii)vF[bound poi shared]:,9f2H(F)9g2H(G):f:s6=g:s^dp(f)=dp(g)

PAGE 134

poi sharedindicateswhetheranytwounequalboundarysegmentsofbothobjectsshareacommonpoint.Beforethesplitting,suchapointmayhavebeenasegmentendpointorapropersegmentintersectionpointforeachobject.ThedeterminationofthebooleanvalueofthisagalsoincludesthetreatmentofaspecialcaseillustratedinFigure 5-13 .IftworegionsFandGmeetinapointlikeintheexample,suchatopologicalmeetingsituationcannotbedetectedbyausualplanesweep.Thereasonisthattheplanesweepforgetscompletelyaboutthealreadyvisitedsegments(righthalfsegments)leftofthesweepline.Inourexample,afters1ands2havebeenremovedfromthesweeplinestatus,anyinformationaboutthemislost.Whens3isinsertedintothestatussweepline,itsmeetingwiths2cannotbedetected.OursolutionistolookaheadinobjectGforanexthalfsegmentwiththesamedominatingpointbefores2isremovedfromthesweeplinestatus. ThesegmentclassicationiscomputedbythealgorithminFigure 5-14 .Thewhile-loopisexecutedaslongasnoneofthetwoobjectshasbeenprocessed(line8)andaslongasnotalltopologicalagshavebeensettotrue(lines8to12).Then,accordingtothehalfsegmentorder,thenexthalfsegmenthisobtained,whichbelongstooneorbothobjects,andthevariablesforthelastconsidereddominatingpointsinFand/orGareupdated(lines13to20).Next,wecheckforapossiblecommonboundarypointinFandG(lines21to25).ThisisthecaseifthelastdominatingpointsofFandGareequal,orthelastdominatingpointinF(G)coincideswiththenextdominatingpointinG(F).Thelatteralgorithmicstep,inparticular,helpsussolvethespecialsituationinFigure 5-13 .Ifhisarighthalfsegment(line26),weupdatethetopologicalfeaturevectorsofFand/orGcorrespondingly(lines27to32)andremoveitssegmentcomponentsfromthesweeplinestatus(line33).Incasethathisalefthalfsegment,weinsertitssegmentcomponentsintothesweeplinestatus(line34)accordingtothey-orderofitsdominatingpointandthey-coordinatesoftheintersectionpointsofthecurrentsweeplinewiththesegmentsmomentarilyinthesweeplinestatus.Ifh'ssegmentcomponentseitherbelongsto 134

PAGE 135

sweep();last dp in F:=e;last dp in G:=e;07select rst(F,G,object,status);08whilestatus=end of noneandnot(vF[(0=1)]andvF[(1=0)]09andvF[(1=2)]andvF[(2=1)]andvF[(0=2)]and10vF[(2=0)]andvF[(1=1)]andvF[bound poi shared]11andvG[(0=1)]andvG[(1=0)]andvG[(1=2)]and12vG[(2=1)])do13ifobject=rstthen/*h=(s;d)*/14h:=get event(F);last dp in F:=dp(h)15elseifobject=secondthen16h:=get event(G);last dp in G:=dp(h)17else/*object=both*/18h:=get event(F);19last dp in F:=dp(h);last dp in G:=dp(h)20endif;21iflast dp in F=last dp in G22orlast dp in F=look ahead(h,G)23orlast dp in G=look ahead(h,F)then24vF[bound poi shared]:=true25endif;26ifd=rightthen27f(ms=ns)g:=get attr(S);28ifobject=rstthenvF[(ms=ns)]:=true right(S,s)34elseadd left(S,s);35ifcoincident(S,s)thenobject:=bothendif;36ifnotpred exists(S,s)then(mp=np):=(=0)37elsef(mp=np)g:=get pred attr(S)endif;38ms:=np;ns:=np;39ifobject=rstorobject=boththen40ifget attr(F)thenns:=ns+141elsens:=ns1endif42endif;43ifobject=secondorobject=boththen44ifget attr(G)thenns:=ns+145elsens:=ns1endif46endif;47set attr(S,f(ms=ns)g);48endif;49select next(F,G,object,status);50endwhile;51ifstatus=end of rstthen52vG[(0=1)]:=true;vG[(1=0)]:=true53elseifstatus=end of secondthen54vF[(0=1)]:=true;vF[(1=0)]:=true55endif56endExploreRegion2DRegion2D. Algorithmforcomputingthetopologicalfeaturevectorsfortworegion2Dobjects

PAGE 136

attristrueorfalserespectively(lines39to46).Thenewlycomputedsegmentclassicationisthenattachedtos(line47).Thepossible19segmentclassconstellationsbetweentwoconsecutivesegmentsinthesweeplinestatusareshowninTable 5-2 .Thetableshowswhichsegmentclasses(ms=ns)anewsegmentsjustinsertedintothesweeplinestatuscanget,givenacertainsegmentclass(mp=np)ofapredecessorsegmentp.Thersttwocolumnsshowthespecialcasethatatthebeginningthesweeplinestatusisemptyandtherstsegmentisinserted.Thissegmentcaneitherbesharedbybothregionobjects((0=2)-segment)orstemsfromoneofthem((0=1)-segment).Inallthesecases(exceptthersttwocases),np=msmusthold. LetlbethenumberofattributedhalfsegmentsofF,mbethenumberofattributedhalfseg-mentsofG,andkbethetotalnumberofnewhalfsegmentscreatedduetooursplittingstrategy.Thewhile-loopisthenexecutedatmostl+m+ktimes.AlloperationsneededonthesweeplinestatusrequireatmostO(log(l+m+k))timeeach.Theoperationsonthehalfsegmentsequences Table5-2. Possiblesegmentclassconstellationsbetweentwoconsecutivesegmentsinthesweeplinestatus.

PAGE 137

Section 5.2.3.1 presentsanadhocevaluationmethodcalleddirectpredicatecharacter-ization.Learningfromitsshortcomings,inSection 5.2.3.2 ,weproposeanovel,systematic,provablycorrect,andgeneralevaluationmethodcalled9-intersectionmatrixcharacterization.Thenexttwosubsectionselaborateonaparticularstepofthegeneralmethodthatisdependentonthetypecombinationunderconsideration.Section 5.2.3.4 dealswiththespecialregion/regioncasewhileSection 5.2.3.3 handlesthecasesofallothertypecombinations. 2-2 Bforthedifferentvaluesofn)andisbasedonthetopo-logicalfeatureagsofvFandvGofthetwospatialargumentobjectsFandG.Thatis,fortheline/linecase,wehavetodeterminewhichtopologicalfeatureagsofvFandvGmustbeturnedonandwhichagsmustbeturnedoffsothatagiventopologicalpredicate(vericationquery)orapredicatetobefound(determinationquery)isfullled.Fortheregion/regioncase,thecentralquestionistowhichsegmentclassesthesegmentsofbothobjectsmustbelongsothatagiventopologicalpredicateorapredicatetobefoundissatised.Thedirectpredicatecharacterizationgivesananswerforeachindividualpredicateofeachindividualtypecombination.Thismeans 137

PAGE 138

Wegivetwoexamplesofdirectpredicatecharacterizations.Asarstexample,weconsiderthetopologicalpredicatenumber8(meet)betweentwolineobjectsFandG(Figure 5-15 Aand[ 59 ])andseehowtheagsofthetopologicalfeaturevectors(Denition 5.4 )areused. shared]^:vF[interior poi shared]^vF[seg unshared]^:vF[bound on interior]^vF[bound shared]^vF[bound disjoint]^vG[seg unshared]^:vG[bound on interior]^vG[bound disjoint] 5-15 A,intersectionsbetweenbothinteriors(:vF[seg shared],:vF[interior poi shared])aswellasbetweentheboundaryofoneobjectandtheinterioroftheotherobject(:vF[bound on interior],:vG[bound on interior])arenotallowed;besidesintersec-tionsbetweenbothboundaries(vF[bound shared),eachcomponentofoneobjectmustinteractwiththeexterioroftheotherobject(vF[seg unshared],vG[seg unshared],vF[bound disjoint],vG[bound disjoint]). Figure5-15. The9-intersectionmatrices.A)Matrixnumber8forthepredicatemeetbetweentwolineobjects.B)Matrixnumber7forthepredicateinsidebetweentworegionobjects. Next,weviewthetopologicalpredicatenumber7(inside)betweentworegionobjectsFandG(Figure 5-15 Band[ 59 ])andseehowthesegmentclasseskeptinthetopologicalfeaturevectors(Denition 5.6 )areused. 138

PAGE 139

poi shared]^(vF[(1=2)]_vF[(2=1)])^:vG[(1=2)]^:vG[(2=1)]^(vG[(0=1)]_vG[(1=0)]) poi shared]). Thepredicatecharacterizationscanbereadinbothdirections.Ifweareinterestedinpredicateverication,thatis,inevaluatingaspecictopologicalpredicate,welookfromlefttorightandchecktherespectiverightsideofthepredicate'sdirectcharacterization.Thiscorrespondstoanexplicitimplementationofeachindividualpredicate.Ifweareinterestedinpredicatedetermination,thatis,inderivingthetopologicalrelationshipfromagivenspatialcongurationoftwospatialobjects,wehavetolookfromrighttoleft.Thatis,consecutivelyweevaluatetherightsidesofthepredicatecharacterizationsbyapplyingthemtothegiventopologicalfeaturevectorsvFandvG.Forthecharacterizationthatmatcheswelookonitsleftsidetoobtainthenameornumberofthepredicate. Thedirectpredicatecharacterizationdemonstrateshowwecanleveragetheconceptoftopologicalfeaturevectors.However,thisparticularevaluationmethodhasthreemaindrawbacks.First,themethoddependsonthenumberoftopologicalpredicates.Thatis,eachofthe184(248)topologicalpredicatesbetweencomplexspatialobjectsrequiresanownspecication.Second,intheworstcase,alldirectpredicatecharacterizationswithrespecttoaparticulartypecombinationhavetobecheckedforpredicatedetermination.Third,thedirectpredicatecharacterizationiserror-prone.Itisdifculttoensurethateachpredicate 139

PAGE 140

2-2 A)bymeansofthetopologicalfeaturevectorsvFandvG.Asweknow,eachmatrixelementisapredicatecalledmatrixpredicatethatchecksoneofthenineintersectionsbetweentheboundaryF,interiorF,orexteriorFofaspatialobjectFwiththeboundaryG,interiorG,orexteriorGofanotherspatialobjectGforinequalitytotheemptyset.Foreachtopologicalpredicate,itsspecicationisthengivenasthelogicalconjunctionofthecharacterizationsoftheninematrixpredicates.Sincethetopologicalfeaturevectorsaredifferentforeachtypecombination,thecharacterizationofeachmatrixpredicateisdifferentforeachtypecombinationtoo.Thecharacterizationsthemselvesarethethemesofthenextsubsections. Thegeneralmethodforpredicatevericationworksasfollows.BasedonthetopologicalpredicateptobeveriedaswellasvFandvGasinput,weevaluateinaloopthecharacteri-zationsofallmatrixpredicatesnumberedfromlefttorightandfromtoptobottom.TheninthmatrixpredicateF\G6=?alwaysyieldstrue[ 59 ];hence,wedonothavetocheckit.Afterthecomputationofthevalueofthematrixpredicatei(1i8),wecompareittothecorre-spondingvalueofthematrixpredicatep(i)ofp.Ifthevaluesareequal,weproceedwiththenextmatrixpredicatei+1.Otherwise,westop,andpyieldsfalse.Ifthereisacoincidencebetweenthecomputedvaluesofallmatrixpredicateswiththecorrespondingvaluesofp'smatrix,pyieldstrue.Thebenetofthisapproachisthatitonlyrequireseightpredicatecharacterizationsandthatthesecharacterizationsarethesameforeachofthentopologicalpredicatesofthesametype 140

PAGE 141

5.2.4.1 ,weshowthatthismethodcanbeevenfurtherimproved. Thegeneralmethodforpredicatedeterminationworksasfollows.BasedonvFandvGasinput,weevaluatethe9IMcharacterizationsofalleightmatrixpredicatesandinserttheBooleanvaluesintoanintersectionmatrixminitializedwithtrueforeachmatrixpredicate.Matrixmisthencomparedagainstthematricespi(1in)ofallntopologicalpredicates.Weknowthatoneofthemmustmatchm.Themeritofthisapproachisthatonlyeightcharacterizationsareneededtodeterminetheintersectionmatrixofthetopologicalpredicate.Butunfortunatelyweneednmatrixcomparisonstodeterminethepertainingtopologicalpredicateintheworstcase.InSection 5.2.4.2 ,weintroduceamethodthateliminatesthisproblem.Butthemethodhereisalreadyasignicantimprovementcomparedwiththenecessitytocomputeallndirectpredicatecharacterizations. 5.6 .ForF2point,wedeneF=?,F=P(F),andF=R2P(F).ForF2line,wedeneF=fp2R2jcard(ff2H(F)jp=dp(f)g)=1g,F=Sf2H(F)pts(f:s)F,andF=R2FF.Aswewillsee,eachcharacterizationcanbeperformedinconstanttime,anditscorrectnesscanbeshownbyasimpleproof.Inthissubsection,wepresentthecharacterizationsforalltypecombinationsexceptforthemorecomplicatedcaseoftworegionobjects;thiscaseisdealtwithinthenextsubsection.ThecentralideaintheproofsofthelemmasbelowistoaccomplishacorrespondencebetweenamatrixpredicatebasedonthepointsetsF, 141

PAGE 142

Incaseoftwopointobjects,the33-matrixisreducedtoa22-matrixsincetheboundaryofapointobjectisdenedtobeempty[ 59 ].Weobtainthefollowingstatement: (i)F\G6=?,vF[poi shared](ii)F\G6=?,vF[poi disjoint](iii)F\G6=?,vG[poi disjoint](iv)F\G6=?,trueProof.In(i),theintersectionoftheinteriorsofFandGisnon-emptyif,andonlyif,bothobjectsshareapoint.Thatis,9f2P(F)9g2P(G):equal(f;g).ThismatchesdirectlythedenitionofvF[poi shared]inDenition 5.1 (i).In(ii),apointofFcanonlybepartoftheexteriorofGifitdoesnotbelongtoG.Thatis,9f2P(F)8g2P(G)::equal(f;g).ThistsdirectlytothedenitionofvF[poi disjoint]inDenition 5.1 (ii).Case(iii)issymmetricto(ii).Case(iv)followsfromLemma5.1.2in[ 59 ].2 (i)F\G6=?,vF[poi on interior](ii)F\G6=?,vF[poi on bound](iii)F\G6=?,vF[poi disjoint](iv)F\G6=?,true(v)F\G6=?,vG[bound poi disjoint](vi)F\G6=?,true

PAGE 143

on interior]inDenition 5.2 (ii).In(ii),theintersectionoftheinteriorofFandtheboundaryofGisnon-emptyif,andonlyif,apointofFcoincideswithaboundarypointofG.Thatis,9f2P(F)9g2B(G):f=g.ButthismatchesthedenitionofvF[poi on bound]inDenition 5.2 (iii).Statement(iii)issatisedif,andonlyif,apointofFisoutsideofG.Thatis,9f2P(F)8g2H(G)::on(f;g:s).ButthisisjustthedenitionofvF[poi disjoint]inDenition 5.2 (i).Statement(iv)alwaysholdsaccordingtoLemma6.1.2in[ 59 ].Tobefullled,statement(v)requiresthataboundarypointofGliesoutsideofF.Thatis,9g2B(G)8f2P(F):f6=g.ThiscorrespondstothedenitionofvG[bound poi disjoint]inDenition 5.2 (iv).ThelaststatementfollowsfromLemma6.1.3in[ 59 ].2 (i)F\G6=?,vF[poi inside](ii)F\G6=?,vF[poi on bound](iii)F\G6=?,vF[poi outside](iv)F\G6=?,true(v)F\G6=?,true(vi)F\G6=?,trueProof.Statement(i)requiresthatapointofFislocatedinsideGbutnotontheboundaryofG.Thatis,9f2P(F):poiInRegion(f;G)(wherepoiInRegionisthepredicatewhichcheckswhetherasinglepointliesinsidearegionobject).ThiscorrespondsdirectlytothedenitionofvF[poi inside]inDenition 5.3 (i).In(ii),theintersectionofFandtheboundaryofGisnon-emptyif,andonlyif,apointofFliesononeoftheboundarysegmentsofG.Thatis, 143

PAGE 144

on bound]inDenition 5.3 (ii).Statement(iii)issatisedif,andonlyif,apointofFisoutsideofG.Thatis,9f2P(F)8(g;ia)2H(G)::poiInRegion(f;G)^:on(f;g:s).ThiscorrespondstothedenitionofvF[poi outside]inDenition 5.3 (iii).Statements(iv)and(v)followfromLemma6.2.3in[ 59 ].ThelaststatementfollowsfromLemma6.2.1in[ 59 ].2 (i)F\G6=?,vF[seg shared]_vF[interior poi shared](ii)F\G6=?,vG[bound on interior](iii)F\G6=?,vF[seg unshared](iv)F\G6=?,vF[bound on interior](v)F\G6=?,vF[bound shared](vi)F\G6=?,vF[bound disjoint](vii)F\G6=?,vG[seg unshared](viii)F\G6=?,vG[bound disjoint](ix)F\G6=?,trueProof.In(i),theinteriorsoftwolineobjectsintersectif,andonlyif,anytwosegmentspartiallyorcompletelycoincideoriftwosegmentsshareasinglepointthatdoesnotbelongtotheboundariesofFandG.Thatis,9f2H(F)9g2H(G):segIntersect(f:s;g:s)_9f2H(F)9g2H(G)8p2B(F)[B(G):poiIntersect(f:s;g:s)^poiIntersection(f:s;g:s)6=p.TherstexpressioncorrespondstothedenitionofvF[seg shared]inDenition 5.4 (i).ThesecondexpressionisthedenitionofvF[interior poi shared]inDenition 5.4 (ii).Statement(ii)requiresthatanintersectionpointpofFandGexistssuchthatpisaboundarypointofGbutnotaboundarypointofF.Thatis,9f2H(F)9g2H(G)9p2B(G)nB(F):poiIntersection(f:s;g:s)=p.ThismatchesthedenitionofvG[bound on interior]inDeni-tion 5.4 (viii).Statement(iii)issatisedif,andonlyif,thereisasegmentofFthatisoutsideof 144

PAGE 145

unshared]inDenition 5.4 (iii).Statement(iv)issymmetrictostatement(ii)andbasedonDenition 5.4 (iv).In(v),theboundariesofFandGintersectif,andonlyif,theyshareabound-arypoint.Thatis,9p2B(F)9q2B(G):p=q.ThismatchesthedenitionofvF[bound shared]inDenition 5.4 (v).Statement(vi)requirestheexistenceofaboundarypointofFthatisnotlo-catedonanysegmentofG.Thatis,9p2B(F)8g2H(G)::on(p;g:s).ThiscorrespondstothedenitionofvF[bound disjoint]inDenition 5.4 (vi).Statement(vii)issymmetrictostatement(iii)andbasedonDenition 5.4 (vii).Statement(viii)issymmetrictostatement(vi)andbasedonDenition 5.4 (ix).ThelaststatementfollowsfromLemma5.2.1in[ 59 ].2 (i)F\G6=?,vF[seg inside](ii)F\G6=?,vF[seg shared]_vF[poi shared](iii)F\G6=?,vF[seg outside](iv)F\G6=?,vF[bound inside](v)F\G6=?,vF[bound shared](vi)F\G6=?,vF[bound disjoint](vii)F\G6=?,true(viii)F\G6=?,vG[seg unshared](ix)F\G6=?,trueProof.In(i),theinteriorsofFandGintersectif,andonlyif,asegmentofFislo-catedinGbutdoesnotcoincidewithaboundarysegmentofG.Thatis,9f2H(F)8g2H(G)::segIntersect(f:s;g:s)^segInRegion(f:s;G).Thiscorrespondstothedeni-tionofvF[seg inside]inDenition 5.5 (i).Statement(ii)requiresthateitherFandGshareasegment,ortheyshareanintersectionpointthatisnotaboundarypointofF.Thatis,9f2H(F)9g2H(G):segIntersect(f:s;g:s)_9f2H(F)9g2H(G):poiIntersect(f:s;g:s)^

PAGE 146

shared]inDenition 5.5 (ii).ThesecondargumentmatchesthedenitionofvF[poi shared]inDenition 5.5 (iv).Statement(iii)issatisedif,andonlyif,asegmentofFislocatedoutsideofG.Thatis,9f2H(F)8g2H(G)::segIntersect(f:s;g:s)^:segInRegion(f:s;G).ThiscorrespondstothedenitionofvF[seg outside]inDenition 5.5 (iii).Statement(iv)holdsif,andonlyif,asegmentofFliesinsideGandoneoftheendpointsofthesegmentisaboundarypoint.Thatis,9f2H(F):poiInRegion(dp(f);G)^dp(f)2B(F).ThiscorrespondstothedenitionofvF[bound inside]inDenition 5.5 (v).In(v),wemustndasegmentofFandasegmentofGwhichintersectinapointthatisaboundarypointofF.Thatis,9f2H(F)9g2H(G):poiIntersect(f:s;g:s)^poiIntersection(f:s;g:s)2B(F).ThismatchesthedenitionofvF[bound shared]inDenition 5.5 (vi).Statement(vi)requirestheexistenceofanendpointofasegmentofFthatisaboundarypointandnotlocatedinsideoronanysegmentofG.Thatis,9f2H(F)8g2H(G)::poiInRegion(dp(f);G)^dp(f)2B(F)^:on(dp(f);g:s).ThiscorrespondstothedenitionofvF[bound disjoint]inDeni-tion 5.5 (vii).Statement(vii)alwaysholdsaccordingtoLemma6.3.2in[ 59 ].Statement(viii)issatisedif,andonlyif,asegmentofGdoesnotcoincidewithanysegmentofF.Thatis,9g2H(G)8f2H(F)::segIntersect(f:s;g:s).ThiststothedenitionofvF[seg unshared]inDenition 5.5 (viii).ThelaststatementfollowsfromLemma6.3.1in[ 59 ].2 5.2.2.6 ,exploringtheregion/regioncaseisquitedifferentfromexploringtheothertypecombinationsandrequiresanotherkindofexplorationalgorithm.Ithastotakeintoaccountthearealextentofbothobjectsandhasresultedintheconceptsofoverlapnumber,segmentclasses,andsegmentclassicationvector.Inthissubsection,wedealwiththe9IMCbasedontwosegmentclassicationvectors.Thegoalofthefollowinglemmasistopreparetheuniquecharacterizationofallmatrixpredicatesbymeansofsegmentclasses.TherstlemmaprovidesatranslationofeachsegmentclassintoaBooleanmatrixpredicateexpression. 146

PAGE 147

5.6 (i)and(ii),theleftsideof(i)isequivalenttotheexpression9f2H(F):pts(f:s)G.ThisisequivalenttoF\G6=?.Theproofof(iii)issimilarandbasedonDenition 5.6 (iii)and(iv);onlythetermGhastobereplacedbyG.Theproofof(ii)canbeobtainedbyswappingtherolesofFandGin(i).Similarly,theproofof(iv)requiresaswappingofFandGin(iii).AccordingtoDenition 5.6 (v)and(vi),theleftsideof(v)isequivalenttotheexpression9f2H(F)9g2H(G):f:s=g:s^((f:ia^g:ia)_(:f:ia^:g:ia)).Fromtherstelementoftheconjunction,wecan(only)concludethatF\G6=?.Equivalencedoesnotholdsincetwoboundariescanalsointersectiftheyonlysharesingleintersectionormeetingpointsbutnot(half)segments.Thesecondelementoftheconjunctionrequiresthattheinteriorsofbothregionobjectsarelocatedonthesameside.Hence,F\G6=?musthold.Alsothisisonlyanimplicationsinceanintersectionofbothinteriorsispossiblewithouthavingany(0=2)-or(2=0)-segments.AccordingtoDenition 5.6 (vii),theleftsideof(vi)isequivalenttotheexpression9f2H(F)9g2H(G):f:s=g:s^((f:ia^:g:ia)_(:f:ia^g:ia)).TherstelementoftheconjunctionimpliesthatF\G6=?.Thesecondelementoftheconjunctionrequiresthattheinteriorsofbothregionobjectsarelocatedondifferentsides.Sincethedenitionoftyperegiondisallows(1=1)-segmentsforsingleobjects,theinteriorofFmustintersecttheexteriorofG,andviceversa.This 147

PAGE 148

148

PAGE 149

poi shared])F\G6=?(ii)F\G6=?)F\G6=?^F\G6=?(iii)F\G6=?)F\G6=?^F\G6=?(iv)F\G6=?)F\G6=?^F\G6=?(v)F\G6=?)F\G6=?^F\G6=?Proof.Statement(i)canbeshownbyconsideringthedenitionofbound poi shared.ThisagistrueifanytwohalfsegmentsofFandGshareasinglemeetingorintersectionpoint.Hence,theintersectionofbothboundariesisnon-empty.Theproofsfor(ii)to(v)requirepointsettopologicalconcepts.Statements(ii)and(iii)followfromLemma5.3.6in[ 59 ].Statements(iv)and(v)resultfromLemma5.3.5in[ 59 ].2 poi shared](vi)F\G6=?,vF[(0=1)]_vF[(1=0)](vii)F\G6=?,vF[(1=2)]_vF[(2=1)]_vF[(1=1)]_vG[(0=1)]_vG[(1=0)](viii)F\G6=?,vG[(0=1)]_vG[(1=0)](ix)F\G6=?,trueProof.For(i),theforwardimplicationcorrespondstoLemma 5.7 (i).ThebackwardimplicationcanbederivedfromLemma 5.6 (v)for(0=2)-and(2=0)-segmentsofF(andG).For 149

PAGE 150

5.6 (iii)and 5.6 (iv)implyF\G6=?andF\G6=?,respectively.Fromthesetwoimplications,byusingLemma 5.8 (iv)and 5.8 (v),wecanderiveinbothcasesF\G6=?.Statements(ii)and(iv)correspondtoLemma 5.6 (iv)and 5.6 (iii),respectively.For(iii)[(vii)],theforwardimplicationcorrespondstoLemma 5.7 (ii)[ 5.7 (iii)].Thebackwardimplicationfor(iii)[(vii)]requiresLemma 5.6 (i)[ 5.6 (ii)]andLemma 5.8 (ii)[ 5.8 (iii)]forthe(0=1)-and(1=0)-segmentsofF[G],Lemma 5.6 (vi)[ 5.6 (vi)]forthe(1=1)-segmentsofF(andhenceG),aswellasLemma 5.6 (iv)[ 5.6 (iii)]andLemma 5.8 (v)[ 5.8 (iv)]forthe(1=2)-and(2=1)-segmentsofG[F].For(v),theforwardimplicationcanbeshownasfollows:iftheboundariesofFandGintersect,theneithertheyshareacommonmeetingorintersectionpoint,thatis,theagvF[bound poi shared]isset,ortherearetwohalfsegmentsofFandGwhosesegmentcomponentsareequal.Nootheralternativeispossibleduetooursplittingstrategyforhalfsegmentsduringtheplanesweep.Asweknow,equalsegmentsofFandGmusthavethesegmentclasses(0=2),(2=0),or(1=1).ThebackwardimplicationrequiresLemma 5.6 (v)for(0=2)-and(2=0)-segmentsofF(andhenceG),Lemma 5.6 (vi)for(1=1)-segmentsofF(andhenceG),andLemma 5.8 (i)forsinglemeetingandintersectionpoints.Statement(vi)[(viii)]correspondstoLemma 5.6 (i)[ 5.6 (ii)].Statement(ix)turnsouttobealwaystruesinceourassumptioninanimplementationisthatouruniverseofdiscourseUisalwaysproperlylargerthantheunionofspatialobjectscontainedinit.ThismeansforFandGthatalwaysF[GUholds.WecanconcludethatU(F[G)6=?.AccordingtoDeMorgan'sLaws,thisisequivalentto(UF)\(UG)6=?.ButthisleadsustothestatementthatF\G6=?.2 5.1 to 5.5 ,andTheorem 5.1 provideuswithauniquecharacterizationofeachindividualmatrixpredicateofthe9-intersectionmatrixforeachtypecombination.Thisapproachhasseveralbenets.First,itisasystematicallydevelopedandnotanadhocapproach.Second,ithasaformalandsoundfoundation.Hence,wecanbesureaboutthecorrectnessoftopologicalfeatureagsandsegmentclassesassignedtomatrixpredicates,andviceversa.Third,thisevaluationmethodisindependentofthenumberoftopologicalpredicatesandonlyrequiresaconstant 150

PAGE 151

Basedonthisresult,weaccomplishthepredicatevericationofatopologicalpredicatepwithrespecttoaparticularspatialdatatypecombinationonthebasisofp's9-intersectionmatrix(asanexample,seethecompletematricesofthe33topologicalpredicatesoftheregion/regioncaseinFigure 5-20 andthecompletematricesfortheremainingcasesin[ 50 ])andthetopolog-icalfeaturevectorsvFandvGasfollows:Dependingonthespatialdatatypecombination,weevaluatethelogicalexpression(givenintermsofvFandvG)ontherightsideoftherst9IMCaccordingtoLemma 5.1 5.2 5.3 5.4 5.5 ,orTheorem 5.1 ,respectively.WethenmatchtheBooleanresultwiththeBooleanvalueattherespectivepositioninp'sintersectionmatrix.IfbothBooleanvaluesareequal,weproceedwiththenextmatrixpredicateinthe9-intersectionmatrix;otherwisepisfalse,andthealgorithmterminates.PredicatepyieldstrueiftheBooleanresultsoftheevaluatedlogicalexpressionsofall9IMCscoincidewiththecorrespondingBooleanvaluesinp'sintersectionmatrix.Thisrequiresconstanttime. 5.1 5.2 5.3 5.4 5.5 ,orTheorem 5.1 ,respectively.ThisyieldsaBoolean9-intersectionmatrix.Inasecondstep,thisBooleanmatrixischeckedconsecutivelyforequalityagainstall9-intersectionmatricesofthetopologicalpredicatesoftheparticulartypecombination.Ifna;bwitha;b2fpoint;line;regiongisthenumberoftopologicalpredicatesbetweenthetypesaandb,thisrequiresna;btestsintheworstcase. 151

PAGE 152

5.2.4.1 delineatesanovelmethodcalledmatrixthinningforspeedinguppredicateverication.Section 5.2.4.2 describesane-tunedmethodcalledminimumcostdecisiontreeforacceleratingpredicatedetermination. Thequestionariseshowthe9-intersectionmatricescanbesystematicallythinnedoutandneverthelessremainuniqueamongthena;btopologicalpredicatesbetweentwospatialdatatypesaandb.Weuseabrute-forcealgorithm(Figure 5-16 )thatisapplicabletoalltypecombinationsandthatdeterminesthethinnedoutversionofeachintersectionmatrixassociatedwithoneofthena;btopologicalpredicates.Sincethisalgorithmonlyhastobeexecutedonceforeachtypecombination,runtimeperformanceandspaceefciencyarenotsoimportanthere. Inarststep(lines8to10),wecreateamatrixposofso-calledpositionmatricescorre-spondingtoallpossible9-intersectionmatrices,thatis,tothebinaryversionsofthedecimalnumbers1to511ifwereadthe9-intersectionmatrix(9IM)entriesrowbyrow.Eachinapositionmatrixindicatesapositionorentrythatislaterusedforcheckingtwointersectionmatricesagainsteachother.Ainapositionmatrixmeansthatthecorrespondingentriesintwocomparedintersectionmatricesarenotcomparedandhenceignored. 152

PAGE 153

Figure5-16. Algorithmforcomputingthethinnedoutversionsofthena;bintersectionmatricesassociatedwiththetopologicalpredicatesbetweentwospatialdatatypesaandb

PAGE 154

Inathirdstep,weinitializetheentriesofallna;bthinnedoutintersectionmatriceswiththedon'tcaresymbol. Thefourthandnalstepcomputesthethinnedoutmatrices(lines15to33).Theideaistondforeachintersectionmatrix(line15)aminimalnumberofentriesthattogetheruniquelydifferfromthecorrespondingentriesofalltheotherna;b1intersectionmatrices.Therefore,westarttraversingthe511positionmatrices(line17).Forall-positionsofapositionmatrixwendoutwhetherfortheintersectionmatrixunderconsiderationanotherintersectionmatrixexiststhathasthesamematrixvaluesatthesepositions(lines20to21).Aslongasnoequalityhasbeenfound,theintersectionmatrixunderconsiderationiscomparedtothenextintersectionmatrix(lines19to23).Ifanequalityisfound,thenextpositionmatrixistaken(line30).Otherwise,wehavefoundaminimalnumberofmatrixpredicatesthataresufcientanduniqueforevaluation(line24).Itremainstocopythecorrespondingvaluesofthe9-intersectionmatrixintothethinnedoutmatrix(lines25to28). Completeandthinnedoutmatricesforthe5topologicalpredicatesofthepoint/pointcase. Notethatforthesameintersectionmatrixitmaybepossibletondseveralthinnedoutmatriceswiththesamenumberofmatrixpredicatestobecheckedsuchthateachofthemrepresentstheintersectionmatrixuniquelyamongthena;bintersectionmatrices.Ouralgorithmalwayscomputesthethinnedoutmatrixwiththelowestnumericalvalue.Thecompleteand 154

PAGE 155

Completeandthinnedoutmatricesforthe14topologicalpredicatesofthepoint/linecase. Completeandthinnedoutmatricesforthe7topologicalpredicatesofthepoint/regioncase. thinnedoutmatricesforthepoint/pointcaseareshowninFigure 5-17 ,forthepoint/linecaseinFigure 5-18 ,forthepoint/regioncaseinFigure 5-19 ,andfortheregion/regioncaseinFigure 5-20 .Thecompleteandthinnedoutmatricesfortheline/linecaseandtheline/regioncasecanbefoundin[ 50 ].Denition 5.7 denesthemeasuresweusetosummarizeandinterprettheseresults. Completeandthinnedoutmatricesforthe33topologicalpredicatesoftheregion/regioncase. 155

PAGE 156

(i)cnt(IMMT)=jf(l;m)j1l;m3;IMMT[l;m]2f0;1ggj(ii)nka;b=jfIMMTij1ina;b;1k9;cnt(IMMTi)=kgj(iii)na;b=9k=1nka;b(iv)Ca;b=8na;b(v)ACa;b=Ca;b=na;b=8(vi)CMTa;b=9k=1knka;b(vii)ACMTa;b=CMTa;b=na;b(viii)RACMTa;b=100ACMTa;b=ACa;b=100CMTa;b=Ca;b 5-3 showsasummaryoftheresultsandinthelasttwocolumnstheconsiderableperformanceenhancementofmatrixthinning.Thereductionofmatrixpredicatecomputationsrangesfrom27%fortheline/linecaseto75%forthepoint/pointcase. Table5-3. Summaryofcompleteandthinnedout9IMsforthetopologicalpredicatesofalltypecombinations. 2 3 4 5 6 7 8 9 1 3 1 0 0 0 0 0 0 40 8 10 2.00 25.00 0 0 2 12 4 50 12 2 0 656 8 474 5.78 72.26 0 6 6 10 11 0 0 0 0 264 8 125 3.79 47.35 0 0 6 8 0 0 0 0 0 112 8 50 3.57 44.64 0 3 4 0 0 0 0 0 0 56 8 18 2.57 32.14 0 0 5 18 12 7 1 0 0 344 8 196 4.56 56.98 156

PAGE 157

5.2.3 ,wehaveseenthat,intheworstcase,na;bmatchingtestsareneededtodeterminethetopologicalrelationshipbetweenanytwospatialobjects.Foreachtest,Booleanexpressionshavetobeevaluatedthatareequivalenttotheeightmatrixpredicatesandbasedontopologicalfeaturevectors.Weproposetwomethodstoimprovetheperformance.Therstmethodreducesthenumberofmatrixpredicatestobeevaluated.ThisgoalcanbedirectlyachievedbyapplyingthemethodofmatrixthinningdescribedinSection 5.2.4.1 .Thatis,thenumberna;boftestsremainsthesamebutforeachtestwecanreducethenumberofmatrixpred-icatesthathavetobeevaluatedbytakingthethinnedoutinsteadofthecomplete9-intersectionmatrices. Thesecondmethod,whichwillbeourfocusinthissubsection,aimsatreducingthenumberna;boftests.Thismethodisbasedonthecomplete9-intersectionmatricesbutalsomanagestoreducethenumberofmatrixpredicatesthathavetobeevaluated.Weproposeaglobalconceptcalledminimumcostdecisiontree(MCDT)forthispurpose.Thetermglobalmeansthatwedonotlookateachintersectionmatrixindividuallybutconsiderallna;bintersectionmatricestogether.Theideaistoconstructafullbinarydecisiontreewhoseinnernodesrepresentallmatrixpredicates,whoseedgesrepresenttheBooleanvaluestrueorfalse,andwhoseleafnodesarethena;btopologicalpredicates.Notethat,inafullbinarytree,eachnodehasexactlyzeroortwochildren.Forsearching,weemployadepth-rstsearchprocedurethatstartsattherootofthetreeandproceedsdowntooneoftheleaveswhichrepresentsthematchingtopologicalpredicate.Theperformancegainthroughtheuseofadecisiontreeissignicantsincethetreepartitionsthesearchspaceateachnodeandgraduallyexcludesmoreandmoretopologicalpredicates.Inthebestcase,ateachnodeofthedecisiontree,thesearchspace,whichcomprisestheremainingtopologicalpredicatestobeassignedtotheremainingleavesofthenode'ssubtree,ispartitionedintotwohalvessothatweobtainaperfectlybalancedtree.ThiswouldguaranteeasearchtimeofO(logna;b).Butingeneral,wecannotexpecttoobtainabisectionoftopologicalpredicatesateachnodesincethenumberoftopologicalpredicatesyieldingtrueforthenode's 157

PAGE 158

Ifwedonothavespecicknowledgeabouttheprobabilitydistributionoftopologicalpredicatesinanapplication(area),wecanonlyassumethattheyoccurwithequaldistribution.Butsometimeswehavemoredetailedinformation.Forexample,incadastralmapapplications,anadequateestimateisthat95%(orevenmore)ofalltopologicalrelationshipsbetweenregionsaredisjointandtheremaining5%aremeet.OuralgorithmforconstructingMCDTsconsidersthesefrequencydistributions.Itisbasedonthefollowingcostmodel: Figure 5-21 showsourrecursivealgorithmMCDTforcomputingaminimumcostdecisiontreeforasetimofna;b9-intersectionmatricesthatareannotatedwithaweightrepresentingthecorrespondingpredicates'sprobabilityofoccurrence,asitischaracteristicinaparticular 158

PAGE 159

node:=new node();stop:=false;07discriminator:=select rst(mp);08whilenoteol(mp)andnotstopdo09node:=new node();10node.discr:=discriminator;node.im:=im;11ifno of elem(im)=1then/*leafnode*/12best node:=node;best node.cost:=0;13stop:=true;14else15/*Letim=h(imk1;wk1);:::;(imkn;wkn)i16with1k1:::knna;b.*/17partition(im,discriminator,iml,imr);18ifno of elem(iml)6=0and19no of elem(imr)6=0then20copy(mp,new mp);del(new mp,discriminator);21node.lchild:=MCDT(iml,new mp);22node.rchild:=MCDT(imr,new mp);23node.cost:=node.lchild.cost+node.rchild.cost24+kni=k1wi;25ifnode.cost
PAGE 160

nodecreatesanewtreenodenode(line9).Thematrixpredicatediscriminatoraswellasthelistimannotatethetreenodenode(line10).Ifimhasonlyoneelement(line11),weknowthatnodeisaleafnoderepresentingthetopologicalpredicatepertainingtothesingleelementinim.Thecostforthisleafnodeis0sinceitscurrentdepthis0(line12).Otherwise,ifimconsistsofmorethanoneelement,wepartitionitintotwolistsimlandimr(line17).Thepartitioningisbasedonthevaluesofeach9-intersectionmatrixinimwithrespecttothematrixpredicateservingasthediscriminator.Ifsuchavalueis0(false),thecorresponding9-intersectionmatrixisaddedtothelistiml;otherwise,itisaddedtothelistimr.Aspecialcasenowisthatimhasnotbeenpartitionedsothateitherimlorimrisempty(conditioninlines18to19yieldsfalse).Inthiscase,thediscriminatordoesnotcontributetoadecisionandisskipped;thenextdiscriminatorisselected(line28).Ifbothlistsimlandimrarenonempty(lines18to19),weremovethediscriminatorfromanewcopynew mpofthelistmp(line20)andrecursivelyndtheminimumcostdecisiontreesforthe9-intersectionmatricesiniml(line21)andinimr(line22).Eventually,allrecursionswillreachallleafnodesandbeginreturningwhilerecursivelycalculatingthecostofeachsubtreefound.Thecostofaleafnodeis0.Thecostofaninnernodenodecanbeexpressedintermsofthecostofitstwononemptysubtreesnode.lchildandnode.rchildprocessingthelistsimlandimrrespectively.Thedepthofeachleafnodewithrespecttonodeisexactlyonelargerthanthedepthofthesameleafnodewithrespecttoeithernode.lchildornode.rchild.Therefore,besidesthecostsofthesetwosubtrees,foreachleafnodeofthesubtreewithrootnode,wehavetoaddtheleafnode'scost(weight)onetime(lines23to24).Theseweightsarestoredinnode.im.Thecostofnodeisthencomparedwiththebestcostdeterminedsofar,andtheminimumwillbethenewbestoption(lines25to26).Eventually,whenallthematrixpredicateshavebeenconsidered,weobtainthebestchoiceandreturnthecorrespondingminimumcostdecisiontree(line31). Table 5-4 showstheresultsofthisalgorithmbygivingatextualpre-order(depth-rstsearch)encodingofallMCDTsforalltypecombinationsonthebasisofequalprobability 160

PAGE 161

MCDTpre-orderrepresentationsforalltypecombinationsonthebasisofequalprobabilityofoccurrenceofalltopologicalpredicates. MCDTpre-orderrepresentation 3446474836373856 30313263646566676869 13789151614171821 17222324252930313839 5-17 5-18 5-19 and 5-20 aswellasin[ 50 59 ]. Figures 5-22 showsavisualizationoftheMCDTsofthreespatialdatatypecombinationsontheassumptionthatalltopologicalpredicatesoccurwithequalprobability.TheMCDTsfortheothertypecombinationshavebeenomittedduetotheirverylargesize.Eachinnernodeis 161

PAGE 162

Thefollowingdenitionspeciesmeasuresthatweusetosummarizeandinterprettheseresults.Weareespeciallyinterestedintheaveragenumberofmatrixpredicatestobeevaluated. 3 5 3 AB 5 7 AB 2 4 6 AB 8 10 12 14 Figure5-22. Minimumcostdecisiontrees.A)Forthe5topologicalpredicatesofthepoint/pointcase.B)Forthe7topologicalpredicatesofthepoint/regioncase.C)Forthe14topologicalpredicatesofthepoint/linecaseundertheassumptionthatalltopologicalpredicatesoccurwithequalprobability. 5.8 .Letna;bwitha;b2fpoint2D;line2D;region2Dgbethenumberof9IMsofthetopologicalpredicatesbetweenthetypesaandb,IMiwith1ina;bbea9IM,anddka;bbethe 162

PAGE 163

(i)dka;b=jfIMij1ina;b;1k9;depth(IMi;Ma;b)=kgj(ii)na;b=9k=1dka;b(iii)Ca;b=8na;b(iv)ACa;b=4(na;b+1)(v)ACMCDTa;b=CMCDTa;b=na;b(vi)RACMCDTa;b=100ACMCDTa;b=ACa;b 5-5 showsasummaryoftheresultsandinthelasttwocolumnstheconsiderableperformanceenhancementofminimumcostdecisiontrees.Thereduc-tionofmatrixpredicatecomputationsrangesfrom90%forthepoint/pointcaseto98%fortheline/linecase. TheMCDTapproachissimilartoatechniqueintroducedin[ 10 ]fortopologicalpredicatesbetweensimpleregions.However,theirmethodofdeterminingabinarydecisiontreerestsonthethinnedout9-intersectionmatricesandresultsinanearoptimalalgorithmandsolution.Thereasonwhyoptimalityisnotachievedisthatatopologicalpredicatecanhavemultiple,equipollentthinnedoutmatrices,thatis,thinnedoutmatricesarenotunique.Therefore,usingaspecicsetofthinnedoutmatricesasthebasisforpartitioningthesearchspacecanonlyleadtoanoptimaldecisiontreeforthissetofthinnedoutmatricesandmaynotbeoptimalinthegeneralcase.Ouralgorithmrestsonthecomplete9-intersectionmatrices.Itproducesanoptimal 163

PAGE 164

SummaryoftheMCDTsforalltypecombinationsonthebasisofequalprobabilityofoccurrenceofalltopologicalpredicates. 2 3 4 5 6 7 8 9 0 3 2 0 0 0 0 0 0 40 24 12 2.40 10.00 0 0 0 0 0 48 30 4 0 656 332 530 6.46 1.95 0 0 0 3 22 8 0 0 0 264 136 170 5.15 3.79 0 0 2 12 0 0 0 0 0 112 60 54 3.86 6.43 0 1 6 0 0 0 0 0 0 56 32 20 2.86 8.94 0 0 0 3 15 19 6 0 0 344 176 243 5.65 3.21 10 ].Ouralgorithmproducesanoptimaltreewiththetotalcostof2:13whiletheso-calledrenedcostmethodin[ 10 ],whichusesthinnedoutmatrices,producesatreewiththetotalcostof2:16. WecanobservethefollowingrelationshipbetweenMCDTsandthinnedoutmatrices: 5-5 )isgreaterthanorequaltothetotalcostofallitsthinnedoutmatrices(giveninTable 5-3 ),thatis,

PAGE 165

5.5 .Aqualitativeassessment,performancestudyandanalysisofthisimplementationispresentedinSection 6.1 .Here,wespecifyasetoffunctioninterfacesforourtopologicalpredicateimplementationsothattheycanbeusedtosupportourspatiotemporalpredicateimplementationtobedescribedinthenextsection. ThetopologicalpredicateimplementationprovidesthreespecicinterfacemethodsTopPredExploration,TopPredVerication,andTopPredDeterminationandoneuniversalinterfacemethodTopPredforprovidingthefunctionalityoftheexplorationphaseandtheevaluationphaseaswellasthecombinedeffectofbothphases.ThemethodTopPredExplorationexploresthetopologicaldataofinterestfortwointeractingspatialobjects.Thisinterfaceisoverloadedtoaccepttwospatialobjectsofanytypecombinationasinput.Dependingontheinputobjecttypes,itexecutesoneofthesixplanesweepbasedexplorationalgorithmsfromSection 5.2.2 .Theoutputconsistsoftwotopologicalfeaturevectorswhichholdtherelevanttopologicalinformationforbothargumentobjects. ThemethodsTopPredVericationandTopPredDeterminationhandlepredicatevericationandpredicatedeterminationqueriesrespectively.Bothinterfacesareoverloadedandtaketwotopologicalfeaturevectorsasinput.Bothmethodsleveragethegeneralevaluationmethodof9-intersectionmatrixcharacterizationfromSection 5.2.3 .TheinterfacemethodTopPredVeri-cationtakesapredicateidenticationnumberasanadditionalinputparameter.Itcorrespondstothematrixnumber(speciedin[ 59 ]andusedinFigures 5-17 to 5-19 and 5-20 )ofthetopo-logicalpredicatetobeevaluated.ThemethodimplementstheoptimizedevaluationtechniqueofmatrixthinningfromSection 5.2.4 .TheoutputistheBooleanvaluetrueifthetopologicalrelationshipbetweenthetwospatialobjectscorrespondstothespeciedpredicate;otherwise,thevalueisfalse.TheinterfacemethodTopPredDeterminationimplementstheoptimizedevaluationtechniqueofminimumcostdecisiontreesfromSection 5.2.4 andoutputsthematrixnumberof 165

PAGE 166

TheuniversalinterfacemethodTopPredisoverloadedtoaccepttwospatialobjectsofanytypecombinationandanoptionalpredicateidenticationnumberasinput.Iftheoptionalargumentisspecied,ittriggersapredicatevericationprocessbyinvokingTopPredExplorationfollowedbyTopPredVericationandreturnsaBooleanvalueasaresult.Otherwise,apredicatedeterminationprocessistobeexecuted,andthusitinvokesTopPredExplorationfollowedbyTopPredDeterminationandreturnsapredicateidenticationnumbercorrespondingtothetopologicalrelationshipbetweenthetwospatialobjects.Thisuniversalinterfacewillbeusedinthenextsectiontoleveragethesupportforourspatiotemporalpredicateimplementation. 2.2 and[ 22 ]).Toformulateaspecicalgorithmforeachnewlyconstructedpredicatewouldthusbeveryinefcientandtroublesome.Hence,theideaistodeviseagenericalgorithmicschemethatcanbeleveragedforqueryevaluationandthatisapplicablealsotodevelopmentswhichhavesofarnotbeendened. 22 ]. 166

PAGE 167

Duetoourslicedrepresentationofmovingobjectsasasequenceofunits,froma3Dperspectiveauregionvaluecorrespondstoaunitvolume,aulinevaluetoaunitsurface,andaupointvaluetoaunitcurve.Togetherwithsomeoptimizations,aspatiotemporalquerypredicatecanbeevaluatedbyarenedalgorithmicschemeincludingthefollowingsteps: 1.Time-synchronizedintervalrenement:Sincetheunitintervalsofbothoperandobjectsareusuallyincompatible,meaningthatthestartandendpointsoftheintervalsoftherstoperandoftendonotcoincidewithanystartandendpointsoftheintervalsofthesecondoperand,anintervalrenementhastobecomputedcoveringallstartandendpointsofunitintervalsofbothoperands.Anoptimizationisbasedonthefactthataspatiotemporalpredicateisonlydenedattimeinstantsandduringperiodsinwhichbothoperandobjectsaredened.Hence,thosetimeintervalscanbeskippedinwhichonlyoneoftheoperandsisdened 167

PAGE 168

2.Function-valuedintervalrenement:Eachpairofmatchingunitsinbothobjectshaspossiblytobefurtherreneddependingontheevolutionsrepresentedbythetwounitfunctions.Thisisthecaseifboth3Dunitobjectsintersectortoucheachotherandthuschangetheirtopologicalrelationship.Asaresult,wewillhavecomputedthenestintervalgranularityneededforthedeterminationofthetopologicalrelationshipbetweentwomatchingunits. 3.Developmentdetermination:Foreachpairofmatchingunitswenowdeterminetheunique,basicspatiotemporalpredicate(periodpredicate)ortopologicalrelationship(instantpredicate).Wethensequentiallycollectthetopologicalrelationshipsofallmatchingunitsandintotalobtainthedevelopmentofthetwooperandobjectsofthespatiotemporalquerypredicate. 4.Patternmatchingwithquerypredicate:Thisstepincludesapatternmatchingprocessbetweenthedevelopmentcomputedandthequerypredicateaskingforevaluation.ItresultsinoneoftheBooleanvaluestrueorfalse.Notethatthisstepisnotrequiredforaquerytodeterminethedevelopment. Toenhancethecomprehensibilityofthealgorithmicscheme,wehavedeliberatelydelin-eateditsstepsinaconsecutiveandseparatedmanner.Forexample,steps2and3caneasilybecombinedbecauseduringthecomputationoftheintersectionoftwo3Dunitobjects(step2)thespatiotemporalpredicatescanbedirectlyderived(step3).Evenacompletelyinterleavedexecutionofthealgorithmicstepsispossiblesincesteps1to4canbenested.Thisleadstoaslightincreaseinthealgorithmiccomplexitybutisalittlefasterbyaconstantfactor,althoughitdoesnotchangetheruntimecomplexity,aswewillseelater. Thealgorithmicschemeisindependentofthepredicatesequenceofthedevelopmentinducedbytheoperandobjectsofthequerypredicate,anditalsodoesnotdependonthequerypredicateitself.Steps1and4aregenericinthesensethattheydonotdependonthetypesoftheoperandobjects.Forsteps2and3,typecombination-specicintersectiondetectionalgorithmsandtypecombination-specictopologicalpredicatedeterminationareneededrespectively. Thefactthatweemployasinglealgorithmicschemeforcomputingallspatiotemporalpred-icatesnecessitatesandimpliesthattheirevaluationprocedureduringqueryprocessingisdifferent 168

PAGE 169

22 ]).Instep4,suchaquerystringpatternisthenmatchedagainsttheactualdevelopmentoftwomovingobjectsunderconsideration,whichisalsorepresentedbyastring. Inthefollowing,wedescribeaversionofthealgorithmicscheme,calledSTPredEvaluator(Figure 5-23 ),whererststep1,thensteps2and3together,andnallystep4areexecutedconsecutively.ThestartingpointisagivenspatiotemporalquerypredicateQ(mo1;mo2)appliedtotwomovingobjectsmok2fmapping(upoint);mapping(uline);mapping(uregion)gwithk2f1;2g.WeassumethattheDBMSrstchecksandkeepsintheagqwcwhetherQcontainseithertheinstantpredicatetrueorperiodpredicateTrue.Thesepredicatesaredenedasakindofwildcardpredicatestoexpressdon'tcarepartsofdevelopmentsincasethatadevelopmentisonlypartiallydened. Firstweperformaprecheckingontheinputobjects.Incasethatoneoftheoperandobjectsisempty,ortheirlifespansdonotintersect(operationTIntersects),wereturnfalseastheresult.Allcheckscanbedoneinconstanttime,exceptforthelifespancheckwhichtakesO(d1+d2)timeifd1andd2denotethenumbersofintervalsofls1andls2.Notethatcheckingtheirprojectionboundingboxesfordisjointednessisnotsufcienttoreturnafalsevaluehereiftheyaredisjoint.ThisisbecausethepredicatesdisjointandDisjointarealsorelationshipsthatcanbeaskedtobeevaluated.Furthermore,therearealsodifferenttypesofdisjointrelationshipsbetweencomplexobjectsasidentiedin[ 59 ]. 169

PAGE 170

pbb1;:::iandmo2=hn;ls2;obj pbb2;:::i,topologicalstringpatternQthathastobecheckedwithrespecttomo1andmo2,agqwcindicatingwhetherQincludeswildcardstrueorTrueoutput:trueifQmatchesactualdevelopment;false,otherwisebeginifn=0orm=0ornotTIntersects(ls1;ls2)thenreturnfalseelseRenedIntervals:=TimeSynchronizeIntervals(mo1;mo2);(ObjectsDevelopment,owc):=FunctionValuedRenement(RenedIntervals);returnPatternMatching(Q,qwc,ObjectsDevelopment,owc)endifendSTPredEvaluator. Figure5-23. Spatiotemporalpredicateevaluatoralgorithm. ThealgorithmTimeSynchronizeIntervalsyieldsasequenceofmatchingunitswithconcor-dant,possiblyreducedunitintervals.AswewillseeinSection 5.3.2 ,itsruntimecomplexityisO(n+m+b)wherenandmarethenumbersofunitintervalsofmo1andmo2,respectively,andbisthenumberofmatchingunitintervals. ThealgorithmFunctionValuedRenementfurtherrenesthissequencedependingontheunitfunctions;itreturnstheso-calledobjectdevelopmentandabooleanagindicatingtheexistenceofthewildcardstrueorTrueintheunitdevelopment.InSection 5.3.3 ,wewillshowthatthistakesO(bnmax(z2max+lognmax))wherezmaxisthemaximumnumberofmovingunitsegmentsormovingunitsinglepoints(bothalsoknownasunitelements)inaunitofmo1andmo2andnmaxisthemaximumnumberofchangesinthetopologicalrelationshipsbetweenunitelementsofmatchingunits. ThealgorithmPatternMatchingchecksthequerystringandtheactualobjectdevelopmentstringformatchingpattern.Theagsqwcandowcindicatewhetherthecorrespondingstringscontainwildcards.InSection 5.3.4 ,wewillshowthatforthecasethatbothstringsdonotcomprisewildcardsthisrequiresO(v+w)timewherevandwarethelengthsofthestrings. Finally,theruntimecomplexityofthealgorithmSTPredEvaluatoristhesumoftheruntimecomplexitiesofitssubalgorithms. 170

PAGE 171

5-24 ).Butduetoreasonsofefciency,wewillnotcopymatchingpartsandconstructtworeducedmovingobjects.Instead,wewilltakeanadditionalintervalsequencedatastructureandonlystorecommonintervalswithpointerstothematchingunitsofthetwomovingobjectsforlateruse. Figure5-24. Time-synchronizedrenementoftwounitintervalsequences:twosetsoftimeintervalsontheleftside,andtheirrenementpartitionfordevelopmentevaluationontherightside. Theimplementationoftheparallelscanthroughtheunitintervalsequencesofbothmovingobjectsturnsouttobenotsotrivialasitseemsatrstglance.Forexample,thedeploymentofAllen'sthirteendifferenttemporalpredicates[ 1 ],whichuniquelycharacterizethepossibletopologicalrelationshipsbetweentwointervals,isfeasiblebutleadstoalargenumberofcasedistinctionsandpredicateevaluationsthatmakeacompletetreatmenterror-proneandlengthy.Ourapproachleadstoshorter,faster(byaconstantfactor),andmorecomprehensiblecodeandisabletohandleclosed,half-open,andopenintervals.Itcollectsthestartandendpointsoftheintervalsofbothobjectsintemporalorderandthendeterminestheintersectionintervals.Inthefollowingalgorithm(Figure 5-25 ),thenotationhidenotestheemptysequence,sequenceconcatenation,thefunctioneostestswhethertheendofasequencehasbeenreached,the 171

PAGE 172

Figure5-25. Time-synchronizedintervalrenementalgorithm. 172

PAGE 173

Instep1ofthealgorithm,inthecasewheret1andt2coincide,eachofbothtimeinstantsmayindicatealeft-closed([),left-open((),right-closed(]),orright-open())interval.Thisresultsin16possiblecombinationsforbothtimeinstants.ForeachcombinationwehavetodecidetheorderofthetwotimeinstantsinthelistTListofintervalendpoints.Thisisneededinstep2ofthealgorithmtodeterminetherenedintervalsand,inparticular,todetecttimeintervalswhichhavedegeneratedtotimeinstants.ThedecisionprocessisillustratedinTable 5-6 whichinthersttwolineslistsallcombinationsofclosedandopen,leftandrightintervalendpointsandwhichinthethirdlinedeterminestheirorder.Thenotation,2meanst1mustprecedet2,,1meanstheinverse,andj2meansthattheorderisarbitrary. Table5-6. Intervalendpointordering. [ [ [ ] ] ] ] ( ( ( ( ) ) ) )t2 ] ( ) [ ] ( ) [ ] ( ) [ ] ( ) 1,2 1,2 2,1 2,1 1j2 1,2 2,1 2,1 2,1 1j2 2,1 1,2 1,2 1,2 1j2 Duetoatmost2(n+m)differentintervalendpoints,theruntimecomplexityforstep1isO(n+m)wherenandmarethenumbersofintervalsofmo1andmo2,respectively.WenowpresentthealgorithmNextforthenextoperation(Figure 5-26 )whichpositionsonthenexttimeinstantoftheunitintervalsequenceofoneofbothmovingobjectsandwhichneedsO(1)time. Instep2ofthealgorithm,thetemporallyorderedlistofallintervalleftandrightendpointsistraversedfordeterminingtheintersectionintervals.Thisisdonebycomputingoverlapnumbers(seeSection 5.2.1.2 ,hereappliedtotheone-dimensionalcase)indicatingthenumberofintervalscoveringatimeinstant.Onlytimeinstantsandintervalswithoverlapnumber2belongtotheresult.Theruntimecomplexityforstep2andalsoforthewholealgorithmTimeSynchronizeIntervalsisO(n+m+b)(=O(n+m)sincebn+m)wherebistheascertainednumberofmatchingunitintervals. 173

PAGE 174

Figure5-26. 5-27 ).Wedonotstorethisfurtherrenementexplicitlybutonlymakeourconclusionswithrespecttothedevelopmentintherespectiveunit. Figure5-27. IntersectingunitsegmentsoftwomovingpointsrepresentingthedevelopmentDisjoint.meet.Disjointandthusrequiringafurtherintervalrenement. Wealsohavetotakeintoaccountthatpartsofthewholedevelopmenttobecomputedmaybeundened.Hence,twoconsecutivetimeintervalsmaybeseparatedbytemporalgaps.In 174

PAGE 175

5-28 Figure5-28. Function-valuedintervalrenementalgorithm. Foreachrenedinterval,wedeterminetheunitdevelopmentofthecorrespondingunitsofthetwomovingobjectsbycallingtheUnitIntersectalgorithm.Thisalgorithmreturnstheunitdevelopmentspeciedbythetwo3Dunitobjects.ThealgorithmaredescribedinFigure 5-29 .It,inparticular,havetotakecareofthedegeneratecasethattheunitintervalisatimeinstant.ThefunctionNormalizeDevtransformsthecomputeddevelopmentintodevelopmentnormalform(see[ 22 ])andsimultaneouslycheckswhetherthedevelopmentcontainsthewildcardstrueorTrue. InthealgorithmUnitIntersect,thetermeval(vj;t)denotesanevaluationfunctionthatisappliedtotheunitfunctionvjforunitjattimet.Thisfunctionyieldsa2Dspatialobject.ThefunctionInstantPredandPeriodPredannotatesatopologicalpredicateidenticationnumber 175

PAGE 176

pbbp;unit pbbq)then//TakeasampleathalfwayoftheintervaltodeterminethetypeofdisjointreturnPeriodPred(TopRel(eval(vp;(l+r)=2);eval(vq;(l+r)=2)))else//Step1:Computecontactsbetweenanypairofmovingunitsegmentsand/or//movingunitsinglepoints(unitelements)TList:=hl;ri;foreachiin1:::z1do//z1isthenumberofunitelementsoftherstunitforeachjin1:::z2do//z2isthenumberofunitelementsofthesecondunit(c;t1;t2):=Contact(vp;i;vq;j);//ithresp.jthunitelementofvpresp.vqifcthenTList:=TListht1i;TList:=TListht2iendifendforendfor;//Step2:Sortlistoftimeinstants(events)andremoveduplicatesTList:=sort(TList);TList:=rdup(TList);//Step3:EvaluateTList(weassumeithasnelements)anddeterminedevelopmentUnitDevelopment:=;iflcthenUnitDevelopment:=InstantPred(TopRel(olp;olq))endifforeachjin2:::ndo//Takeasampleatatimebetweentj1andtjtp:=TopRel(eval(vp;(tj1+tj)=2);eval(vq;(tj1+tj)=2));UnitDevelopment:=UnitDevelopmentPeriodPred(tp);//Determinethetopologicalrelationshipattjiftj
PAGE 177

Thetimeinstantswhentwounitelementsstartandstoptointersectormeeteachotherrepresenttopologicaleventssincetheyindicatepossiblechangesoftopologicalrelationshipsbetweenthetwounits.Thatis,alocalchangeofthetopologicalrelationshipbetweentwounitelementsdoesnotnecessarilyimplyaglobalchangeinthetopologicalrelationshipofthetwounitsofthemovingobjects.Thisdependsonthedenitionofthetopologicalpredicates(Section 2.1.2 and[ 39 42 ]).Forexample,iftwocomponentsoftwouregionvaluesoverlapforsomeperiodwithinthecommonunitinterval,alocalchangeofthetopologicalrelationshipoftwoothercomponentsfromDisjointtomeetinthesameperiodwillnothaveaglobaleffectonthetopologicalrelationshipofthetwouregionvalues;itisstillOverlap.Thetopologicalrelationshipoftwounitelementsdoesnotchangebetweenthestarttimeandendtimeoftheircontact.Forallpairsofunitelements,thefunctionContactreturnsatriple(c;t1;t2)wherecisaagwhichindicateswhetherbothunitelementsintersectortouchormeet,i.e.,contact,eachother.Thevaluest1andt2arethestartandendtimesofacontactwhicharestoredinalistforfurtherprocessing.Theexactnatureofthecontactisnotrelevanthere,becauseitisonlyalocaleventandhastobegloballyevaluatedanyway. Inasecondstep,thelistoftimeinstantsobtainedfromtherststepissorted(functionsort),andduplicatesareremoved(functionrdup). Inathirdstep,thelistTListoftopologicaleventsisevaluatedandtheunitdevelopmentisdetermined.Sinceatemporalunitvaluecanconsistofseveralcomponents,thecomponentsoftwounitvaluesmaybespatiallyarrangedinmanydifferentwaysandthusleadtomanydifferentunitdevelopments.Therefore,weemploythefollowingglobalalgorithmicstrategy:WeapplythealgorithmTopReltoalltimeinstantsofTListandhenceobtainthetopologicalrelationshipsatthesetimes.Weknowthatthetopologicalbehaviorbetweentwoconsecutivetimeinstantst1andt2inTListisconstantbecauseatopologicalchangewouldotherwiseentailacontactsituationat 177

PAGE 178

ThecomputationofthespatialobjectattimeslandratthebeginningofthealgorithmtakestimeO(z1logz1)andO(z2logz2),respectively,wherez1andz2denotethenumberofunitelementsofthetwounits.Hence,thealgorithmTopRelrequirestimeO((z1+z2)log(z1+z2)).Step1includestwonestedloopsexecutingthefunctionContact,whichrunsinconstanttime.Intotal,thissteprequiresO(z1z2)time.Step2needsO(nlogn)timeforsortingthenelementsofTListandremovingtheduplicates.Step3computesapproximatelyntimesthefunctionTopRel,whichrequiresO(n(z1+z2)log(z1+z2))time.Hence,thealgorithmUnitIntersectneedstimeO(z1z2+nlogn+n(z1+z2)log(z1+z2)).Withz=max(z1;z2),thisisequaltoO(z2+nlogn+nzlogz)=O(n(z2+logn)).Inthiscase,thisleadstoaruntimecomplexityofO(bnmax(z2max+lognmax))forthealgorithmFunctionValuedRenementwherebisthenumberofmatchingunitintervals,zmaxisthemaximumnumberofunitelementsinaunitofbothmovingobjects,andnmaxisthemaximumnumberofchangesinthetopologicalrelationshipsbetweenunitelementsofmatchingunits. 178

PAGE 179

Thestringmatchingproblemcanariseinfourvariantswithdifferentalgorithmicandruntimecomplexitiesdependingontheexistenceofthewildcardstrue(t)andTrue(T)inthedevelopmentstringand/orthequerystring.First,boththedevelopmentstringandthequerystringdonotcontainwildcards.Second,thedevelopmentstringbutnotthequerystringincludeswildcards.Third,thequerystringbutnotthedevelopmentstringincludeswildcards.Fourth,bothstringscontainwildcards.ThisleadstothealgorithmPatternMatchingshowninFigure 5-30 Figure5-30. Patternmatchingalgorithm. Intherstcase,thestringmatchingproblemcanbesolvedbyastringequalitytestandneedstimeO(v+w)wherevisthelengthofQandwisthelengthofD.AllothercasesincorporatethewildcardstrueandTrue.Wecanthereforeconsiderstringscontainingthesewildcardsas(simplied)regularexpressions.Thecases2and3arespecialinstancesofexactregularexpressionpatternmatchingproblemswhereexactlyoneoftheargumentstrings,eitherthequerystringorthedevelopmentstring,includeswildcards.Theproblemhereistondoutwhetherthestringwithoutwildcardsmatchesoneofthestringsspeciedbytheregularexpression.ThisiscomputedbyapredicateREPM(see[ 28 ]fordetail)andrequiresO(vw)time 179

PAGE 180

27 ](unfortunatelywithoutruntimecomplexityanalysis). 1.Developmentdetermination:First,wedeterminethedevelopmentbetweenthehistoricalmovementsofthetwoballoonobjectsandmarkitascertaindevelopment.Then,wedeterminethedevelopmentbetweenthehistoricalmovementoftherstballoonobjectandthepredictedmovementofthesecondballoonobject,orviceversa,andmarkitasuncertaindevelopment.Finally,theuncertaindevelopmentbetweenthepredictedmovementsaredetermined.Thetemporalcompositionofthesedevelopmentsproducesthedevelopmentoftheballoonobjects. 2.Patternmatchingwithquerypredicate:Thisstepconsistsofapatternmatchingprocessbetweenthedevelopmentcomputedandthequerypredicateaskingforevaluation.ItresultsinoneoftheBooleanvaluestrueorfalse.Notethatthisstepisnotrequiredforaquerytodeterminethedevelopment. Figure 5-31 showsanalgorithmBPredEvaluatorforevaluatingaballoonpredicate.Intherststep,wedeterminethedevelopmentbetweenthehistoricalmovementsbycallingtheoperationSTDevDetermination.ThisoperationworksthesamewayasthealgorithmSTPredEvaluatorpresentedinSection 5.3.1 withtheexceptionthatitdoesnotemploythepatternmatchingprocessattheend.Thus,itreturnsthedevelopmentbetweenthetwoargumentobjects.ThefunctionCertainDevandUncertainDevannotatethedevelopmentasacertainand 180

PAGE 181

pbb1;h1;p1iandbo2=ht2;ls2;obj pbb2;h2;p2i,topologicalstringpatternQthathastobecheckedwithrespecttobo1andbo2,agqwcindicatingwhetherQincludeswildcardstrueorTrueoutput:trueifQmatchesactualdevelopment;false,otherwisebeginifnotTIntersects(ls1;ls2)thenreturnfalseelseObjectDevelopment:=CertainDev(STDevDetermination(h1,h2));dev:=;ift1t2thendev:=UncertainDev(STDevDetermination(h1,p2));endif;ObjectDevelopment:=ObjectDevelopmentdev;ObjectDevelopment:=ObjectDevelopmentUncertainDev(STDevDetermination(p1,p2));(ObjectDevelopment,owc):=NormalizeDev(ObjectDevelopment);returnPatternMatching(Q,qwc,ObjectDevelopment,owc)endifendBPredEvaluator. Figure5-31. Balloonpredicateevaluatoralgorithm. uncertaindevelopmentrespectivelyandthenreturnsthecorrespondingstringvalue.Dependingontherelativecomparisonbetweent1andt2(localpresentinstantsthatseparatethehistoricalandpredictedmovements),thecorrespondingdevelopmentbetweenthehistoricalmovementofanobjectandapredictedmovementoftheotherobjectisdeterminedandappendedtotheobjectdevelopment.Next,weappendthedevelopmentbetweenthepredictedmovementsofbothballoonobjectsandnormalizetheobjectdevelopment.ThenalstepistoemploythepatternmatchingprocessbycallingPatternMatchingandreturnthenalresult. Withanimplementationofthisalgorithm,onecanposeaqueryconsistingofbothtempo-rallycertainanduncertaindevelopments.Forexample,assumethattheprexescandudenotecertainanduncertaindevelopmentrespectively.AquerystringcDisjointuDisjointaskedtoverifywhetherthedevelopmenthasalwaysbeenandwillalwaysbedisjoint.AquerystringTrueuInsideTrueaskedwhetherthedevelopmentInsideexistssometimesinthefuture. 181

PAGE 182

First,oneshoulddesignanddevelopanalgebra,itsdatatypesandoperationsfromanabstractdatatypespointofview.Thisallowsaclearandcomprehensibledesignofthedatatypesandoperationsaswellasaseamlesstransformationofthedesignintoimplementableclassesandmethods. Second,oneshouldconsideranumberofrequirementspertainingtotheextensibilityoptionofDBMSsofinterest.Theseincludestheabilitytocreateuser-denedtypes(UDT)anduser-denedfunctions(UDF),largeobject(LOB)management,externalprocedureinvocations,programminglanguageandtypelibrarycompatibility,andstorageorobjectsizelimitations. Third,themechanismandtheenvironmentinwhichoperationsareexecutedshouldbetakenintoaccount.Somecriteriaincludeswhetheroperationswillbeinternallyexecutedinmemorybyrequiringallargumentobjectstobeentirelyloadedinmainmemory(memoryexecution)orexternallyexecutedbyloadingonlyrequiredpartsofargumentobjectsfromadatabaseatatime(databaseexecution).Bothalternativeshaveadvantagesanddisadvantagesdependingonotherfactorssuchasthenatureoftheoperations,theamountofavailablemainmemory,thesizeofargumentobjects,thespeedofthedatabasecommunicationlink,etc. Withthesecriteriainmind,ourapproachhasbeentodevelopthealgebrainthreeabstractionlevels(abstract,discrete,andimplementationlevels)toallowforaclearandcomprehensiblespecicationofthedatatypesandoperations.OurspecicimplementationoftheMovingBalloonAlgebra,whichresultsinasoftwarelibrarypackagecalledMBA,isdonebyusingan 182

PAGE 183

5-32 ,weshowhowwecanregisteroneofourmovingballoondatatypesmballoonppandanoperationgetFunctionCount(returnsthenumberofunitfunctionsinamovingballoonobject)inOracle. RegistrationofadatatypeandanoperationinOracle. Inthiscase,ourmovingballoonobjectsarestoredinbinarylargeobjects(blob).AninvocationofthegetFunctionCountoperationrequiresalocator(apointertoablob)tobepassed 183

PAGE 184

Inthememorystorageoption,objectsarenotpersistentinthattheyonlyexistinmemoryforthedurationoftheprogramexecution.Thisoptionisalsorequiredformemoryexecutionmodeofdatabaseobjectswhereobjectsareloadedentirelyintomemory.Theblobstorageoptionallowsobjectstobestoredpersistentlyanddirectlyindatabaseblobs.Thisoptionfacilitatesmemoryexecutionmodesinceeachblobneedstobeloadedcompletelyintomemorytoconstructamemorybasedobjectthroughadeserializationprocess.Thisoptionispreferableforsmall-sizedobjectsthatdonotrequirefrequentupdate(updateoperationsrequirewritingbacktodatabaseblobsthroughaserializationprocess).Toenabledatabaseexecutionmode,ourmSLOBstorageoptionmakesuseofanintermediatelayercalledmSLOBforstoragemanagement.mSLOBisourimplementationofamulti-structuredlargeobjectmanagementconceptfordatabaseblobs[ 40 ].mSLOBprovidescomponent-basedreadandwriteaccesstostructuredandmulti-structuredobjectsstoredinblobs.Thus,itallowsustoreadandwriteanycomponentofourobjectsondemandwithouttheneedtoloadtheentireobjectsintomainmemory.Therefore,themSLOBstorageoptionispreferableforlargeobjectsandfrequentlyupdatedobjects.Figure 5-33 illustratestheapplicationsystemarchitectureinwhichanumberofalgebracanbeintegratedinaDBMSwithorwithoutmSLOB. WithouralgebraintegratedinaDBMSandourUDTsandUDFsregistered,wecannowcreatetablesusingourregisteredtypes,populatedata,andposequeryusingourregisteredfunctions.Forexample,wecancreateasimpletabletostoreourmballoonppobjectsasshowninFigure 5-34 184

PAGE 185

TheintegrationofalgebrainextensibleDBMSs Creatingatableusingauser-denedtype. Assumingthatwehavepopulatedthistablewithafewmovingballoonobjects.Wecanthenposeaquery(Figure 5-35 )onthistableinSQLusingourUDFgetFunctionCounttogetthenumberofunitfunctionsineachobject. Usingauser-denedfunctioninSQLquery. Hurricanesaresomeofthemostpowerfulanddeadliestforcesofnature.AccordingtotheNationalHurricaneCenter,1385tropicalstormsandhurricaneshadbeenrecordedbetween1851 185

PAGE 186

Traditionally,stormdataincludingitsmovements(alsoknownasbesttrackdata)arecollectedandstoredinatextleinaspecicformatcalledHURDAT.Fromthisdata,researchersemploysophisticatedpredictionmodelstopredictthepositionofthestormatevery12-hourintervalwithinupto120hoursinthefuture.Thisisessentiallyapredictionwhichisusedtoproduceapublicadvisory.Thisisdoneevery6hoursforwhichthebesttrackinformationofthestormisavailable.Thus,forastormthatlastsforaweekorso,therecanbeasmanyas20advisoriesorpredictions.Asonemayhavenoticed,thistypeofdatatsverywellwithourmodelofmovingballoonobjects. Itisimportanttonoticealsothatthelimitationsofcurrentlyexistingmovingobjectmanagementtechnologyhaveabigimpactonthecomplexityofpredictiondataandtheirmanagement.Duetothelackofacomprehensivemovingobjectmodelwithsupportforpredictedmovementsandthelackofmovingobjectmanagementindatabase,sofar,hurricanepredictionshaveonlybeenmadeinregardstothefuturepositionsofthecenterofastorm(themovementofwhichisamovingpoint),andthesedataaregenerallystoredinnormalles.Thiseffectivelylimitsrichnessofrepresentationaswellaslimitsthequeryingpossibilityforthepredicteddata. WiththeuseofourMovingBalloonAlgebrainadatabasesystem,amorecomplexrepresentationofhurricanepredictionscanbesupported,managed,andofferedforqueryingpurposes.Forexample,insteadofprovidingapredictionasaseriesofpositions,researcherscannowprovideapredictionasamovingregion.Therefore,themovementoftheeyeofahurricanecanberepresentedasamovingballoonobjectbasedonamovingpointhistoryandmovingregionpredictions.Sofar,thishasnotbeenavailableinhurricaneresearch,andthusresearchersfrequentlyusetheaverageerrorsbetweentheirpredictionsinthepastandthebest 186

PAGE 187

AB CD Figure5-36. VisualizationofhurricaneKatrinausingtheMovingBalloonAlgebra. 187

PAGE 188

5-36 Aand 5-36 BshowhurricaneKatrinaasaballoonobjectonAugust26,2005at00:00GMTandAugust29,2005at00:00GMTrespectively.Figure 5-36 CshowsKatrinaasamovingballoonobjectconsistingofhertrackandall28ofherpredictionsoverthecourseofherlifetimedrawnontopofoneanother.Wecanswitchthevisualizationtoatemporalanalysisperspectivemodewherewecananalyze,atanyspecicinstant,thepositionoftheeyeaswellasthestateofthepredictions.Figure 5-36 DshowsKatrina'seyepositionwhenmakinglandfallinNewOrleansonAugust29,2005at11:00GMTandthestateofallofitsavailablepredictionsatthetime.Inthisparticulargure,wetakeasnapshotofthemovementandallavailablepredictionsattheinstantofthelandfall.Eachringrepresentsapredicteduncertaintyregionwithrespecttoaspecicprediction.Asonemaynotice,hereweseethatthepositionofKatrina'seyeisintheintersectionofalltheringsmeaningthatallofthesepreviouspredictionsarevalidandaccuratetosomedegreeatthisinstant.Ifatanyinstanttheeye'spositionisoutsideofaring,thismeansthatthepreviouspredictioncorrespondingtotheringisnotaccurate.Aspartofouralgebra,weprovideanoperationhas bad predictiontocheckforinaccuratepredictionswithinamovingballoonobject.Thisoperationmakesuseofourspatiotemporalpredicateimplementationtodeterminewhethertheeye'spositioneverleavesanyofthepredictedregions.InthecaseofhurricaneKatrina,prediction#7,#8,and#9hasbeenfoundtobeinaccurate.Figure 5-37 Ashowsanobject-basedperspectiveofthecompletetrackandprediction#7whichwasproducedonAugust25,2005at12:00GMT.Figure 5-37 Billustratesatemporalanalysisperspectiveoftheeye'spositionandtheuncertaintyregionofprediction#7onAugust27,2005at12:00GMTwhentheactualpositionoftheeyestartstostrayoutsideofthepredictedregion. ByperformingthiskindofanalysisforalloftheNorthAtlanticstormsoverthepast5years(2003-2007forwhichpredictiondataareavailable),wecandetermineforeachstormthenumberofaccurateandinaccuratepredictionsasshowninFigure 5-38 A.Intotal,82storms 188

PAGE 189

Figure5-37. VisualizinghurricaneKatrina.A)Katrina'sprediction#7inobject-basedperspectives.B)TemporalanalysisperspectiveonAugust27,2005at12:00GMT. havebeenrecorded,and1863predictionshavebeenproducedofwhich655(orabout35%)havebeenfoundtobeinaccurate.Wehavealsodiscoveredthatmostofthestormsthathavehighpercentageofinaccuratepredictionsoftenexperiencecertainbehaviorssuchasmaking90degreeturnsandu-turns(e.g.,hurricaneKate(#1312)asshowninFigure 5-38 B),orformingaloop(e.g.,hurricaneLisa(#1329)asshowninFigure 5-38 C).Itisclearthatthistypeofinformationwouldbeusefulforresearcherstostudysuchbehaviorsandmakenecessaryadjustmentstotheirpredictionmodel. 189

PAGE 190

BC Figure5-38. Hurricaneanalysis.A)Hurricanepredictionanalysisbetween2003and2007.B)HurricaneKate(#1312).C)HurricaneLisa(#1329). 190

PAGE 191

Inthischapter,weprovideanassessmentofourMovingBalloonAlgebraanditsimple-mentation.Theassessmentispresentedattwolevels.Werstprovideanassessmentofourtopologicalpredicateimplementationconcept.Thenwediscussanassessmentofourspatiotem-poralmodel. 191

PAGE 192

192

PAGE 193

Fortestingtheresultsoftheevaluationphase,wetakethetopologicalfeaturevectorsasinputforthe9-intersectionmatrixcharacterizationmethodandtheoptimizationmethodsofmatrixthinningandminimumcostdecisiontrees.Thecorrectnessofallmethodshasbeencheckedbyatechniqueknownasgray-boxtesting,whichcombinestheadvantagesoftwoothertechniquescalledblack-boxtestingandwhite-boxtesting.Theblack-boxtestingtechniquearrangesforwelldenedinputandoutputobjects.Inourcase,theinputconsistsoftwocorrecttopologicalfeaturevectorsaswellasamatrixnumberofthetopologicalpredicatetobeveriedincaseofpredicateverication.Thisenablesustotestthefunctionalbehaviorofthethreemethodimplementations.TheoutputisguaranteedtobeeitheraBooleanvalue(predicateverication)oravalidmatrixnumberofatopologicalrelationshippredenedforthetypecombinationunderconsideration(predicatedetermination).Thewhite-boxtestingtechniqueconsiderseverysingleexecutionpathandguaranteesthateachstatementisexecutedatleastonce.Thisensuresthatallcasesthatarespeciedandhandledbythealgorithmsareproperlytested. Allcaseshavebeensuccessfullytestedandindicatethecorrectnessofourconceptsandtheabilityofouralgorithmstocorrectlyverifyordetermineatopologicalpredicate. 2.3 wehaveseenthatallavailableimplementationsoftopologicalrelationshipsmainlyfocusontheeightpredicatesdisjoint,meet,overlap,equal,inside,contains,covers,andcoveredBythathave 193

PAGE 194

Figure6-1. Predicatevericationwithoutandwithmatrixthinning beengeneralizedtoanduniedforallcombinationsofcomplexspatialdatatypes.Hence,acomparisontoourmuchmorene-grainedcollectionof184(248)topologicalpredicates(Section 2.1.2 )isnotpossible.Second,studyingthecorrespondingdocumentation,wehavenotfoundaformaldenitionofthesemanticsoftheseeightgenericpredicatesforalltypecombinations.Third,animplementationofourcollectionoftopologicalpredicatesandpredicateexecutiontechniquesisnottrivialinthecontextofcommercialimplementationssincetheiralgorithmsandprogramcodearenotpubliclyavailableandtheirsystemenvironmentsareveryspecial.Forexample,thealgorithmsfortheeighttopologicalpredicateshavenotbeenpublished. 194

PAGE 195

50 ]. Forpredicateverication(PV),Figures 6-1 Band 6-1 Cillustratetheaverageexecutiontimeforeachpredicateofeachtypecombinationwithoutandwithmatrixthinning(MT).TheoverallaverageforeachtypecombinationisshowninFigure 6-1 A.Theperformanceimprovementsfromusingmatrixthinningarequitenoticeableandrangefrom13%executiontimereductionfortheline/linecaseupto55%forthepoint/pointcase. Similarly,forpredicatedetermination(PD),Figures 6-2 Band 6-2 Cshowtheaverageexecutiontimeforeachpredicateofeachtypecombinationwithoutandwiththeuseofminimumcostdecisiontrees.TheoverallaverageforeachtypecombinationisshowninFigure 6-2 A.Theresultsindicatesignicantperformanceimprovementsfromusingminimumcostdecisiontrees.Theimprovementsrangefrom75%executiontimereductionforthepoint/regioncaseupto91%fortheline/linecase. Althoughtheexecutiontimereductionsareremarkableforbothpredicatevericationandespeciallypredicatedeterminationandclearlyreectthetrend,theempiricalresultsshowninFigures 6-1 and 6-2 arenotasoptimisticasthecomputationalresultsgiveninTables 5-3 and 5-5 .Thereasonthatwecannotreachtheselowerboundsinpracticeconsistsinprogrammingandruntimeoverheadssuchasextraconditionalchecks,constructionofthinnedoutmatricesandminimumcostdecisiontrees,andtheirtraversals.However,evenwiththeseoverheads,itisevidentthatourapproachprovidesconsiderableperformanceoptimizations. 195

PAGE 196

Figure6-2. PredicatedeterminationwithoutandwithMCDT 2.2 )onlyprovideasmallsubsetoffeatures,andtheirmodelingcapabilityisgenerallyveryrestrictive.Furthermore, 196

PAGE 197

Withrespecttothetraditionalmovingobjectmodeldenedin[ 32 61 ],ourhistoricalmovementmodelisarestrictedversionofthismodel.Wedenedamorepreciseandappropriatemodelforrepresentingtherealityofmovingobjects.Thisisdonebyimposingthecontinuitypropertyonmovementsofmovingobjects.AsfarastheMOSTmodel[ 60 ]isconcerned,thismodelusesaspecictechnique/concept,thatis,motionvector,toprovidethenearfuturepositionsofmovingpointswithouttakingintoaccounttheuncertaintyaspectofthefutureprediction.Infact,thismodelcanbeconsideredasapredictionmodelformovingpointsthatprovidesmovingpointtypepredictions.Thus,wecansupporttheMOSTmodelthroughtheuseofourspatiotemporalballoondatatypemballoon pp.InadditiontothecapabilityoftheMOSTmodelwhichcankeeptrackofthecurrentpositionandthecurrentpredictionofamovingpoint,ouralgebracanalsokeeptrackofthepastpositionsaswellaspastpredictions.SincethealgebraprovidesdatamodelingsupportfortheMOSTmodel,thismeansthatitalsosupportstheFTLquerylanguagewhichisusedforenteringdifferenttypesofspatiotemporalqueriessuchascontinuousandpersistentqueries. Inregardtotheuncertaintymodelingofmovingobjects,themodeldescribedin[ 26 ]providesdatamodelingsupportforthefuturepredictionofamovingpointthroughtheuseofanuncertaintythreshold.Thisthresholdisappliedtoafuturetrajectoryorafuturemotionplanofamovingpointcreatingatrajectoryvolumerepresentingthesetofallpossiblefuturemotioncurves.ItisobviousthatthistrajectoryvolumecanberepresentedinourMovingBalloonAlgebrausingthefuturepredictiondatatypefregion.Thus,thedynamicofthemovingpointinthismodelcanberepresentedinouralgebrausingthespatiotemporalballoondatatypemballoon pr.Consequently,thespatiotemporalpredicatemodeldenedin[ 26 ]isasubsetofourballoonpredicatemodelsinceitisonlydenedbetweenthefuturemovement 197

PAGE 198

Denitely InsidebetweenanuncertaintrajectoryUTr=(T;r)andastaticregionRwhereTisthefuturetrajectoryandristheuncertaintythreshold.LetPMCTdenoteapossiblemotioncurveofUTr.ThespatiotemporalpredicateSometime Denitely Insideisdenedin[ 26 ]asSometime Denitely Inside(UTr;R)=(9t)(8PMCT):inside(R;PMCT;t).ThespatialpredicateinsidedetermineswhetherthevalueofPMCTattisinsidetheregionR.Inourmodel,theobjectUTrcanbemodeledasanfregionobjectwithauniformcondencedistribution.LikewisethestaticregionRcanbetemporallyliftedintoanobjectoftypefregionaswell.Thus,thespatiotemporalpredicateSometime Denitely InsidecanbecharacterizedinourmodelasSometime Denitely Inside(UTr;R)=(9t2time)(8p2val(atinstant(UTr;t))):inside(p;val(atinstant(R;t))).Byfollowingthisapproach,wecanalsocharacterizeotherspatiotemporalpredicatesfoundin[ 26 ]inourmodel. Asaresultofthisdiscussion,wehaveshowntherelationshipbetweenourMovingBalloonAlgebraandthecurrentlyexistingmovingobjectmodels.Inadditiontoprovidingamorepreciseandappropriatewaytorepresenttherealityofmovingobjects,ourdatamodelalsoprovidesamoregenericsetofspatiotemporaldatatypes,incomparisontoexistingmovingobjectmodels,tosupportawidevarietyofmovingobjects.Furthermore,ouralgebracansupportexistingfunctionalitieswhichareavailableinexistingmodelsaswellasintroducenewones. 198

PAGE 199

Althoughtherehavebeenseveralspatiotemporaldatamodelsproposedinthepastforhandlingmovingobjects,eachofthemsupportseitherhistoricalmovementsrelatingtothepastorpredictedmovementsrelatingtothefuturebutnotbothtogether.Furthermore,theirmodelspecicationsareeithertoogeneralandvagueortoospecicandrestrictedtoonlyacertainproblem.Theexistingmovingobjectmodelforhistoricalmovementsisrathervagueintheirdenitionofmovingtypes.Themodelsforfuturemovementsofmovingobjectstendtoemphasizeonusingspecicpredictionmethodsandcombiningpredictionmethodswithmovingobjectmodelsinatop-downverticalapproachtoaddressaspecicproblemonly.Toproperlymodelthedevelopmentandevolutionofhistoricalandpredictedmovementsofmovingobjects,itisrequiredthatwehaveaclearunderstandingofhowobjectsmoveorevolve.Furthermore,modelingthefuturepredictionsofmovingobjectsrequiresthatwetakeintoaccounttheinherentuncertaintyaspectofthefuture.Finally,modelingthedynamicmovementsincludingboththepasthistoriesandthefuturepredictionsofmovingobjectsrequiresthatweadditionallymaintaintheconsistencyofthemovementsatalltime. TheMovingBalloonAlgebrapresentedinthisresearchsatisesthesecriteriawhileaddressingalloftheshortcomingsofcurrentmodels.Ourmaincontributionisanewintegrativespatiotemporaldatamodelforsupportingbothhistoricalandpredictedmovementsofmovingobjectsindatabases.Aspartofthemodel,wepresentnewsetsofspatiotemporaldatatypesincludingballoonandspatiotemporalballoondatatypesforrepresentingalltypesofmovements.Withthesedatatypes,newsetsofspatiotemporalpredicatesandoperationsbecomeavailablewhichopenupanewrealmofqueryingpossibility.Furthermore,theseparationbetweenourdatamodelanddomainspecicpredictionmodelsallowsforexibleinteroperabilitywithdifferentkindsofpredictionmodelswithoutsacricingthegenericityofthemodel.Thealgebraispresentedinthreedifferentlevelsofabstractioninordertoprovideaclearandcomprehensivespecicationforimplementation.Thisapproachhasprovedbenecialfor 199

PAGE 200

Giventhelackofacomprehensivemovingobjectmodelandcorrespondingimplementation,thisresearchandhenceourcontributioncanbeconsideredasasubstantialadvancementintheeldofspatialandspatiotemporaldatabasesystemsresearch.Theresultofthisresearchoffersunprecedentedsupportformovingobjectmanagement.Suchsupportisoftendesperatelyneededinmanydisciplinesincludingthegeosciences,geographicalinformationscience(GIS),articialintelligence,robotics,mobilecomputing,andclimatology.Amongmanypotentialapplications,asanexample,wehaveshownhowourresearchcanprovideleverageformovingobjectmanagementintheeldofhurricaneresearch.Suchleveragecanprovideawholenewperspectivetoapproachexistingproblemsandthuscanpotentiallyopenupawholenewrealmofresearch. Althoughitisevidentthatourcontributionmayhavealreadybeenofmuchbenecialtotheresearchcommunity,anumberoftopicsmaybeofinterestforfutureinvestigations.ItwouldalsobeinterestingtoseehowsuchaMovingBalloonAlgebracanhandlethevaguenessorfuzzinessaspectsofimprecisespatialmodel.Furthermore,whethersuchanalgebraanditcorrespondingconceptscanbeusedtosupportotherrelatedresearchtopicssuchasspatiotemporaldatawarehousingandspatiotemporaldataminingstillremainstobeexplored. 200

PAGE 201

[1] J.F.Allen.MaintainingKnowledgeaboutTemporalIntervals.CommunicationsoftheACM(CACM),26,:832,1983,. [2] T.BehrandM.Schneider.TopologicalRelationshipsofComplexPointsandComplexRegions.InInt.Conf.onConceptualModeling,pages56,2001. [3] M.deBerg,M.vanKrefeld,M.Overmars,andO.Schwarzkopf.ComputationalGeometry:AlgorithmsandApplications.Springer-Verlag,2ndeditionedition,2000. [4] MartinBreunig,CanTurker,MichaelH.Bohlen,StefanDieker,RalfHartmutGuting,ChristianS.Jensen,LukasRelly,PhilippeRigaux,Hans-JorgSchek,andMichelScholl.ArchitecturesandImplementationsofSpatio-temporalDatabaseManagementSystems.InSpatio-TemporalDatabases:TheCHOROCHRONOSApproach,pages263,2003. [5] E.ClementiniandP.DiFelice.AModelforRepresentingTopologicalRelationshipsbetweenComplexGeometricFeaturesinSpatialDatabases.InformationSystems,90:121136,1996. [6] E.ClementiniandP.DiFelice.AModelforRepresentingTopologicalRelationshipsbetweenComplexGeometricFeaturesinSpatialDatabases.InformationSciences,90(1-4):121,1996. [7] E.ClementiniandP.DiFelice.TopologicalInvariantsforLines.IEEETrans.onKnowledgeandDataEngineering,10,1998. [8] E.Clementini,P.DiFelice,andG.Califano.CompositeRegionsinTopologicalQueries.InformationSystems,20:579,1995. [9] E.Clementini,P.DiFelice,andP.vanOosterom.ASmallSetofFormalTopologicalRelationshipsSuitableforEnd-UserInteraction.In3rdInt.Symp.onAdvancesinSpatialDatabases,LNCS692,pages277,1993. [10] E.Clementini,J.Sharma,andM.J.Egenhofer.ModelingTopologicalSpatialRelations:StrategiesforQueryProcessing.ComputersandGraphics,18(6):815,1994. [11] J.R.Davis.IBM'sDB2SpatialExtender:ManagingGeo-SpatialInformationwithintheDBMS.Technicalreport,IBMCorporation,1998. [12] M.J.Egenhofer,A.Frank,andJ.P.Jackson.ATopologicalDataModelforSpatialDatabases.In1stInt.Symp.ontheDesignandImplementationofLargeSpatialDatabases,pages271.Springer-Verlag,1989. [13] M.J.EgenhoferandR.D.Franzosa.Point-SetTopologicalSpatialRelations.Int.JournalofGeographicalInformationSystems,5:161,1991. [14] M.J.EgenhoferandJ.Herring.AMathematicalFrameworkfortheDenitionofTopologi-calRelationships.In4thInt.Symp.onSpatialDataHandling,pages803,1990. 201

PAGE 202

M.J.EgenhoferandJ.Herring.CategorizingBinaryTopologicalRelationsBetweenRegions,Lines,andPointsinGeographicDatabases.Technicalreport,NationalCenterforGeographicInformationandAnalysis,UniversityofCalifornia,SantaBarbara,1990. [16] M.J.EgenhoferandD.Mark.ModelingConceptualNeighborhoodsofTopologicalLine-RegionRelations.Int.JournalofGeographicalInformationSystems,9(5):555,1995. [17] M.J.Egenhofer,E.Clementini,andP.DiFelice.TopologicalRelationsbetweenRegionswithHoles.Int.JournalofGeographicalInformationSystems,8:128,1994. [18] M.Erwig,R.H.Guting,M.Schneider,andM.Vazirgiannis.AbstractandDiscreteModelingofSpatio-TemporalDataTypes.InACMSymp.onGeographicInformationSystems(ACMGIS),pages131,1998,. [19] M.Erwig,R.H.Guting,M.Schneider,andM.Vazirgiannis.Spatio-TemporalDataTypes:AnApproachtoModelingandQueryingMovingObjectsinDatabases.GeoInformatica,3,(3,):265,1999,. [20] M.ErwigandM.Schneider.DevelopmentsinSpatio-TemporalQueryLanguages.InIEEEInt.WorkshoponSpatio-TemporalDataModelsandLanguages,pages441,1999. [21] M.ErwigandM.Schneider.VisualSpecicationsofSpatio-TemporalDevelopments.In15thIEEESymp.onVisualLanguages(VL),pages187,1999. [22] M.ErwigandM.Schneider.Spatio-TemporalPredicates.IEEETrans.onKnowledgeandDataEngineering,14,(4,):1,2002,. [23] MartinErwig,MartinErwig,andMarkusSchneider.Query-By-Trace:VisualPredicateSpecicationinSpatio-TemporalDatabases.InTheFifthWorkingConferenceonVisualDatabaseSystems,volume168,pages199,2000. [24] ESRISpatialDatabaseEngine(SDE).EnvironmentalSystemsResearchInstitute,Inc.,1995. [25] L.Forlizzi,R.H.Guting,E.Nardelli,andM.Schneider.ADataModelandDataStructuresforMovingObjectsDatabases.InACMSIGMODInt.Conf.onManagementofData,pages319,2000. [26] K.HinrichsG.Trajcevski,O.WolfsonandS.Chamberlain.ManagingUncertaintyinMovingObjectsDatabases.ACMTrans.onDatabaseSystems(TODS),29:463,2004. [27] A.Ginzburg.AProcedureforCheckingEqualityofRegularExpressions.JournaloftheAssociationforComputingMachinery,14(2):355,1967. [28] D.Guseld.AlgorithmsonStrings,Trees,andSequences:ComputerScienceandComputationalBiology.CambridgeUniversityPress,1997. 202

PAGE 203

R.H.Guting.Geo-RelationalAlgebra:AModelandQueryLanguageforGeometricDatabaseSystems.InInt.Conf.onExtendingDatabaseTechnology(EDBT),pages506,1988. [30] R.H.GutingandM.Schneider.Realms:AFoundationforSpatialDataTypesinDatabaseSystems.In3rdInt.Symp.onAdvancesinSpatialDatabases,LNCS692,pages14.Springer-Verlag,1993. [31] R.H.GutingandM.Schneider.Realm-BasedSpatialDataTypes:TheROSEAlgebra.VLDBJournal,4:100,1995. [32] R.H.Guting,M.H.Bohlen,M.Erwig,C.S.Jensen,N.A.Lorentzos,M.Schneider,andM.Vazirgiannis.AFoundationforRepresentingandQueryingMovingObjects.ACMTrans.onDatabaseSystems(TODS),25,(1,):881,2000,. [33] R.H.Guting,T.deRidder,andM.Schneider.ImplementationoftheROSEAlgebra:EfcientAlgorithmsforRealm-BasedSpatialDataTypes.InInt.Symp.onAdvancesinSpatialDatabases,1995. [34] R.H.GutingandM.Schneider.MovingObjectsDatabases.MorganKaufmannPublishers,2005. [35] InformixGeodeticDataBladeModule:User'sGuide.InformixPress,1997. [36] Y.GuoS.GrumbachJ.Chen,X.MengandH.Sun.ModelingandPredictingFutureTrajectoriesofMovingObjectsinaConstrainedNetwork.InInt.Conf.onMobileDataManagement(MDM),page156,2006. [37] JTSTopologySuite.VividSolutions,2007.URL: http://www.vividsolutions.com/JTS/JTSHome.htm [38] B.KuijpersandW.Othman.Trajectorydatabases:Datamodels,uncertaintyandcompletequerylanguages.In11thInternationalConferenceonDatabaseTheory,pages224,2007. [39] M.McKenney,A.Pauly,R.Praing,andM.Schneider.PreservingLocalTopologicalRelationships.InACMSymp.onGeographicInformationSystems(ACMGIS),pages123.ACM,2006. [40] M.McKenney,A.Pauly,R.Praing,andM.Schneider.Multi-StructuredLargeObjectsinDatabases.Technicalreport,UniversityofFlorida,DepartmentofComputer&InformationScience&Engineering,2006. [41] M.McKenney,A.Pauly,R.Praing,andM.Schneider.EnsuringtheSemanticCorrect-nessofComplexRegions.In1stInt.WorkshoponSemanticandConceptualIssuesinGeographicInformationSystems(SeCoGIS),pages409,2007. [42] M.McKenney,A.Pauly,R.Praing,andM.Schneider.LocalTopologicalRelationshipsforComplexRegions.InSymposiumonSpatialandTemporalDatabases,2007. 203

PAGE 204

H.MokhtarandJ.Su.UniversalTrajectoryQueriesforMovingObjectDatabases.InInt.Conf.onMobileDataManagement(MDM).IEEEComputerSociety,2004. [44] V.H.Nguyen,C.Parent,andS.Spaccapietra.ComplexRegionsinTopologicalQueries.InInt.Conf.onSpatialInformationTheory,pages175,1997. [45] OGCAbstractSpecication.OpenGISConsortium(OGC),1999.URL: http://www.opengis.org/techno/specs.htm [46] OGCGeographyMarkupLanguage(GML)2.0.OpenGISConsortium(OGC),2001.URL: http://www.opengis.net/gml/01-029/GML2.html [47] Oracle8:SpatialCartridge.AnOracleTechnicalWhitePaper.OracleCorporation,1997. [48] J.A.OrensteinandF.A.Manola.PROBESpatialDataModelingandQueryProcessinginanImageDatabaseApplication.IEEETrans.onSoftwareEngineering,14:611,1988. [49] N.Pelekis,B.Theodoulidis,I.Kopanakis,andY.Theodoridis.LiteratureReviewofSpatio-TemporalDatabaseModels.KnowledgeEngineeringReview,2005. [50] R.PraingandM.Schneider.EfcientImplementationTechniquesforTopologicalPredicatesonComplexSpatialObjects:TheEvaluationPhase.Technicalreport,UniversityofFlorida,DepartmentofComputer&InformationScience&Engineering,2006. [51] R.PraingandM.Schneider.EfcientImplementationTechniquesforTopologicalPredicatesonComplexSpatialObjects.GeoInformatica,2008.(Inpress). [52] R.PraingandM.Schneider.MovingBalloonAlgebra:AFiniteRepresentationandDataStructuresforMovingObjectsinSpatio-TemporalDatabases.Technicalreport,CISEDepartment,UniversityofFlorida,2008. [53] R.PraingandM.Schneider.MovingBalloonAlgebra:AnIntegrativeSpatio-TemporalDataModelforHistoricalandPredictiveMovementsofMovingObjectsinDatabases.Technicalreport,CISEDepartment,UniversityofFlorida,2008. [54] R.PraingandM.Schneider.TopologicalFeatureVectorsforExploringTopologicalRelationships.Int.JournalofGeographicalInformationSystems,2008.Inpress. [55] F.P.PreparataandM.I.Shamos.ComputationalGeometry.SpringerVerlag,1985. [56] D.A.Randell,Z.Cui,andA.Cohn.ASpatialLogicBasedonRegionsandConnection.InInternationalConferenceonPrinciplesofKnowledgeRepresentationandReasoning,pages165,1992. [57] M.Schneider.SpatialDataTypesforDatabaseSystems-FiniteResolutionGeometryforGeographicInformationSystems,volumeLNCS1288.Springer-Verlag,BerlinHeidelberg,1997. [58] M.SchneiderandT.Behr.TopologicalRelationshipsbetweenComplexLinesandComplexRegions.InInt.Conf.onConceptualModeling,2005. 204

PAGE 205

M.SchneiderandT.Behr.TopologicalRelationshipsbetweenComplexSpatialObjects.ACMTrans.onDatabaseSystems(TODS),31:39,2006. [60] A.P.Sistla,O.Wolfson,S.Chamberlain,andS.Dao.ModelingandQueryingMovingObjects.InInt.Conf.onDataEngineering,pages422,1997. [61] E.TossebroandR.H.Guting.CreatingRepresentationsforContinuouslyMovingRegionsfromObservations.InInt.Symp.onSpatialandTemporalDatabases(SSDT),pages321,2001. [62] M.F.WorboysandP.Bofakos.ACanonicalModelforaClassofArealSpatialObjects.InInt.Symp.onAdvancesinSpatialDatabases,pages36,1993. 205

PAGE 206

ReaseyPraingwasbornonDecember5,1980inPhnomPenh,Cambodia.Thethirdchildoffourchildren,hegrewupinPhnomPenh,graduatingwithhighdistinctionfromIndradeviHighSchoolin1996.Then,heattendedtheFacultyofBusinessandNortonUniversityandreceivedaSmallBusinessManagementdegreein1997.Laterthatyear,hecametovisittheUnitedStateswithhissistersinMiami,Florida,andtherehefoundagreatopportunityforhighereducation.HeearnedhisBachelorofScienceinComputerScienceandgraduationwithhonorsfromFloridaInternationalUniversityin2001.HethenattendedtheUniversityofSouthernCaliforniainLosAngeles,CaliforniaandearnedhisMasterofScienceinComputerSciencein2002.UponreceivinghisMasterofSciencedegree,ReaseyjoinedtheComputer&InformationScience&EngineeringdepartmentattheUniversityofFloridaasaPh.D.studentandteachingassistantin2003.Duringthersttwoyearsasateachingassistant,ReaseyhelpedwithteachingresponsibilitiesandleadingdiscussionsectionsformanygraduateandundergraduateclassesincludingJavaprogramming,computersimulation,anddatabasesystems.Forthelast3yearsofhisPh.D.program,ReaseyworkedasaresearchassistantforhisadviserDr.MarkusSchneiderinaNationalScienceFoundationresearchproject.UponcompletionofhisPh.D.program,ReaseywillbejoiningUltimateSoftwareGroupInc.inWeston,Florida.Inthefuture,ReaseyplanstoreturntoCambodiaandteachatauniversitythere. 206