
Citation 
 Permanent Link:
 https://ufdc.ufl.edu/UFE0022558/00001
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:
 2008
 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 ) borndigital ( 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 timedependent geometries that continuously change their location and/or extent and are interesting for many disciplines including the geosciences, geographical information science, moving objects databases, locationbased 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 databaseindependent 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 ONCAMPUS USE UNTIL 20100831
 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 nonprofit 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 23. Examples of moving objects. A) A singlecomponent moving point object. B) A
singlecomponent moving region object. C) A multicomponent moving point object.
D) A multicomponent moving region object.
23D illustrate corresponding multicomponent objects. An application example for Figure 23D
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 23A, 23B), disappear for periods of
time (Figure 24A, 24E), appear instantly (Figures 24B, 24F), have spatial outliers (Figure 2
4D), or have instantaneous jumps (Figures 24C, 24G). 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 531. 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 54 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 55A). 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 55B). 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 55C). 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 nontemporal 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 NonTemporal Data Types
Nontemporal 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 313. 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 9intersection
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 AaB
3 4 5 6
7 8 9 10 11 12 13 14
C
Figure 522. 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:3981, 2006.
[60] A.P. Sistla, O. Wolfson, S. Chamberlain, and S. Dao. Modeling and Querying Moving
Objects. In Int. Conf on Data Engineering, pages 422432, 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
321344, 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 3652, 1993.
(i) VF [boundpoishared] = 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 nonempty. 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 9intersection 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) Fn 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
LineRegion Relations. Int. Journal of Geographical Information Systems, 9(5):555565,
1995.
[17] M.J. Egenhofer, E. Clementini, and P. Di Felice. Topological Relations between Regions
with Holes. Int. Journal of Geographical Information Systems, 8:128142, 1994.
[18] M. Erwig, R.H. Giiting, M. Schneider, and M. Vazirgiannis. Abstract and Discrete
Modeling of SpatioTemporal Data Types. In ACM Symp. on Geographic Information
Systems (ACM GIS), pages 131136, 1998,.
[19] M. Erwig, R.H. Giiting, M. Schneider, and M. Vazirgiannis. SpatioTemporal Data Types:
An Approach to Modeling and Querying Moving Objects in Databases. Geolnformatica,
3,(3,):265291, 1999,.
[20] M. Erwig and M. Schneider. Developments in SpatioTemporal Query Languages. In IEEE
Int. Workshop on SpatioTemporal Data Models and Languages, pages 441449, 1999.
[21] M. Erwig and M. Schneider. Visual Specifications of SpatioTemporal Developments. In
15th IEEE Symp. on Visual Languages (VL), pages 187188, 1999.
[22] M. Erwig and M. Schneider. SpatioTemporal Predicates. IEEE Trans. on Knowledge and
Data Engineering, 14,(4,):142, 2002,.
[23] Martin Erwig, Martin Erwig, and Markus Schneider. QueryByTrace: Visual Predicate
Specification in SpatioTemporal Databases. In The Fifth Working CO',f, 'r, l on Visual
Database Systems, volume 168, pages 199218, 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
319330, 2000.
[26] K. Hinrichs G. Trajcevski, O. Wolfson and S. Chamberlain. Managing Uncertainty in
Moving Objects Databases. ACM Trans. on Database Systems (TODS), 29:463507, 2004.
[27] A. Ginzburg. A Procedure for Checking Equality of Regular Expressions. Journal of the
Association for Computing Machinery, 14(2):355362, 1967.
[28] D. Gusfield. Algri,1iim\ on Strings, Trees, and Sequences: Computer Science and
Computational Biology. Cambridge University Press, 1997.
Table 55. 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
9intersection matrices and the given probability distribution. One can verify this by applying our
algorithm to the eight 9intersection 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 socalled "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 55) is greater than or equal to the total cost of all its
thinned out matrices (given in Table 53), 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 userdefined types (UDT) and
userdefined 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 51. Static and dynamic halfsegment sequences of the regions R1 and R2 in Figure 56.
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 55. We first consider the case
that the plane sweep detects an intersection. This leads to a situation like in Figure 56A. The
two static and the two dynamic halfsegment sequences of R1 and R2 are shown in Table 51.
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 56), 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 ycoordinate 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 56B). 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 56B). However, this
The exploration algorithm for this case is given in Figure 511. The whileloop 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 55), 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 whileloop 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 44 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)), ((unitpbbl, 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 55, 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 typespecific, 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 multistructured large object management concept for
database blobs [40]. mSLOB provides componentbased read and write access to structured and
multistructured 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 533 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 534.
00 00 1*\
1: 0* 0* 0 2:
1* 00 1*
00 11 11
6: 0* 0* 0* 7:
1* 11 1*
( 11 11 00
11: 0 0 12:
1* 00 1*
1*
0*
00
0*
1*
00
0*
1*
00
3: o0
1*
8: 0*
S1*
111
13: 0*
S1*
00 00 1* 00
0* 4: 0* 0* 0*
1 9 1* 11 1*
1* 1* 00 1*
0* 14: 0* 0* 0*
1* 1* 11 1*
00 11 1
5: 0* 0* 0*
1* 00 1*
11 00 11
10: 0* 0* 0*
1* 1 1 1*
Figure 518. Complete and thinned out matrices for the 14 topological predicates of the
point/line case.
00 00 11 11 1* 00 00 N
0* 3: 0* 0* 10 4: 0* 0* 0*
1* 1 1 1 1* 1* 1*
11 1
0*
1*
11 00 11
5: 0* 0* 0*
1* 1 11*
Figure 519. 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 517, for the point/line case in
Figure 518, for the point/region case in Figure 519, 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: 00
1\.
S1*
11: 0*
S00
/I*
16: 11
S1*
1.*
21: 0*
S00
1*
26: 00
1 1*
31: 11
S11,
1* \
1*
1* /
00
0*
11*
11* \
11
1* /
11)
111* )
00
11
00
1,
111
1*
00
1*
00
0*
1*
1* \
1I*
11
1'* \
11 N
11* /
1*
00
1*
11)
00
1*
11* \
111
1* /
00
3: 0 *
13: o(,
18
1*
8: 11
S 11
/111
13: 00
1*
11.
1*
1*
23: 00
1.
1*
28: 1.
11
/1*
33: 11
11.
1* \
1*
1* /
00
0*
1* /
1* \
11
1* /
1* \
111
1* /
1*
00
1* /
1* \
1*
1* /
111
1*
11
1* /
00
4: 0*
1*
9: 11
1 *
1*
14: 11
1*
10*
19: 0*
1*
24: 0*
00
1*
29: 11
S1*
ii)\
1Y )
i* )
i0
ii)
U)
1*
5: 0*
00
111
10: 00
1 *
1 *
15: 1
1*
1*
20: 00
1*
11.
25: 00
S 11
S1*
30: 11
S1*
00
0*
1*
11
00
1* )
1* )
1* \
1*
1* /
1* \
111
1i*
1*
00
1I*
Figure 520. 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*
00
0*
1*
00
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
9intersection 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 515A 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 [interiorpoishared] 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 515A, intersections between both interiors (vF[seg shared],
1VF [interiorpoishared]) as well as between the boundary of one object and the interior of the
other object (VF [boundon interior], 1VG [boundon interior]) are not allowed; besides intersec
tions between both boundaries (VF [boundshared), 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 515. The 9intersection 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 515B 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 9intersection 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 22B 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 41 shows an example of a line object of the abstract model and its corresponding discrete
representation.
x x
A B
Figure 41. 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 9intersection 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 9intersection matrix in im
with respect to the matrix predicate serving as the discriminator. If such a value is 0 (false), the
corresponding 9intersection 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 9intersection 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 54 shows the results of this algorithm by giving a textual preorder (depthfirst
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 domainspecific
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 onesizefitsall 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 9intersection matrix
(as an example, see the complete matrices of the 33 topological predicates of the region/region
case in Figure 520 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 9intersection 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 9intersection 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 9intersection matrix. In a second step, this Boolean matrix
is checked consecutively for equality against all 9intersection 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 9intersection 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,
objectrelational, or objectoriented 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 9intersection 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 9intersection matrix characterization method ....... .140
5.2.3.3 Type combination dependent 9intersection matrix characteri
zation ........ ....... .. ...... 141
5.2.3.4 The 9intersection 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 TimeSynchronized Interval Refinement . . . 171
5.3.3 FunctionValued 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 39. Example of a moving balloon object of type mballoon_pr.
An example of a moving balloon object of type mballoonpr is depicted in Figure 39.
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 whileloop 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 whileloop 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 513. Special case of the plane sweep.
F G G
Figure 513. 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 9intersection
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 9intersection 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 depthfirst 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 51. Examples of the order relation on halfsegments: h\ < h2
Examples of the order relation on halfsegments are given in Figure 51. 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 mctni: 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[boundpoishared] 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 errorprone. 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
edgedisjoint faces.
A region is then defined in Definition 4.11 as a set of edgedisjoint 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 edgedisjoint if either their outer cycles are edgedisjoint, or one of the outer
cycles is edgeinside 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 42 shows an
example of a region object in both abstract and discrete representation.
Y Y
X X
x x
A B
Figure 42. 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 typespecific constraints during such evolution. Figure 43A
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:
intervalset = {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 twodimensional 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 probabilitybased 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 pointset 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 pointset, 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 regionbased
prediction is also always 0 since we cannot obtain a volume by integrating over a line. Table 32
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 32. 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 310. The density value of the point p in Figure 310A 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, axisparallel 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 minlltl2D 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 9intersection 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
highlevel 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 databaseincompatible (for example, JTS Topology Suite)
or databasespecific (for example, Informix Geodetic DataBlade, Oracle Spatial Cartridge, DB2's
Spatial Extender, SECONDO spatiotemporal module). These databasespecific 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 storageindependent.
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 [poionbound] := 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 59. 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
21 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
22 The 9intersection model and topological predicates. A) The 9intersection matrix.
B) The numbers of topological predicates between two simple/complex spatial objects. 22
23 Examples of moving objects. A) A singlecomponent moving point object. B) A single
component moving region object. C) A multicomponent moving point object. D) A
multicomponent moving region object. ................ ........ 24
24 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
31 Examples of 0continuous temporal functions. A) simultaneous movement. B) A merg
ing situation. C) A splitting situation. D) A combined merging and splitting situation. 35
32 Examples of 0discontinuous 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
33 Moving point object given by a temporal function with a local minimum and a local
maximum. ................... ............ ....... 38
34 Modeling potential future positions of spatiotemporal objects. A) For a hurricane's
eye at now+12 hours. B) Within the 12hour period. C) For a vehicle at now+15 min
utes. D) Within the 15minute period. E) For a vehicle with a constant speed at now+15
minutes. F) Within the 15minute period.. ................. ....... 42
35 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
36 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
37 Example of a historical temporal domain time that starts from  and ends at tc in
clusively. ................... ........... ..... ... 48
38 Example of a future temporal domain time that starts exclusively from tc and ex
tends indefinitely towards +. .................. .......... 48
39 Example of a moving balloon object of type mballoonpr. .. . . 52
Definition 4.15 : Let a be a nontemporal 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 tradeoff 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 timedependent 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 ifir
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
310 Examples of predictions at a time instant. A) A pointbased prediction with a discrete
probability distribution. B) A linebased prediction with a onedimensional contin
uous distribution. C) A regionbased prediction with a twodimensional continuous
distribution. .................. .................. .. .. 57
311 Relations between traditional moving object data model and balloon data model. . 64
312 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
313 Future crossing situation between a balloonpp object P and a balloonpr object R. 66
314 Movement of the eye of hurricane Katrina. ................... ....... 74
41 Representations of a line object. A) In the abstract model. B) In the discrete model. 80
42 Representations of a region object. A) In the abstract model. B) In the discrete model. 82
43 A discrete representation of a moving point object. A) A temporal unit. B) A sliced
representation .................. .................. .. 83
44 Representing a moving line object. A) A uline value. B) A discrete representation of
a moving line object. .................. .. ............ 89
45 Example of a region value. .................. ......... 90
51 Examples of the order relation on halfsegments: h < h2 . . ..... 100
52 A line2D object L and a region2D object R .................. ... .103
53 Example of the segment classification of two region2D objects . . ... 112
54 Changing overlap numbers after an intersection. ............... ..113
55 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
56 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
57 Algorithm for computing the topological feature vectors for two point2D objects 120
58 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
59 Algorithm for computing the topological feature vectors for a point2D object and a
line2D object .................. ............. .. 122
01 algorithm MatrixThinning
02 input: Threedimensional 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: Threedimensional thinned out 9IM tim.
06 tim[i,l,m] c {0,1,*}. '*' is 'don't care' symbol.
07 begin
08 Create threedimensional 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 516. 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 528.
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 leftclosed and rightclosed 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 528. Functionvalued 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 529. 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 512. The whileloop 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 537. Visualizing hurricane Katrina. A) Katrina's prediction #7 in objectbased
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 uturns (e.g., hurricane Kate (#1312) as shown in Figure 538B), or forming a loop
(e.g., hurricane Lisa (#1329) as shown in Figure 538C). 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 34. Modeling potential future positions of spatiotemporal objects. A) For a hurricane's
eye at now+12 hours. B) Within the 12hour period. C) For a vehicle at now+15
minutes. D) Within the 15minute period. E) For a vehicle with a constant speed at
now+15 minutes. F) Within the 15minute 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
34A). 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 threedimensional interpretation (Figure
34B). This volume represents the geometric union of the predicted regions at all time instants
during the 12hour 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 segshared), 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 35. Number of balloon predicates between balloon pp, balloon pr, and balloonrr
objects.
balloonpp balloonpr balloonrr
balloonpp 4,394 14,924 43,904
balloonpr 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 35. 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 (nondisjoint
relationship) or noninteractions (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 noninteraction relationship with this
future prediction component guarantees a noninteraction 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 TimeSynchronized Interval Refinement
It is obvious that the computation of the timesynchronized 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 (Figure524). 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 524. Timesynchronized 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 errorprone and lengthy.
Our approach leads to shorter, faster (by a constant factor), and more comprehensible code and
is able to handle closed, halfopen, 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 525), 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 leftclosed
and rightclosed 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 24A and 24E represent moving
objects that are alternately continuous and discontinuous on disjoint time intervals, that is, they
are represented by partial functions. Figures 24B and 24F 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
timeslice operation should be able to yield a region object at time t as a moving region object.
We also permit the cases in Figures 24C and 24G 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 24G 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
event4discontinuous.
A situation we do not allow is a spatial outlier at a time instant t as in Figure 24D. 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
eventodiscontinuous 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, costoptimal, 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 521 shows our recursive algorithm MCDT for computing a minimum cost decision
tree for a set im of na,p 9intersection 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 38 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 9intersection 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 523. 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 socalled 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 nonrotating 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 45.
Following the same structured approach for defining the region data types, we can define a
time
time i' ,~
x
Figure 45. 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 36 summarizes these
interaction inferences.
Table 36. 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 pointset
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. GeoRelational Algebra: A Model and Query Language for Geometric
Database Systems. In Int. Conf on Extending Database Technology (EDBT), pages
506527, 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 1435.
SpringerVerlag, 1993.
[31] R. H. Giiting and M. Schneider. RealmBased Spatial Data Types: The ROSE Algebra.
VLDB Journal, 4:100143, 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,):881901, 2000,.
[33] R.H. Giiting, T. de Ridder, and M. Schneider. Implementation of the ROSE Algebra:
Efficient Algorithms for RealmBased 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 224238,
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
123130. ACM, 2006.
[40] M. McKenney, A. Pauly, R. Praing, and M. Schneider. MultiStructured 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 409418, 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 {endofnone, endoffirst, 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 endoffirst (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
selectfirst, 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 interactionpotential and interactionpossible 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 :t2i1 = t2i t2i < t2i+l
(vi) V 1 < i < n Vt2i < t < t2i : f is 4continuous 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 4continuity 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 312 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 312. 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 313). 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 538. 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 verifypredictionat 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 39. 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,
oo
n
a
S S
S
~aa
ss
55
0O
c~g~
E
E
,s:
E
s~t~
9 "
~sa
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 tt 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
qlqE
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 pointset 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 (nondisjoint) 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 nontemporal
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 31. 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 23D, 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 0continuous from the bottom at t if, and only if, lim 0 f(t ) f(t)
(ii) f is 0continuous from the top at t if, and only if, lim 0 f(t + o) f(t)
(iii) f is Ocontinuous at t if, and only if, lim f(t ) f(t
(iv) f is Odiscontinuous at t if, and only if, f is not 4continuous at t
time time time time
x x x x
A B C D
Figure 31. Examples of 4continuous 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 23A and Fig
ure 23B are 4continuous on the open intervals indicated by the dashed lines. They are 4
discontinuous at the time interval endpoints since they are 4continuous from the top at the lower
endpoints, and Ocontinuous 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 510. Algorithm for computing the topological feature vectors for a point2D object and a
region2D object
poionseg, predofp, 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, builtin or userdefined 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 523), 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 314. 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 314). 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 37 illustrates an
example of a historical temporal domain time for a moving object.
defined intervals
ta time
time
Figure 37. 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 38. 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 54. MCDT preorder representations for all type combinations on the basis of equal
probability of occurrence of all topological predicates.
Type combination MCDT preorder 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 024 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 preorder 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 preorder 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 9intersection matrix number of a
topological predicate. The matrix numbers are specified in the Figures 517, 518, 519 and 520
as well as in [50, 59].
Figures 522 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 typespecific 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
4discontinuous 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 4tuple (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 nontemporal 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 balloonpp, a balloonpl, and a
balloonpr object are shown in Figure 36A, 34D, and 36B 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 boundpoidisjoint). 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 whileloop 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 selectnext
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 nontemporal 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 multicomponent) spatial
object (Section 2.1.1) at each time instant at which it is defined; a singlecomponent spatial
object as a function value at a time instant is thus a special case. Figures 23A and 23B show
singlecomponent moving point and moving region objects respectively while Figures 23C and
Application
Figure 533. The integration of algebra in extensible DBMSs
CREATE TABLE mbpptable(
id integer primary key,
description varchar2(64),
mbpp mballoonpp
Figure 534. Creating a table using a userdefined type.
Assuming that we have populated this table with a few moving balloon objects. We can
then pose a query (Figure 535) 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 535. Using a userdefined 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
SometimeDefinitelyInside 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.1NonTemporalDataTypes ............................. 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.1GeneralRequirementsofDatabaseCompatibleDataStructures ...... 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.2The9intersectionmatrixcharacterizationmethod ....... 140 5.2.3.3Typecombinationdependent9intersectionmatrixcharacterization ............................... 141 5.2.3.4The9intersectionmatrixcharacterizationforregion/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.2TimeSynchronizedIntervalRenement .................. 171 5.3.3FunctionValuedIntervalRenementandDevelopmentDetermination .. 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 31Operationsonhistoricalmovementsandfuturepredictionsofmovingobjects. ..... 55 32Valueoftheoperationpointset conf(j(a);b;instant)foreachcombinationofj(a)andbwhetheritisalways0,denotedbyavalue0,orameaningfulvalue,denotedbyavalueM. ......................................... 56 33Operationsonballoonobjectsandmovingballoonobjects. ............... 60 34Assigningnamingprexestopairwisecombinationsofinteractions. .......... 67 35Numberofballoonpredicatesbetweenballoon pp,balloon pr,andballoon rrobjects. 69 36Inferringthetypesofinteractionbetweenactualobjectsfromthetypesofinteractionbetweentheirpredictions. ................................. 70 51StaticanddynamichalfsegmentsequencesoftheregionsR1andR2inFigure 56 ... 116 52Possiblesegmentclassconstellationsbetweentwoconsecutivesegmentsinthesweeplinestatus. ......................................... 136 53Summaryofcompleteandthinnedout9IMsforthetopologicalpredicatesofalltypecombinations. ....................................... 156 54MCDTpreorderrepresentationsforalltypecombinationsonthebasisofequalprobabilityofoccurrenceofalltopologicalpredicates. .................... 161 55SummaryoftheMCDTsforalltypecombinationsonthebasisofequalprobabilityofoccurrenceofalltopologicalpredicates. ........................ 164 56Intervalendpointordering. ................................ 173 8
PAGE 9
Figure page 21Examplesofspatialobjects.A)Asimplepointobject.B)Asimplelineobject.C)Asimpleregionobject.D)Acomplexpointobject.E)Acomplexlineobject.F)Acomplexregionobject. .................................. 21 22The9intersectionmodelandtopologicalpredicates.A)The9intersectionmatrix.B)Thenumbersoftopologicalpredicatesbetweentwosimple/complexspatialobjects. 22 23Examplesofmovingobjects.A)Asinglecomponentmovingpointobject.B)Asinglecomponentmovingregionobject.C)Amulticomponentmovingpointobject.D)Amulticomponentmovingregionobject. ......................... 24 24Examplesofspatiotemporalfunctionsformovingpoints.A)Partiallydisappear.B)Instantlyappear.C)Haveinstantaneousjumps.D)Havespatialoutliers.Examplesofspatiotemporalfunctionsformovingregions.E)Partiallydisappear.F)Instantlyappear.G)Haveinstantaneousjumps.H)Anexampleofaspatiotemporalpredicate. 26 31Examplesoffcontinuoustemporalfunctions.A)simultaneousmovement.B)Amergingsituation.C)Asplittingsituation.D)Acombinedmergingandsplittingsituation. 35 32Examplesoffdiscontinuoustemporalfunctions.A)Aninstantaneousjumpinanmrealobject.B),C)Twoconstellationswithtimeinstantsatwhichthefunctioniseventfdiscontinuous. .................................. 36 33Movingpointobjectgivenbyatemporalfunctionwithalocalminimumandalocalmaximum. ........................................ 38 34Modelingpotentialfuturepositionsofspatiotemporalobjects.A)Forahurricane'seyeatnow+12hours.B)Withinthe12hourperiod.C)Foravehicleatnow+15minutes.D)Withinthe15minuteperiod.E)Foravehiclewithaconstantspeedatnow+15minutes.F)Withinthe15minuteperiod. ......................... 42 35Representingthefuturepredictionofahurricane'seyeusingamovingregionwithamovingcondencedistribution.Thegradientindicatesvarieddegreeofcondence. .. 45 36Examplesofvalidfuturepredictions.A)Acontinuousfpointobject.B)Acontinuousfregionobject.C)Adiscontinuousfregionobject.Anexampleofinvalidfuturepredictions.D)Adimensionallycollapsedobjectwithmultipletypes. ......... 46 37Exampleofahistoricaltemporaldomaintimehthatstartsfromandendsattcinclusively. ......................................... 48 38Exampleofafuturetemporaldomaintimefthatstartsexclusivelyfromtcandextendsindenitelytowards+. .............................. 48 39Exampleofamovingballoonobjectoftypemballoon pr. ............... 52 9
PAGE 10
........................................ 57 311Relationsbetweentraditionalmovingobjectdatamodelandballoondatamodel. .... 64 312PossiblerelationshipsbetweenpartsofballoonobjectsAandB.A)WhenA'scurrentinstantisearlier.B)Atthesametime.C)LaterthanthatofB's. ............. 65 313Futurecrossingsituationbetweenaballoon ppobjectPandaballoon probjectR. .. 66 314MovementoftheeyeofhurricaneKatrina. ........................ 74 41Representationsofalineobject.A)Intheabstractmodel.B)Inthediscretemodel. .. 80 42Representationsofaregionobject.A)Intheabstractmodel.B)Inthediscretemodel. 82 43Adiscreterepresentationofamovingpointobject.A)Atemporalunit.B)Aslicedrepresentation. ....................................... 83 44Representingamovinglineobject.A)Aulinevalue.B)Adiscreterepresentationofamovinglineobject. ................................... 89 45Exampleofauregionvalue. ............................... 90 51Examplesoftheorderrelationonhalfsegments:h1
PAGE 11
...................................... 125 511Algorithmforcomputingthetopologicalfeaturevectorsfortwoline2Dobjects .... 127 512Algorithmforcomputingthetopologicalfeaturevectorsforaline2Dobjectandaregion2Dobject ...................................... 131 513Specialcaseoftheplanesweep. ............................. 132 514Algorithmforcomputingthetopologicalfeaturevectorsfortworegion2Dobjects ... 135 515The9intersectionmatrices.A)Matrixnumber8forthepredicatemeetbetweentwolineobjects.B)Matrixnumber7forthepredicateinsidebetweentworegionobjects. 138 516Algorithmforcomputingthethinnedoutversionsofthena;bintersectionmatricesassociatedwiththetopologicalpredicatesbetweentwospatialdatatypesaandb 153 517Completeandthinnedoutmatricesforthe5topologicalpredicatesofthepoint/pointcase. ............................................ 154 518Completeandthinnedoutmatricesforthe14topologicalpredicatesofthepoint/linecase. ............................................ 155 519Completeandthinnedoutmatricesforthe7topologicalpredicatesofthepoint/regioncase. ............................................ 155 520Completeandthinnedoutmatricesforthe33topologicalpredicatesoftheregion/regioncase. ............................................ 155 521Minimumcostdecisiontreealgorithm .......................... 159 522Minimumcostdecisiontrees.A)Forthe5topologicalpredicatesofthepoint/pointcase.B)Forthe7topologicalpredicatesofthepoint/regioncase.C)Forthe14topologicalpredicatesofthepoint/linecaseundertheassumptionthatalltopologicalpredicatesoccurwithequalprobability. ............................ 162 523Spatiotemporalpredicateevaluatoralgorithm. ...................... 170 524Timesynchronizedrenementoftwounitintervalsequences:twosetsoftimeintervalsontheleftside,andtheirrenementpartitionfordevelopmentevaluationontherightside. ......................................... 171 525Timesynchronizedintervalrenementalgorithm. .................... 172 526NextAlgorithm. ...................................... 174 527IntersectingunitsegmentsoftwomovingpointsrepresentingthedevelopmentDisjoint.meet.Disjointandthusrequiringafurtherintervalrenement. ......... 174 528Functionvaluedintervalrenementalgorithm. ...................... 175 11
PAGE 12
................................ 176 530Patternmatchingalgorithm. ................................ 179 531Balloonpredicateevaluatoralgorithm. .......................... 181 532RegistrationofadatatypeandanoperationinOracle. .................. 183 533TheintegrationofalgebrainextensibleDBMSs ..................... 185 534Creatingatableusingauserdenedtype. ........................ 185 535UsingauserdenedfunctioninSQLquery. ....................... 185 536VisualizationofhurricaneKatrinausingtheMovingBalloonAlgebra. ......... 187 537VisualizinghurricaneKatrina.A)Katrina'sprediction#7inobjectbasedperspectives.B)TemporalanalysisperspectiveonAugust27,2005at12:00GMT. ...... 189 538Hurricaneanalysis.A)Hurricanepredictionanalysisbetween2003and2007.B)HurricaneKate(#1312).C)HurricaneLisa(#1329). ..................... 190 61Predicatevericationwithoutandwithmatrixthinning ................. 194 62PredicatedeterminationwithoutandwithMCDT .................... 196 12
PAGE 13
Spatiotemporaldatabasesdealwithgeometrieschangingovertime.Recently,movingobjectslikemovingpointsandmovingregionshavebeenthefocusofresearch.Theyrepresenttimedependentgeometriesthatcontinuouslychangetheirlocationand/orextentandareinterestingformanydisciplinesincludingthegeosciences,geographicalinformationscience,movingobjectsdatabases,locationbasedservices,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,thusneglectingexternalfactorsordomainspecicparameterswhichmaysignicantlyaffectthefuturemovementsofmovingobjects.Forinstance,informationsuchasatmosphericpressures,temperaturezones,windandoceancurrentsplaysamajorroleinpredictingthefutureevolutionofahurricane.Thisrequireshighlyspecializedandsophisticatedpredictionmodelsandalgorithmsbeyondthoseinwhichonlythepastandcurrentobjectmovementsareconsideredassystemparameters.Infact,thedevelopmenteffortforsuchpredictionmodelsisadisciplinebyitselfandataskofdomainexperts.Inaddition,differentapplicationdomainsmayrequiredifferentpredictionmodels.Forexample,topredictthefuturespreadofaforestre,onemayconsideradifferentsetofparameterssuchasthevolumeofrefuel(forexample,drybrush),surfaceslope,andthecapabilityofresponsiveactionsfromreghtersinadditiontoatmosphericconditionssuchaswindandhumidity.Thus,itisimpossibletodeneaonesizetsallpredictionmodelforallapplications.However,wecanassumethatthenatureoftheoutputsofdifferentpredictionmodelsisthesame,oratleastverysimilar.Suchanoutputconsistsofadescriptionofapredictedmovementaswellasameasureofcondence(forexample,probability,fuzziness,roughness)expressingthereliabilityoftheprediction.Wecanrepresentthepredictedmovementthroughspatiotemporaldatatypes.Wedonotseeitasthecapabilityandthetaskofadatabasesystemtopredictthefuturemovementof 16
PAGE 17
Thethirdproblemisthelackofanintegrated,seamless,anduniedmodelthatcansimultaneouslyrepresentthehistoricalandthefuturemovementsofamovingobjectindatabases.Atatimeinstantt,amovingobjectdoesnotonlyhaveahistoryofitsmovementuptoitsstateattbutitcanalsohaveafuturepredictionstartingatt.Sofar,existingmodelssupporteitherhistoricalmovementsorfuturemovementsonlybutnotbothtogether.Butmodelingthepastandfuturemovementsofanobjectrequiresbothconcepts.Thismeansthatspecialattentionisneededtoaccommodatebothconceptsinasinglemodelsothattheycanbeappliedtothesameobjectwithoutconictingeachotherandsothatspatiotemporaloperationsandpredicatesonmovingobjectscanbeappliedtotheentiretemporaldomain. Attheimplementationlevel,implementationsofspatiotemporaldatatypesarerareandaregenerallydoneaspartofresearchprototypedatabasesystems.Ageneralproblemisthatmanyusefulconceptsandtheirimplementationsinsuchresearchprototypes,whicharetailormadeforacertainproblemareaandutilizeaspecializedinfrastructure,cannotbeeasilytransferredtocommonlyusedcommercialdatabasemanagementsystems(CDBMS).Therefore,theseimplementationsandtheprototypesofferingthemdonotndanadequateappreciationduetotheirincompatibilitywithcommonlyusedCDBMS.Thiseffectivelylimitstheaccessibilityandusabilityofsuchimplementations.Toaddressthisproblem,animplementationofspatiotemporaldatatypesandoperationsmustbedatabaseindependentandatthesametimecanbeintegratedintoanyextensibleDBMSthroughitsextensibilitymechanism. 17
PAGE 18
19 ]).Basically,theadvantageoftheabstractlevelisthatitfocusesontheessenceoftheproblem,isconceptuallycleanandsimple,andisnotimpededbycomputerspecicconstraintsresultingfromthenitenessofcomputersystems.Theadvantageofthediscretelevelisthatitsniterepresentationsaredenedbytakingintoaccountthelimitationofcomputersystemswhilemaintainingtheconceptualconstraintssetforthbytheabstractmodel.Ingeneral,severalniterepresentationsarepossibleforthesameabstractconcept.Forexample,curvescouldalsoberepresentedassplinesatthediscretelevel.Anotherdesignlevelalsoexistscalledimplementationlevel.Inthislevelofmodeling,specicdatastructuresandalgorithmscanbedenedbasedontheniterepresentationsetforthbythediscretemodel.Forexample,datastructuressuchasarraysorlistsoflinesegmentsmaybeusedtoimplementthepolylinerepresentationofcurves,andalgorithmssuchastheplanesweepalgorithmorothersegmentintersectionalgorithmscanbeusedtoimplementoperationsbetweenpolylines.ThedesignoftheMovingBalloonAlgebradescribedinthisresearchispresentedateachofthesethreeabstractionlevels. TheMovingBalloonAlgebraisbasedonthemetaphorofaballoontomodelourknowledgeofamovingobjectataspecictimeinstant:thestringandthebodyofaballoonobjectrepresenttheknownpastmovementandthepredictedfuturemovementofamovingobjectrespectively. 18
PAGE 19
Withthismodel,wesolvethersttwoconceptualproblemsbyprovidingapreciseandformaldenitionofmoving(balloon)objectsalongwithappropriatespecicationsofthepropertiesoftheirmovements.Wesolvethethirdconceptualproblembyseamlesslymodelingthedynamicofboththepast(asfacts)andthefuture(aspredictions)throughballoonobjects.Besidealreadyavailableconceptsthatweintendtopreserveandrene(liketheapproachesin[ 22 32 ]),weintroducenewfunctionalitysuchastheabilitytoanalyzetheaccuracyofpredictionsovertime.Wealsoofferaninterfaceforcooperatingwithspecic(forexample,probabilistic,fuzzy)predictionmodelsformovingobjects.Finally,weaddresstheimplementationproblembydesigninganimplementationmodeloftheMovingBalloonAlgebrathatcanbeusedtoimplementthealgebraasatypesystemlibrarywhichcanbeintegratedintoanextensibleDBMS.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. 21 AC)[ 12 29 48 ].Sincethesesimplegeometricstructuresareunabletorepresentthevarietyandcomplexityofgeographicphenomena,thesecondgenerationofdatamodelsprovidesmoreexpressiverepresentationsofspatialobjectsthatallowsupportformulticomponentobjectsaswellasobjectswithholes[ 5 44 59 62 ].Theyarerepresentedbycomplexspatialdatatypesforcomplexpoints,complexlines,andcomplexregions(Figure 21 DF).Theirformaldenitioncan,forexample,befoundin[ 59 ].Informally,acomplexpointobjectisanitesetofsinglepoints.Acomplexlineisdenedasaninnitepointsetthatstructurallyconsistsofanitesetofblocks.Eachblockcontainsanitenumberofsimplelines.Acomplexregionisdenedasaninnitepointsetthatstructurallyconsistsofanitesetoffaces.Eachfacehasanoutersimpleregionandcontainsanitesetofdisjointsimpleregionscalledholes. 20
PAGE 21
Figure21. 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 ]basedonspatiallogicandthe9intersectionmodel[ 13 15 ]basedonpointsettopology.The9intersectionmodeldenestopologicalrelationshipsbasedontheninepossibleintersectionsoftheboundary(A),theinterior(A),andtheexterior(A)ofaspatialobjectAwiththecorrespondingcomponentsofanotherobjectB.Eachintersectionistestedwithregardto 21
PAGE 22
22 A. Topologicalrelationshipshavebeenrstinvestigatedforsimplespatialobjects(Figure 22 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;multipartregionsarenotpermitted.Amainproblemofthisapproachisitsdependenceonthenumberofholesoftheoperandobjects. Theworkin[ 59 ],withtwoprecursorsin[ 2 ]and[ 58 ],givesathorough,systematic,andcompletespecicationoftopologicalrelationshipsforallcombinationsofcomplexspatialdatatypes.Detailsaboutthedeterminationprocessandprototypicaldrawingsofspatialscenariosvisualizingalltopologicalrelationshipscanbefoundinthesepublications.Thisapproach,whichisalsobasedonthe9intersectionmodel,isthebasisofourtopologicalpredicateimplementationinSection 5.2 .Figure 22 Bshowstheincreaseoftopologicalpredicatesforcomplexobjects point 2/53/143/7line 3/1433/8219/43region 3/719/438/33AB Figure22. The9intersectionmodelandtopologicalpredicates.A)The9intersectionmatrix.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 ].Foranarbitrarynontemporaldatatypea,itscorrespondingtemporaldatatypeisprovidedbyatypeconstructort(a)whichisafunctiontypethatmapsfromthetemporaldomaintimetoa,thatis,t(a)=time!a.Byapplyingthetypeconstructorttothespatialdatatypespoint,line,andregion,weobtainthecorrespondingspatiotemporaldatatypesnamedmpointformovingpoints,mlineformovinglines,andmregionformovingregions[ 19 ]: 2.1.1 )ateachtimeinstantatwhichitisdened;asinglecomponentspatialobjectasafunctionvalueatatimeinstantisthusaspecialcase.Figures 23 Aand 23 BshowsinglecomponentmovingpointandmovingregionobjectsrespectivelywhileFigures 23 Cand 23
PAGE 24
Figure23. Examplesofmovingobjects.A)Asinglecomponentmovingpointobject.B)Asinglecomponentmovingregionobject.C)Amulticomponentmovingpointobject.D)Amulticomponentmovingregionobject. 23 Dillustratecorrespondingmulticomponentobjects.AnapplicationexampleforFigure 23 Disabrushrethatoriginatesatdifferentlocationsatdifferenttimes. Thetypeconstructortisdenedinaverygeneralwayandallowsanykindoftemporalfunction.Forinstance,wecoulddeneafunctionthatmapseachtimeinstantrepresentedbyarationalnumbertothepoint(1;1)andeachtimeinstantrepresentedbyanirrationalnumbertothepoint(2;2).However,thisdoesnotdescribemovement,andhencethequestioniswhichspatiotemporalfunctionsrepresentvalidmovements.Forexample,theunrestricteddenitionoftalsoallowsamovingpointtomovecontinuously(Figures 23 A, 23 B),disappearforperiodsoftime(Figure 24 A, 24 E),appearinstantly(Figures 24 B, 24 F),havespatialoutliers(Figure 24 D),orhaveinstantaneousjumps(Figures 24 C, 24 G).Adenitionismissingthatpreciselystateswhichspatiotemporalfunctionsrepresentallowedmovementsandwhichfunctionsdonotconformtoourintuitiveunderstandingofmovement.Furthermore,thisapproachdoesnotsupportfuturepredictionsofmovingobjects.Inourmodel,weemployasimilarapproachofusingatypeconstructortoconstructspatiotemporaltypesforrepresentinghistoricalmovementsofmovingobjects.However,wetaketheextrastepofpreciselyspecifyingthepropertiesofobjectmovementsaswellasdescribinghowanobjectmovesandevolvesinthepastandhowitsfuturepredictedmovementandextensioncanberepresented. Basedonthemovingobjectsmodeljustdescribed,theSTPmodelpresentedin[ 22 ]providesspatiotemporalpredicatesforpastmovementsandisabletocharacterizethetemporal 24
PAGE 25
24 HdepictsthespatiotemporalpredicateCross.Inotherwords,aspatiotemporalpredicatebetweentwomovingobjectsisatemporalcompositionofperiodandinstantpredicatesbetweenthetwoobjects.TheSTPmodelisonlyabletocapturethetemporaldevelopmentoftopologicalrelationshipsbetweenhistoricalmovingobjects.Butitisunabletorepresenttheuncertaintyofthetopologicalrelationshipsbetweenpredictedmovingobjectsaswellasthecombinationofpastandfuturedevelopmentsoftopologicalrelationships. 60 ],whichisbasedontheconceptofmotionvector,isabletorepresentnearfuturedevelopmentsofmovingobjectsthroughtheassumptionontheobjects'inertiathatthecurrentmotiondirectiondoesnotchangeinthenearfuture.Althoughthismodelisabletorepresentthenearfuturemovementofamovingobject,thepredictedmovementislimitedtoasinglemotionconceptthatcannotbemodied.Theaspectofuncertaintysuchastheprobabilityofoccurrenceisnotpartofthemodel.Othermodelsareabletocapturetheuncertaintyaspectoffuturemovementsthroughtheuseofatrajectoryormotionplanwithaconstant[ 26 ]orvariableuncertaintythreshold[ 43 ].Theapproachin[ 38 ]makesuseofaconceptcalledspacetimeprismtomodeltheuncertaintyofmovementbetweenknownstatesofanobject'strajectorywithcertainassumptionsontheobject'svelocity.Anotherapproachpresented 25
PAGE 26
EFGH Figure24. 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.Thisleadsustothequestionhowthechangebetweentwononspatialobjects,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
32 Agivesanexampleofthissituation.Thedashedlineattimetrepresentsaninstantaneousjumpandconnectsthemovementbeforeandafterthejump.Thehollowcircleindicatesthatthisisnotthefunctionvalueattimet;itisgivenbythefullcircle. Thesituationisdifferentfortemporalobjectsbasedonspatialdatatypes,thatis,formoving(spatial)objects.Ateachtimeinstantofitsdomain,amovingobjectmayincludemultiplesimplespatialvalues.Apointobjectmayconsistofseveralsinglepoints,alineobjectmayincludeseveralblocks,andaregionobjectmayincorporateseveralfaces(Section 2.1.1 ).Thiscan,forexample,beillustratedwithFigure 23 Cinwhichanyplaneparalleltothe(x;y)planeandbetweenthetwodashedlinesintersectsthemovingpointobjectinasetofone,two,orthree 34
PAGE 35
23 D,aplaneparalleltothe(x;y)planebetweenthetwoupperdashedlinesintersectsthemovingregionobjectinasetoftwofacesmakinguparegionobject.Themultiplesimplevaluesofamovingobjectatatimeinstantmaymovesimultaneouslyovertime,stayseparatefromeachother,interact,coincide,merge,split,partiallystoptoexist,orpartiallystarttoexist.Thegoalofthefollowingdenitionsistoallowthesedifferentbehaviors. InDenition 3.4 ,wespecifytheimportantconceptofcontinuityatatimeinstantforamovingobject.ItrestsonthelimitconceptofDenition 3.3 (i)fisfcontinuousfromthebottomattif,andonlyif,limfd!0f(td)=f(t)(ii)fisfcontinuousfromthetopattif,andonlyif,limfd!0f(t+d)=f(t)(iii)fisfcontinuousattif,andonlyif,limfd!0f(td)=f(t)(iv)fisfdiscontinuousattif,andonlyif,fisnotfcontinuousatt Figure31. Examplesoffcontinuoustemporalfunctions.A)simultaneousmovement.B)Amergingsituation.C)Asplittingsituation.D)Acombinedmergingandsplittingsituation. Thisdenitionimplies,forexample,thatthemovingobjectsinFigure 23 AandFigure 23 Barefcontinuousontheopenintervalsindicatedbythedashedlines.Theyarefdiscontinuousatthetimeintervalendpointssincetheyarefcontinuousfromthetopatthelowerendpoints,andfcontinuousfromthebottomattheupperendpoints.Wendsimilarsituations 35
PAGE 36
31 A(simultaneousmovement), 31 B(amergingsituation), 31 C(asplittingsituation),and 31 D(acombinedmergingandsplittingsituation)whichalsosatisfythepropertyoffcontinuityintheopentimeintervalsandfdiscontinuityinthetimeintervalendpoints.NotethatinFigure 31 D,themovingpointobjectisfcontinuousatthetimeinstantwhenitstwocomponentsintersect. ABC Figure32. Examplesoffdiscontinuoustemporalfunctions.A)Aninstantaneousjumpinanmrealobject.B),C)Twoconstellationswithtimeinstantsatwhichthefunctioniseventfdiscontinuous. Thediscontinuitiesatthetimeintervalendpointsareallowedandareexamplesoftopologicalevents.Theyariseheresincethemovingobjectsareundenedoutsidethesetimeintervals.Anotherviewisthatcomponentsofamovingobjectstarttoexistatlowerintervalendpointsandceasetoexistatupperintervalendpoints.DiscontinuitiescanalsobefoundinFigures 23 Cand 23 DaswellasinFigures 24 AtoG.Surprisingly,mostdiscontinuitiesdescribeameaningfulandthuscorrecttemporalbehaviorofmovingobjectsandhavetobepermitted.Thereasonisthatmultiplesimplespatialvaluesofthesamemovingobjectmayevolveindependently.Intuitively,atopologicaleventarisesinFigures 23 Cand 23 Dwhenthenumberofbasicsimplevalueschangesatatimeinstant.Figures 32 Band 32 Cillustratethisinmoredetail.ThemovingobjectinFigure 32 Bisfcontinuousfromthetopbutnotfromthebottomatt1(changefromzerotoonecomponent)andt2(changefromonetotwocomponents)aswellasfcontinuousfromthebottombutnotfromthetopatt3(changefromtwotoonecomponent)andt4(changefromonetozerocomponents).Figure 32 Cshowsacasewhenamovingobjectisneitherfcontinuousfromthetopnorfromthebottomatatimeinstantt(changefromtwocomponentsbeforetto 36
PAGE 37
24 Aand 24 Erepresentmovingobjectsthatarealternatelycontinuousanddiscontinuousondisjointtimeintervals,thatis,theyarerepresentedbypartialfunctions.Figures 24 Band 24 Fillustratethecaseofaninstantlyappearingmovingobjectwithisolated(time,spatialobject)pairs.Weallowthiskindofdiscontinuityalthoughitisdebatablewhetheramovingobjectcanexistatatimeinstantonly.Ourmainmotivationtoallowthissituationconsistsindesiredclosurepropertiesofspatiotemporaloperations.If,forexample,twomovingpointobjectsintersectinasinglepointatatimet,wewouldliketobeabletorepresenttheintersectionresultasamovingpointobject.Similarly,atimesliceoperationshouldbeabletoyieldaregionobjectattimetasamovingregionobject.WealsopermitthecasesinFigures 24 Cand 24 Gasvalidmovingobjects.Thereasonisthatinstantaneousjumpscanalsobeinterpretedastheterminationofonecomponentandtheemergenceofanothercomponentatthesametimeinstant.Figure 24 Galsoshowstwointerestingsituationswherethebottomregionofanuppercomponentislocatedinthetopregionofaloweradjacentcomponent.Thefunctionvalueatsuchatimeinstantisthelargerregion.Again,itisdoubtfulwhethersuchaninstantaneousshrinking(orgrowing)canhappeninspatialrealitybutclosurepropertiesrequiretheacceptanceofsuchsituations.Aunionofthreemovingregionobjects,eachrepresentingoneofthethreecomponents,leadstothemovingregioninFigure 24 G.Wedenoteallaforementionedsituationsofpermitteddiscontinuoustopologicaleventsaseventfdiscontinuous. AsituationwedonotallowisaspatialoutlieratatimeinstanttasinFigure 24 D.Itisgivenbyatemporalfunctionthatdoesnotrepresentarealisticmovementsinceintuitivelyitdeviatesfromitsgeneralrouteandreturnstoitforatimeinstantonly.Denition 3.5 providesthefulldenitionofeventfdiscontinuity. 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)sinceequalitywouldmeanfcontinuityattincontrasttoourassumption(Denition 3.5 (v)). Figure33. Movingpointobjectgivenbyatemporalfunctionwithalocalminimumandalocalmaximum. Aninterestingobservationisthatthepropertyofmonotonicitywithrespecttothetimeaxisdoesnotplayaroleforthedenitionofmovement.Thereasonisthatcomplex(andnotsimple)spatialobjectsarethebasisofconstructingmovingobjects.Figure 33 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.WepresentcorrespondingspatiotemporaldatatypesinSection 3.1.3.2 Weconsiderafewexamplesinordertounderstandtheuncertainnatureofmovingobjectsinthefutureandtherequirementsoftheirrepresentation.Thecentralissueistherepresentation 41
PAGE 42
DEF Figure34. Modelingpotentialfuturepositionsofspatiotemporalobjects.A)Forahurricane'seyeatnow+12hours.B)Withinthe12hourperiod.C)Foravehicleatnow+15minutes.D)Withinthe15minuteperiod.E)Foravehiclewithaconstantspeedatnow+15minutes.F)Withinthe15minuteperiod. ofthepotentialfuturepositionsand/ortheextentofapredictedmovingobjectsincebothitspositionsanditsextentareafictedwithuncertainty.Forexample,thepositionoftheeyeofahurricaneat12hoursfromnowmaypossiblybeanywherewithinapredictedregion(Figure 34 A).Thatis,thisregionrepresentsallpotentialfuturepositionsofthehurricane'seyeat12hoursfromnow.Likewise,ifweareinterestedinthefuturepositionsforacertainperiodinthefuture,forexample,fromthepresenttimeto12hoursinthefuture,thentheactualpositioncanbeanywherewithinapredictedvolumeifweadoptathreedimensionalinterpretation(Figure 34 B).Thisvolumerepresentsthegeometricunionofthepredictedregionsatalltimeinstantsduringthe12hourperiod.Itcanalsobeinterpretedasthedevelopmentofapredictedregionoveraperiodoftime.Hence,itresemblesamovingregionwhichcanberepresentedbyusingourspatiotemporaldatatypet(region). Similarly,ifwewanttomodelthefuturepositionofavehicletravelinginaroadnetwork,wecanonlystatethatthepositionofthevehicleat15minutesfromnowwillbesomewherebetweenmilemarker10and15.Thatis,thecorrespondingsegmentoftheroadrepresentsthe 42
PAGE 43
34 C).Similarstatementscanbemadeforothertimeinstantssuchasat5minutesand10minutes.Byformingthegeometricunionofthepredictedroadsegmentsatalltimeinstantsduringthe15minuteperiod,weobtainasurfaceinthethreedimensionalspace(Figure 34 D).Thissurfacerepresentsallpotentialpositionsofthevehicleduringthe15minuteperiod.Thesurfacecanalsoberegardedasthedevelopmentofapredictedroadsegmentoveraperiodoftime.Hence,ithasthesamefeatureasamovinglineandcanthusberepresentedbyusingourspatiotemporaldatatypet(line). Incasethatthevehiclealwaysmaintainsaconstantspeed,wecanmorepreciselysaythatitspositionat15minutesfromnowwillbeataspecicpoint(iftheroaddoesnotsplit)oramongasetofpoints(iftheroadsplits)(Figure 34 E).Inthiscase,thepotentialpositionsofthevehicleoveraperiodoftimecanbemodeledasamovingpointandcanthusberepresentedbyourspatiotemporaldatatypet(point)(Figure 34 F). Sofar,wehaveassumedthatapointobjectmoves.Ifweconsideranobjectwithextentlikealineobject,itsfuturepredictionovertimecanbedescribedbyeitheramovinglineoramovingregiondependingontheenvironmentandthenatureofitsmovement.Forexample,ifwetreatatrainasalineobjectduetoitspossiblyverylonglength,thefuturepredictionofitsextentinarailroadnetworkatatimeinstantinthefuturecanberepresentedbyalineobject.Foraperiodoftime,thedevelopmentofthepredictioncanberepresentedbyamovinglineobjectoftypet(line).Ifweconsiderthemovementoftheboundarybetweenfreshwaterofariverandsaltwaterofanoceanwheretheriverowsinto,wemayusearegiontorepresentthepotentialwhereaboutoftheboundaryatatimeinstantinthefuture.Thisisbecausethemovementoftheboundaryinanoceanisunrestricted.Foraperiodoftime,thedevelopmentofthisregioncanberepresentedbyamovingregionobjectoftypet(region). Theothertypeofobjectwithextentotherthanalineobjectisaregionobject.Foraregionobjectsuchasastorm,afuturepredictionofitsextentataninstantinthefutureisalwaysaregion.Thisisbecauseitiscounterintuitivetopredicttheextentofastormtobealineobjector 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
Figure35. Representingthefuturepredictionofahurricane'seyeusingamovingregionwithamovingcondencedistribution.Thegradientindicatesvarieddegreeofcondence. Toillustratetheconceptspresented,considertheexampleofahurricane.Wecanmodelthesetofpotentialpositionsoftheeyeofthishurricaneusinganhregionobject(Figure 34 B).Byapplyingamovingcondencedistributiononthehregionobject,weobtainanewkindofobjectwhichrepresentsthesetofpotentialfuturepositions,eachwithadegreeofcondence,ofthehurricane'seye(Figure 35 ).Thismeansthatthefuturemovementtrajectoryofthehurricane'seyeispredictedtobeapartofthisobject.Wedenethedatatypesforthiskindofobjectsinthenextsection. 45
PAGE 46
36 ABCD Figure36. Examplesofvalidfuturepredictions.A)Acontinuousfpointobject.B)Acontinuousfregionobject.C)Adiscontinuousfregionobject.Anexampleofinvalidfuturepredictions.D)Adimensionallycollapsedobjectwithmultipletypes. Itisimportanttounderstandthatthesefuturedatatypesaredenedonlyforfuturepredictionsofmovingobjects.Theydonotmakeanyreferenceorassumptiononthehistoricalspatiotemporaldatatypesofthemovingobjects.Forexample,anobjectoftypefregioncanbeusedtorepresentthefuturepredictionofeitheramovingpoint,amovingline,oramovingregion.Tomodelthenatureofmovementofamovingobjectproperly,werequireboththepastmodelandthefuturemodel.Wewillseeinthenextsectionthatnotallcombinationsofthepastandfuturedatatypesrepresentvalidmovements. 46
PAGE 47
3.2.1 torepresentsnapshots(eachconsistingofahistoryofmovementandpossiblyaprediction)ofourknowledgeaboutmovingobjectsatspecictimeinstantsoftheirmovement.Basedonthisconcept,thespatiotemporaldevelopmentofthisknowledgewhichisacontinuousstreamofthesesnapshotsisthenrepresentedbyourspatiotemporalballoondatatypesdenedinSection 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 37 )possiblyduetodelayinobtainingsensordata.Ontheotherhand,itisimpossiblefortctobelater(younger)thantheabsolutepresent.Thiswouldmeanthattheobjecthasalreadymovedinthefuturewhichisimpossible.Hence,itisrequiredthattctaholdsforallmovingobjects.We 47
PAGE 48
37 illustratesanexampleofahistoricaltemporaldomaintimehforamovingobject. Figure37. Exampleofahistoricaltemporaldomaintimehthatstartsfromandendsattcinclusively. Forfuturepredictionsofmovingobjects,wehavedenedatypeconstructorj(b)whichacceptsasaparameteraspatialtypebwhosevaluerepresentsthesetoffuturepositionsorextentofamovingobjectataspecicinstantinthefuture.Here,wewouldliketorestrictthetemporaldomainofthefuturedatatypesproducedbyjsuchthatthesedatatypesdescribeonlythefuturepredictionsofmovingobjects. Figure38. Exampleofafuturetemporaldomaintimefthatstartsexclusivelyfromtcandextendsindenitelytowards+. Wedeneatemporaldomaintimefforfuturepredictionsofamovingobjectasahalfinniteopenintervaloftimewhichstartsexclusivelyfromtcandextendsindenitelytowards+.Hence,timef=(tc;+).Wechoosetobegintimeffromtcbecausethiswouldallowapredictiontobemadeasclosetothelatestknownstateoftheobjectasdesiredirrespectivetothe 48
PAGE 49
38 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 36 A, 34 D,and 36 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 39 .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.Temporallyliftedoperationsarethosenontemporaloperationsthathavebeenliftedovertimeintotemporaloperations.Rateofchangeoperationsincludethedifferenttypesofdifferentiationsassociatedwithmovementsuchasvelocityandturningrate.Finally,predicateoperationsareusedtoanswer 53
PAGE 54
31 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,wecandenetwodecompositionoperations,mgeoandmconf,toobtainthemovinggeometryandthemovingcondencefromapredictionrespectively.Bydecomposingapredictioninthisway,wecandeneallgeometryrelatedoperationsonapredictiontohavethesamesemanticasiftheseoperationsareappliedtothemovinggeometrycomponentoftheprediction.Similarly,allcondencerelatedoperationsareapplicabletothemovingcondencecomponentoftheprediction.TheseoperationsareshowninTable 31 .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
Inthecaseofaprobabilitybasedpredictionmodel,thepoint confoperationisusedtoretrievethedensityvalueofagivenpointatagiventimeinstantduringthepredictionperiod.Notethatthisdensityvalueisnotnecessarilytheprobabilityvalueofoccurrence.Thesetwovaluesarethesameonlyinthecaseofadiscreteprobabilitydistributionwhichisapplicabletoapredictionoftypej(point).Thisisnotthecaseforacontinuousprobabilitydistributionwhichisapplicabletoapredictionoftypej(line)orj(region).Weusetheoperationpointset conftodeterminetheprobabilityofoccurrence(percentageofchance)thatapointaspartofthemovingobjectwillfallwithinthegivenpointsetatagiventimeinstant.Foracontinuousprobabilitydistributionoveralinebased(orregionbased)prediction,theprobabilityofoccurrenceistheintegrationofaprobabilitydistributionfunction(pdf)overapointset,whichcorrespondstoeitheranarea(forj(line))oravolume(forj(region))underthecurveorsurface,respectively,ofthepdf.Thus,theprobabilityvalueforapointinthesecontinuousdistributionsisalways0sincewecannotobtainanareaoravolumebyintegratingoverapoint.Similarly,theprobabilityvalueforalineinatwodimensionalcontinuousdistributionoveraregionbasedpredictionisalsoalways0sincewecannotobtainavolumebyintegratingoveraline.Table 32 showsthevalueoftheoperationpointset conf(j(a);b;instant)whenappliedtodifferenttypecombinationsofj(a)andbfora;b2fpoint;line;regiong. Table32. Valueoftheoperationpointset conf(j(a);b;instant)foreachcombinationofj(a)andbwhetheritisalways0,denotedbyavalue0,orameaningfulvalue,denotedbyavalueM. Tofurtherclarifythemeaningoftheseoperations,considerpredictionsatatimeinstantasshowninFigure 310 .ThedensityvalueofthepointpinFigure 310 Ais0.25.Sincethispredictionisofthetypej(point),wehaveadiscreteprobabilitydistributionoveraniteset 56
PAGE 57
310 Billustratesacontinuousprobabilitydistributionoveralinebasedprediction.Thedensityvalueofthepointpinthiscaseis0.25.However,theprobabilityofoccurrenceatpis0becausewecannotobtainanareabyintegratingthepdfatp.Ameaningfulprobabilityvaluecanonlybeobtainedbyintegratingthepdfoverasegmentoflinewhichisasubsetoftheprediction.Inthisexample,weshowthattheprobabilitythatapointofthemovingobjectwillbeonthelinesegment(p;q)is30%(theareaunderthepdfcurvebetweenpandq).Similarly,Figure 310 Cshowsaprobabilityof20%thatapointeventwillfallwithinaregionAwhichisasubsetofaregionbasedprediction.Here,theprobabilityvalueisthevolumedenedbyAunderthepdfsurface. ABC Figure310. Examplesofpredictionsatatimeinstant.A)Apointbasedpredictionwithadiscreteprobabilitydistribution.B)Alinebasedpredictionwithaonedimensionalcontinuousdistribution.C)Aregionbasedpredictionwithatwodimensionalcontinuousdistribution. Unlikeaprobabilitybasedpredictionmodel,afuzzybasedpredictionmodelisdesignedtomodelthepotentialinclusion,calledmembershipvalue,ofeachpointofapredictionaspartofapointsetevent.Thus,thepoint confoperationreturnsthemembershipvalueforagivenpointsignifyingthelevelofcondencethatthispointwillbepartofthemovingobject.Thepointset confreturnstheaveragemembershipvalueofagivenpointset.Hencethisoperation 57
PAGE 58
Fortemporallyliftedoperations,allsuchoperationsproducebasicspatiotemporalobjectsinsteadoffuturepredictions.Thisisbecausethefuturepredictionisdecomposedintoitsmovinggeometrycomponentbeforeapplyingtheseoperations. Withrespecttopredicates,thebinarypredicateoperationbetweenpredictionshasthesamesemanticasthebinarypredicateoperationbetweentheirmovinggeometrycomponents.However,withthecondencedistributioninformation,wecanalsodeterminethedegreeinwhichtheactualmovingobjectscanpotentiallyinteract(nondisjoint)witheachotherduringtheperiodofthepredictions.Thisisgivenbytheinteraction potentialoperationwhichreturnsamovingrealnumberindicatingthepotentialofinteractionbetweentheactualobjectsoverthepredictionperiod.Thepossibilityoftheactualobjectinteractiondependsontheinteractionbetweentheirpredictionsandthisisgivenbytheinteraction possibleoperation.ThistopicisfurtherdiscussedinSection 3.4.2 components,length,area,perimeter,distance,anddirection.Thesemanticoftheseoperationscanbeexpressedastheunion,fornontemporalreturntype,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 33 39 ,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 39 .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
311 showstherelationshipsbetweentraditionalmovingobjectdatamodelandballoonobjectdatamodel. Figure311. 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
312 illustratesallthepossiblerelatedpairsforeachscenariobetweenpartsofAandB. ABC Figure312. 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 313 ).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 34 showsanexampleofassigningameaningfulprextothenameforeachpairwisecombinationbetweentheseinteractions.Other Table34. Assigningnamingprexestopairwisecombinationsofinteractions. didmayhaveprobablywill didmayhavebeenprobablyalwaysmaymayhavebeenprobablywillhaveprobablywillprobablyalwaysprobablywillhavecombinationswithlargernumberofinteractionsalsoexist,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,whicharepartsofacontinuousdevelopment,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,nonrepetitiveballoonpredicatesbetweentwoballoon 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 35 .SincethenumbersofSTPsthatinvolvemovinglineobjectsarenotspeciedin[ 22 ],weomitthosecalculationsthatinvolveballoonobjectswhicharebasedonmovinglineobjects. Recallthatthefuturepredictionofaballoonobjectrepresentsthesetofallpotentialfuturepositionsorextentsofthemovingobject.Thismeansthatanoninteractionrelationshipwiththisfuturepredictioncomponentguaranteesanoninteractionrelationshipwiththeactualobjectinthefuture.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 36 summarizestheseinteractioninferences. Table36. Inferringthetypesofinteractionbetweenactualobjectsfromthetypesofinteractionbetweentheirpredictions. PredictionInteractionsPossibleObjectInteractions interiorintersectionanyinteractionpossibleboundaryintersectionboundaryintersection,disjointdisjointdisjoint Inordertoanswerthesecondquestion,letusconsidereachtypeofpredictioninteractions.Fordisjointpredictions,itisguaranteedthattheobjectwillbedisjoint.Thusthechanceofinteractioninthiscaseis0.Forpredictionswithboundaryintersection,thechanceoftheactualobjectssharingtheirboundariesatthisintersectionisproportionaltotheproductofthepointsetcondencevaluesoftheintersectionwithrespecttoeachobject.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,probabilitybasedmodelsandfuzzybasedmodels,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,theresultwillincludealllessthan100feetshipsthatwillbeinsidethestormwithin3hoursfromthecurrentinstant.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 314 ).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.WedescribeaniterepresentationfornontemporaldatatypesofthealgebrainSection 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.IntwodimensionalEuclideanspace,asinglepointcanbedescribedbyapairofcoordinates(x;y)asshowninDenition 4.5 4.6 ,avalueofthetypepointissimplydeneasasetofsinglepoints. 32 ]denesalineasasetofcurvesintheplane.Wecandiscretelyrepresentcurvesbypolylines 79
PAGE 80
4.7 showshowthetypesegrepresentingalinesegmentcanbediscretelydenedbyitstwoendpoints. 4.8 41 showsanexampleofalineobjectoftheabstractmodelanditscorrespondingdiscreterepresentation. AB Figure41. 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 asasetofedgedisjointfaces. disjoint(f1;f2)g 42 showsanexampleofaregionobjectinbothabstractanddiscreterepresentation. AB Figure42. Representationsofaregionobject.A)Intheabstractmodel.B)Inthediscretemodel. 25 ].Theideaistorepresentamovementofanobjectbyasequenceofsimplemovementscalledslicesortemporalunits.Atemporalunitofamovingdatatypeaisamaximaltimeintervalwherevaluestakenbyaninstantofacanbedescribedbyasimplefunction.Thus,atemporalunitrepresentstheevolutionofavaluevofsometypeainagiventimeintervaliwhilemaintainingtypespecicconstraintsduringsuchevolution.Figure 43 Ashowsatemporalunitofamovingpointobjectconsistingoftwopointmovingindependently.Eachtemporalunitisapair(i;v),whereiiscalledtheunitintervalandviscalledtheunit
PAGE 83
4.12 ,temporalunitsaredescribedasagenericconcepttoformulatethedenitionoftheslicedrepresentation.Theirspecializationtovariousdatatypesisprovidedinthenextsubsectionswherewedeneunittypessuchasureal,upoi,upoint,uline,anduregion. Figure43. Adiscreterepresentationofamovingpointobject.A)Atemporalunit.B)Aslicedrepresentation. Theslicedrepresentationisprovidedbyamappingtypeconstructorwhichrepresentsamovingobjectasasequenceoftemporalunits.Itstypedependsonthetypeofthetemporalunits(thatis,theunittype).Figure 43 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 thatproducesatemporalunitforanontemporaltypea. 84
PAGE 85
Fortherealtype,weintroduceaunittypeurealinDenition 4.16 fortherepresentationofmovingrealnumberswithinatemporalunit.Tobalancethetradeoffbetweentheexpressivenessandsimplicityoftherepresentation,thesimplefunctionforthisunittypeischosentobeeitherapolynomialofdegreelessthanorequaltotwoorasquarerootofsuchapolynomial.SuchsquarerootfunctionsarerequiredtoexpressthetimedependentdistancefunctionsinEuclideanmetric.Thus,withthischoice,onecanimplementthetemporallyliftedversionsofthesize,perimeter,anddistanceoperations. 85
PAGE 86
Inordertodescribethepermittedbehaviorofmovingspatialobjectswithinatemporalunit,weneedtospecifyhowtypespecicconstraintsaresatisedduringsuchunit.Werequirethatconstraintsaresatisedonlyduringtherespectiveopenintervalofaunitintervalsincetheendpointsofaunitintervalindicateachangeinthedescriptionofthemovement.Forexample,acollapseofcomponentsofamovingobjectcanoccurattheendpointsoftheunitinterval.Similarly,abirthofanewcomponentcanalsooccuratthebeginningofaunitinterval.Thisiscompletelyacceptablesinceoneofthereasonsfortheintroductionoftheslicedrepresentationistohavesimpleandcontinuousdescriptionofthemovingvaluewithineachunitintervalandtolimitdiscontinuitiesinthedescriptiontoanitesetofinstants.Thus,theslicedrepresentationconceptalsoallowsonetomodelappearancesanddisappearancesofobjectcomponentsatendpointsofintervals.Thismeansthattheslicedrepresentationcanalsorepresenteventpointswhichareinstanceswhenthetemporalfunctionofamovingobjectiseventfdiscontinuousasspeciedintheabstractmodel.Inthissection,wedenetemporalunittypesupoint,uline,anduregion.Theyareusedtoconstructthespatiotemporalmappingsmapping(upoint),mapping(uline),andmapping(uregion)whichdescribeaniterepresentationforthebasicspatiotemporaldatatypesmpoint,mline,andmregionrespectively. 86
PAGE 87
4.17 4.18 43 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. 44 Ashowsanexampleofavalidulineobject. Sinceidistributesthroughsetsandtuples,wecanusei(M;t)whichrepresentsthevalueofaunitlineatatimeinstantttodenethestructuralconstraintthatrequiresthisvaluetobeavalidlinecomposedofsegments.Forinstance,condition(i)requiresthat,ateachtimeinstanttofthe 88
PAGE 89
Figure44. Representingamovinglineobject.A)Aulinevalue.B)Adiscreterepresentationofamovinglineobject. openinterval,wecanobtainasegmentfromeachofthemovingsegmentsofM.8t;l
PAGE 90
45 .Followingthesamestructuredapproachfordeningtheregiondatatypes,wecandenea Figure45. Exampleofauregionvalue. 90
PAGE 91
4.20 4.3.1 aswellasthespatiotemporalballoondatatypesinSection 4.3.2 91
PAGE 92
Forthefuturepredictiondatatypes,onlythegeometryaspectoffuturepredictionsisrelevantheresincetherepresentationofthecondencedistributionaspectisdomainspecicandcanbeassumedtobegivenbypredictionmodels.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. Bydiscretelyrepresentingthedevelopmentofthemovementhistoryandthefutureprediction,weeffectivelyobtainarepresentationforamovingballoonobject,asdenedinDenition 4.23 ,whichisacombinationofthetwo. 94
PAGE 95
HavingdeneddiscretedatatypesforeachoftheabstractdatatypesofourMovingBalloonAlgebra,wecannowusethisdiscretemodelasaspecicationtodevelopimplementabledatastructuresforsupportingalgorithmicdesignandimplementationofoperations. 95
PAGE 96
Intheimplementationmodel,weareinterestedinhowwecanimplementtheniterepresentationsetforthinthediscretemodel.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,ourspatialandspatiotemporaldatatypesaresetvalued.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 Therepresentationofline2Dandregion2Dobjectsrequiresanorderrelationonhalfsegments.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 52 showsaline2DobjectL(withtwocomponents(blocks))andaregion2DobjectR(withasinglefacecontainingahole).Bothobjectsareannotatedwithsegmentnamessi.WedeterminethehalfsegmentsequencesofLandRandlethli=(si;true)andhri=(si;false)denotethelefthalfsegmentandrighthalfsegmentofasegmentsirespectively.ForLweobtaintheorderedhalfsegmentsequence 102
PAGE 103
Aline2DobjectLandaregion2DobjectR 51 ,wetakeawayallsubcasesofcase1exceptfortheupperleftsubcaseaswellascase3,therestrictedorderrelationcanalreadybeleveragedforcomplexlinesandcomplexregions.Incasethatallspatialobjectsofanapplicationspacearedenedoverthesamerealm 30 57 ],therestrictedorderrelationcanalsobeappliedforaparalleltraversalofthesequencesoftwo(ormore)realmbasedline2Dorregion2Dobjects.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)timeinstantofikandthetwoBooleanagslckandrckindicatewhetherikisleftclosedand/orrightclosed.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 44 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),andrecordstheminsocalledtopologicalfeaturevectors.Thesevectorsserveasinputfortheevaluationphase(Section 5.2.3 )whichanalyzesthesetopologicaldataanddeterminestheBooleanresultofatopologicalpredicate(query1)orthekindoftopologicalpredicate(query2).Tospeeduptheevaluationprocess,wealsopresent,inSection 5.2.4 ,twonetunedandoptimizedapproachesofmatrixthinningforpredicatevericationandminimumcostdecisiontreesforpredicatedetermination.Thetwophaseapproachprovidesadirectandsoundinteractionandsynergybetweenconceptualwork(9intersectionmodel)andimplementation(algorithmicdesign).InterfacemethodsforaccessingourimplementationofthisconceptisgiveninSection 5.2.5 .WebeginbypresentingsomebasicalgorithmicconceptsneededfortheexplorationalgorithmsinSection 5.2.1 108
PAGE 109
5.2.2 .Theseconceptsaretheparallelobjecttraversal(Section 5.2.1.1 ),overlapnumbers(Section 5.2.1.2 ),andtheplanesweepparadigm(Section 5.2.1.3 ).Parallelobjecttraversalandoverlapnumbersareemployedduringaplanesweep.Wewillnotdescribethesethreeconceptsinfulldetailhere,sincetheyarewellknownmethodsinComputationalGeometry[ 3 ]andspatialdatabases[ 33 ].However,wewillfocusonthespecialtiesoftheseconceptsinoursetting,includingsomeimprovementscomparedtostandardplanesweepimplementations.Thesecompriseasmoothlyintegratedhandlingofgeneral(thatis,intersecting)andrealmbased(thatis,nonintersecting)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
53 givesanexample. 3 55 ]isawellknownalgorithmicschemeinComputationalGeometry.Itscentralideaistoreduceatwodimensionalgeometricproblemtoasimpleronedimensionalgeometricproblem.Averticalsweeplinetraversingtheplanefromlefttoright 111
PAGE 112
Exampleofthesegmentclassicationoftworegion2Dobjects stopsatspecialeventpointswhicharestoredinaqueuecalledeventpointschedule.Theeventpointschedulemustallowonetoinsertneweventpointsdiscoveredduringprocessing;thesearenormallytheinitiallyunknownintersectionsoflinesegments.Thestateoftheintersectionofthesweeplinewiththegeometricstructurebeingsweptatthecurrentsweeplinepositionisrecordedinverticalorderinadatastructurecalledsweeplinestatus.Wheneverthesweeplinereachesaneventpoint,thesweeplinestatusisupdated.Eventpointswhicharepassedbythesweeplineareremovedfromtheeventpointschedule.Notethat,ingeneral,anefcientandfullydynamicdatastructureisneededtorepresenttheeventpointscheduleandthat,inmanyplanesweepalgorithms,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)halfsegmentofaline2Dorregion2Dobjectisreachedduringaplanesweep,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)checkswhetherforasegmentinthesweeplinestatusapredecessoraccordingtotheverticalyorder(aneighboredsegmentoftheotherobjectwithacommonendpoint)exists.Theoperationpred of psearchesthenearestsegmentbelowagivenpointinthesweeplinestatus.Thepredicatecurrent existstestswhethersuchasegmentexists.Thepredicatepoi on seg(poi in seg)checkswhetheragivenpointlieson(in)anysegmentofthesweeplinestatus. Figure54. 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 54 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 55 A).Iftwosegmentspartiallycoincide,theyarespliteachtimetheendpointofonesegmentliesinsidetheinterioroftheothersegment.Dependingonthetopologicalsituations,whichcanbedescribedbyAllen'sthirteenbasicrelationsonintervals[ 1 ],eachofthetwosegmentseitherremainsunchangedorisreplacedbyuptothreesegments(thatis,sixhalfsegments).Fromthethirteenpossiblerelations,eightrelations(fourpairsofsymmetricrelations)areofinteresthere(Figure 55 B).Ifanendpointofonesegmenttouchestheinterioroftheothersegment,thelattersegmentissplitandreplacedbytwosegments(thatis,fourhalfsegments)(Figure 55 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. Figure56. Sweeplinestatus.A)Beforethesplitting(s4tobeinserted).B)Afterthesplitting.Theverticaldashedlineindicatesthecurrentpositionofthesweepline. 115
PAGE 116
StaticanddynamichalfsegmentsequencesoftheregionsR1andR2inFigure 56 (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) 55 .Werstconsiderthecasethattheplanesweepdetectsanintersection.ThisleadstoasituationlikeinFigure 56 A.ThetwostaticandthetwodynamichalfsegmentsequencesofR1andR2areshowninTable 51 .Togethertheyformtheeventpointscheduleoftheplanesweepandareprocessedbyaparallelobjecttraversal.Beforethecurrentpositionofthesweepline(indicatedbytheverticaldashedlineinFigure 56 ),theparallelobjecttraversalhasalreadyprocessedtheattributedhalfsegments(hls1;t),(hls2;f),(hlv1;t),and(hlv2;f)inthisorder.Atthecurrentpositionofthesweepline,theparallelobjecttraversalencountersthehalfsegments(hls3;t)and(hls4;f).Foreachlefthalfsegmentvisited,thecorrespondingsegmentisinsertedintothesweeplinestatusaccordingtotheycoordinateofitsdominatingpointandcheckedforintersectionswithitsdirectupperandlowerneighbors.Inourexample,theinsertionofs4leadstoanintersectionwithitsupperneighborv1.Thisrequiressegmentsplitting;wesplitv1intothetwosegmentsv1;1andv1;2ands4intothetwosegmentss4;1ands4;2.Inthesweeplinestatus,wehavetoreplacev1byv1;1ands4bys4;1(Figure 56 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 56 B).However,this 116
PAGE 117
ForthesecondandthirdcaseinFigure 55 ,theprocedureisthesamebutmoresplitscanoccur.Incaseofoverlapping,collinearsegments,weobtainuptosixnewhalfsegments.Incaseofatouchingsituation,thesegmentwhoseinterioristouchedissplit. Ourresearchshowsthatitisunfavorabletoaimatdesigningauniversalexplorationalgorithmthatcoversallcombinationsofspatialdatatypes.Thishasthreemainreasons.First,eachofthedatatypespoint2D,line2D,andregion2Dhasverytypespecic,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,interiorandboundaryofacomplexspatialobjectwiththecorrespondingcomponentsofanothercomplexspatialobjectaccordingtothe9intersectionmatrix(Figure 22 A).Thatis,theconceptistomapthematrixelementsofthe9intersectionmatrix,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 ). 22 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 57 shows.Thewhileloopterminatesifeithertheendofoneoftheobjectshasbeenreachedoralltopologicalagshavebeensettotrue(lines7and8).Intheworstcase,theloophastobetraversedl+mtimeswherel(m)isthenumberofpointsoftherst(second)point2Dobject.Sincethebodyofthewhilelooprequiresconstanttime,theoveralltimecomplexityisO(l+m). 59 ].ItfollowsfromthisdenitionthateachboundarypointofGisanendpointofa(half)segmentofGandthatthisdoesnotnecessarilyholdviceversa,asFigure 58 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. Figure57. Algorithmforcomputingthetopologicalfeaturevectorsfortwopoint2Dobjects greysegmentendpointsbelongtotheinteriorofG,sinceseveralsegmentsemanatefromeachofthem.Intuitively,theyareconnectorpointsbetweendifferentsegmentsofG. ABC Figure58. 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 59 .Thewhileloopisexecuteduntiltheendoftheline2Dobject(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. Figure59. 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,thewhileloopisexecutedatmostl+mtimes.TheinsertionofalefthalfsegmentintoandtheremovalofarighthalfsegmentfromthesweeplinestatusneedsO(logm)time.Thecheckwhetherapointlieswithinoroutsideasegment(predicatepoi in seg)alsorequiresO(logm)time.Altogether,theworsttimecomplexityisO((l+m)logm).Thewhileloophastobeexecutedatleastmtimesforprocessingtheentireline2Dobjectinordertondoutifaboundarypointexiststhatisunequaltoallpointsofthepoint2Dobject(Figures 58 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) 510 .Thewhileloopisexecutedaslongasnoneofthetwoobjectshasbeenprocessed(line9)andaslongasnotalltopologicalagshavebeensettotrue(lines9to10).Ifonlyapointhastobeprocessed(line11),wemustcheckitslocation.Therstcaseisthatitliesonaboundarysegment;thisischeckedbythesweeplinestatuspredicatepoi on seg(line12).Otherwise,itmustbelocatedinsideoroutsideofG.Weusetheoperationpred of p(line13)todeterminethenearestsegmentinthesweeplinestatuswhoseintersectionpointwiththesweeplinehasalowerycoordinatethantheycoordinateofthepoint.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,thewhileloopisexecutedatmostl+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. Figure510. 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
511 .Thewhileloopisexecuteduntilbothobjectshavebeenprocessed(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 55 ),andwehandlethesetopologicalsituationswiththesplittingstrategydescribedinSection 5.2.1.3 .If,duetosplitting,kisthetotalnumberofadditionalhalfsegmentsstoredinthedynamichalfsegmentsequencesofbothobjects,thewhileloopis 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 512 .Thewhileloopisexecuteduntilatleasttherstobjecthasbeenprocessed(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).IfafterthewhilelooponlyFisexhaustedbutnotG(line66),GmusthaveaboundarysegmentthatisdisjointfromF(line67). LetlbethenumberofhalfsegmentsofF,mbethenumberofattributedhalfsegmentsofG,andkbethetotalnumberofnewhalfsegmentscreatedduetooursplittingstrategy.Thewhileloopisthenexecutedatmostl+m+ktimes.AlloperationsneededonthesweeplinestatusrequireO(log(l+m+k))timeeach.Duetothesplittingstrategy,alldominatingendpointsarealreadyendpointsofexistingsegmentsorbecomeendpointsofnewlycreated Figure513. 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 513 .IftworegionsFandGmeetinapointlikeintheexample,suchatopologicalmeetingsituationcannotbedetectedbyausualplanesweep.Thereasonisthattheplanesweepforgetscompletelyaboutthealreadyvisitedsegments(righthalfsegments)leftofthesweepline.Inourexample,afters1ands2havebeenremovedfromthesweeplinestatus,anyinformationaboutthemislost.Whens3isinsertedintothestatussweepline,itsmeetingwiths2cannotbedetected.OursolutionistolookaheadinobjectGforanexthalfsegmentwiththesamedominatingpointbefores2isremovedfromthesweeplinestatus. ThesegmentclassicationiscomputedbythealgorithminFigure 514 .Thewhileloopisexecutedaslongasnoneofthetwoobjectshasbeenprocessed(line8)andaslongasnotalltopologicalagshavebeensettotrue(lines8to12).Then,accordingtothehalfsegmentorder,thenexthalfsegmenthisobtained,whichbelongstooneorbothobjects,andthevariablesforthelastconsidereddominatingpointsinFand/orGareupdated(lines13to20).Next,wecheckforapossiblecommonboundarypointinFandG(lines21to25).ThisisthecaseifthelastdominatingpointsofFandGareequal,orthelastdominatingpointinF(G)coincideswiththenextdominatingpointinG(F).Thelatteralgorithmicstep,inparticular,helpsussolvethespecialsituationinFigure 513 .Ifhisarighthalfsegment(line26),weupdatethetopologicalfeaturevectorsofFand/orGcorrespondingly(lines27to32)andremoveitssegmentcomponentsfromthesweeplinestatus(line33).Incasethathisalefthalfsegment,weinsertitssegmentcomponentsintothesweeplinestatus(line34)accordingtotheyorderofitsdominatingpointandtheycoordinatesoftheintersectionpointsofthecurrentsweeplinewiththesegmentsmomentarilyinthesweeplinestatus.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 52 .Thetableshowswhichsegmentclasses(ms=ns)anewsegmentsjustinsertedintothesweeplinestatuscanget,givenacertainsegmentclass(mp=np)ofapredecessorsegmentp.Thersttwocolumnsshowthespecialcasethatatthebeginningthesweeplinestatusisemptyandtherstsegmentisinserted.Thissegmentcaneitherbesharedbybothregionobjects((0=2)segment)orstemsfromoneofthem((0=1)segment).Inallthesecases(exceptthersttwocases),np=msmusthold. LetlbethenumberofattributedhalfsegmentsofF,mbethenumberofattributedhalfsegmentsofG,andkbethetotalnumberofnewhalfsegmentscreatedduetooursplittingstrategy.Thewhileloopisthenexecutedatmostl+m+ktimes.AlloperationsneededonthesweeplinestatusrequireatmostO(log(l+m+k))timeeach.Theoperationsonthehalfsegmentsequences Table52. Possiblesegmentclassconstellationsbetweentwoconsecutivesegmentsinthesweeplinestatus.
PAGE 137
Section 5.2.3.1 presentsanadhocevaluationmethodcalleddirectpredicatecharacterization.Learningfromitsshortcomings,inSection 5.2.3.2 ,weproposeanovel,systematic,provablycorrect,andgeneralevaluationmethodcalled9intersectionmatrixcharacterization.Thenexttwosubsectionselaborateonaparticularstepofthegeneralmethodthatisdependentonthetypecombinationunderconsideration.Section 5.2.3.4 dealswiththespecialregion/regioncasewhileSection 5.2.3.3 handlesthecasesofallothertypecombinations. 22 Bforthedifferentvaluesofn)andisbasedonthetopologicalfeatureagsofvFandvGofthetwospatialargumentobjectsFandG.Thatis,fortheline/linecase,wehavetodeterminewhichtopologicalfeatureagsofvFandvGmustbeturnedonandwhichagsmustbeturnedoffsothatagiventopologicalpredicate(vericationquery)orapredicatetobefound(determinationquery)isfullled.Fortheregion/regioncase,thecentralquestionistowhichsegmentclassesthesegmentsofbothobjectsmustbelongsothatagiventopologicalpredicateorapredicatetobefoundissatised.Thedirectpredicatecharacterizationgivesananswerforeachindividualpredicateofeachindividualtypecombination.Thismeans 137
PAGE 138
Wegivetwoexamplesofdirectpredicatecharacterizations.Asarstexample,weconsiderthetopologicalpredicatenumber8(meet)betweentwolineobjectsFandG(Figure 515 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] 515 A,intersectionsbetweenbothinteriors(:vF[seg shared],:vF[interior poi shared])aswellasbetweentheboundaryofoneobjectandtheinterioroftheotherobject(:vF[bound on interior],:vG[bound on interior])arenotallowed;besidesintersectionsbetweenbothboundaries(vF[bound shared),eachcomponentofoneobjectmustinteractwiththeexterioroftheotherobject(vF[seg unshared],vG[seg unshared],vF[bound disjoint],vG[bound disjoint]). Figure515. The9intersectionmatrices.A)Matrixnumber8forthepredicatemeetbetweentwolineobjects.B)Matrixnumber7forthepredicateinsidebetweentworegionobjects. Next,weviewthetopologicalpredicatenumber7(inside)betweentworegionobjectsFandG(Figure 515 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,thedirectpredicatecharacterizationiserrorprone.Itisdifculttoensurethateachpredicate 139
PAGE 140
22 A)bymeansofthetopologicalfeaturevectorsvFandvG.Asweknow,eachmatrixelementisapredicatecalledmatrixpredicatethatchecksoneofthenineintersectionsbetweentheboundaryF,interiorF,orexteriorFofaspatialobjectFwiththeboundaryG,interiorG,orexteriorGofanotherspatialobjectGforinequalitytotheemptyset.Foreachtopologicalpredicate,itsspecicationisthengivenasthelogicalconjunctionofthecharacterizationsoftheninematrixpredicates.Sincethetopologicalfeaturevectorsaredifferentforeachtypecombination,thecharacterizationofeachmatrixpredicateisdifferentforeachtypecombinationtoo.Thecharacterizationsthemselvesarethethemesofthenextsubsections. Thegeneralmethodforpredicatevericationworksasfollows.BasedonthetopologicalpredicateptobeveriedaswellasvFandvGasinput,weevaluateinaloopthecharacterizationsofallmatrixpredicatesnumberedfromlefttorightandfromtoptobottom.TheninthmatrixpredicateF\G6=?alwaysyieldstrue[ 59 ];hence,wedonothavetocheckit.Afterthecomputationofthevalueofthematrixpredicatei(1i8),wecompareittothecorrespondingvalueofthematrixpredicatep(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,the33matrixisreducedtoa22matrixsincetheboundaryofapointobjectisdenedtobeempty[ 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),theintersectionoftheinteriorsofFandGisnonemptyif,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),theintersectionoftheinteriorofFandtheboundaryofGisnonemptyif,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),theintersectionofFandtheboundaryofGisnonemptyif,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]inDenition 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,theyshareaboundarypoint.Thatis,9p2B(F)9q2B(G):p=q.ThismatchesthedenitionofvF[bound shared]inDenition 5.4 (v).Statement(vi)requirestheexistenceofaboundarypointofFthatisnotlocatedonanysegmentofG.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,asegmentofFislocatedinGbutdoesnotcoincidewithaboundarysegmentofG.Thatis,9f2H(F)8g2H(G)::segIntersect(f:s;g:s)^segInRegion(f:s;G).ThiscorrespondstothedenitionofvF[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]inDenition 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,theintersectionofbothboundariesisnonempty.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 provideuswithauniquecharacterizationofeachindividualmatrixpredicateofthe9intersectionmatrixforeachtypecombination.Thisapproachhasseveralbenets.First,itisasystematicallydevelopedandnotanadhocapproach.Second,ithasaformalandsoundfoundation.Hence,wecanbesureaboutthecorrectnessoftopologicalfeatureagsandsegmentclassesassignedtomatrixpredicates,andviceversa.Third,thisevaluationmethodisindependentofthenumberoftopologicalpredicatesandonlyrequiresaconstant 150
PAGE 151
Basedonthisresult,weaccomplishthepredicatevericationofatopologicalpredicatepwithrespecttoaparticularspatialdatatypecombinationonthebasisofp's9intersectionmatrix(asanexample,seethecompletematricesofthe33topologicalpredicatesoftheregion/regioncaseinFigure 520 andthecompletematricesfortheremainingcasesin[ 50 ])andthetopologicalfeaturevectorsvFandvGasfollows:Dependingonthespatialdatatypecombination,weevaluatethelogicalexpression(givenintermsofvFandvG)ontherightsideoftherst9IMCaccordingtoLemma 5.1 5.2 5.3 5.4 5.5 ,orTheorem 5.1 ,respectively.WethenmatchtheBooleanresultwiththeBooleanvalueattherespectivepositioninp'sintersectionmatrix.IfbothBooleanvaluesareequal,weproceedwiththenextmatrixpredicateinthe9intersectionmatrix;otherwisepisfalse,andthealgorithmterminates.PredicatepyieldstrueiftheBooleanresultsoftheevaluatedlogicalexpressionsofall9IMCscoincidewiththecorrespondingBooleanvaluesinp'sintersectionmatrix.Thisrequiresconstanttime. 5.1 5.2 5.3 5.4 5.5 ,orTheorem 5.1 ,respectively.ThisyieldsaBoolean9intersectionmatrix.Inasecondstep,thisBooleanmatrixischeckedconsecutivelyforequalityagainstall9intersectionmatricesofthetopologicalpredicatesoftheparticulartypecombination.Ifna;bwitha;b2fpoint;line;regiongisthenumberoftopologicalpredicatesbetweenthetypesaandb,thisrequiresna;btestsintheworstcase. 151
PAGE 152
5.2.4.1 delineatesanovelmethodcalledmatrixthinningforspeedinguppredicateverication.Section 5.2.4.2 describesanetunedmethodcalledminimumcostdecisiontreeforacceleratingpredicatedetermination. Thequestionariseshowthe9intersectionmatricescanbesystematicallythinnedoutandneverthelessremainuniqueamongthena;btopologicalpredicatesbetweentwospatialdatatypesaandb.Weuseabruteforcealgorithm(Figure 516 )thatisapplicabletoalltypecombinationsandthatdeterminesthethinnedoutversionofeachintersectionmatrixassociatedwithoneofthena;btopologicalpredicates.Sincethisalgorithmonlyhastobeexecutedonceforeachtypecombination,runtimeperformanceandspaceefciencyarenotsoimportanthere. Inarststep(lines8to10),wecreateamatrixposofsocalledpositionmatricescorrespondingtoallpossible9intersectionmatrices,thatis,tothebinaryversionsofthedecimalnumbers1to511ifwereadthe9intersectionmatrix(9IM)entriesrowbyrow.Eachinapositionmatrixindicatesapositionorentrythatislaterusedforcheckingtwointersectionmatricesagainsteachother.Ainapositionmatrixmeansthatthecorrespondingentriesintwocomparedintersectionmatricesarenotcomparedandhenceignored. 152
PAGE 153
Figure516. Algorithmforcomputingthethinnedoutversionsofthena;bintersectionmatricesassociatedwiththetopologicalpredicatesbetweentwospatialdatatypesaandb
PAGE 154
Inathirdstep,weinitializetheentriesofallna;bthinnedoutintersectionmatriceswiththedon'tcaresymbol. Thefourthandnalstepcomputesthethinnedoutmatrices(lines15to33).Theideaistondforeachintersectionmatrix(line15)aminimalnumberofentriesthattogetheruniquelydifferfromthecorrespondingentriesofalltheotherna;b1intersectionmatrices.Therefore,westarttraversingthe511positionmatrices(line17).Forallpositionsofapositionmatrixwendoutwhetherfortheintersectionmatrixunderconsiderationanotherintersectionmatrixexiststhathasthesamematrixvaluesatthesepositions(lines20to21).Aslongasnoequalityhasbeenfound,theintersectionmatrixunderconsiderationiscomparedtothenextintersectionmatrix(lines19to23).Ifanequalityisfound,thenextpositionmatrixistaken(line30).Otherwise,wehavefoundaminimalnumberofmatrixpredicatesthataresufcientanduniqueforevaluation(line24).Itremainstocopythecorrespondingvaluesofthe9intersectionmatrixintothethinnedoutmatrix(lines25to28). Completeandthinnedoutmatricesforthe5topologicalpredicatesofthepoint/pointcase. Notethatforthesameintersectionmatrixitmaybepossibletondseveralthinnedoutmatriceswiththesamenumberofmatrixpredicatestobecheckedsuchthateachofthemrepresentstheintersectionmatrixuniquelyamongthena;bintersectionmatrices.Ouralgorithmalwayscomputesthethinnedoutmatrixwiththelowestnumericalvalue.Thecompleteand 154
PAGE 155
Completeandthinnedoutmatricesforthe14topologicalpredicatesofthepoint/linecase. Completeandthinnedoutmatricesforthe7topologicalpredicatesofthepoint/regioncase. thinnedoutmatricesforthepoint/pointcaseareshowninFigure 517 ,forthepoint/linecaseinFigure 518 ,forthepoint/regioncaseinFigure 519 ,andfortheregion/regioncaseinFigure 520 .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 53 showsasummaryoftheresultsandinthelasttwocolumnstheconsiderableperformanceenhancementofmatrixthinning.Thereductionofmatrixpredicatecomputationsrangesfrom27%fortheline/linecaseto75%forthepoint/pointcase. Table53. 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;boftestsremainsthesamebutforeachtestwecanreducethenumberofmatrixpredicatesthathavetobeevaluatedbytakingthethinnedoutinsteadofthecomplete9intersectionmatrices. Thesecondmethod,whichwillbeourfocusinthissubsection,aimsatreducingthenumberna;boftests.Thismethodisbasedonthecomplete9intersectionmatricesbutalsomanagestoreducethenumberofmatrixpredicatesthathavetobeevaluated.Weproposeaglobalconceptcalledminimumcostdecisiontree(MCDT)forthispurpose.Thetermglobalmeansthatwedonotlookateachintersectionmatrixindividuallybutconsiderallna;bintersectionmatricestogether.Theideaistoconstructafullbinarydecisiontreewhoseinnernodesrepresentallmatrixpredicates,whoseedgesrepresenttheBooleanvaluestrueorfalse,andwhoseleafnodesarethena;btopologicalpredicates.Notethat,inafullbinarytree,eachnodehasexactlyzeroortwochildren.Forsearching,weemployadepthrstsearchprocedurethatstartsattherootofthetreeandproceedsdowntooneoftheleaveswhichrepresentsthematchingtopologicalpredicate.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 521 showsourrecursivealgorithmMCDTforcomputingaminimumcostdecisiontreeforasetimofna;b9intersectionmatricesthatareannotatedwithaweightrepresentingthecorrespondingpredicates'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).Thepartitioningisbasedonthevaluesofeach9intersectionmatrixinimwithrespecttothematrixpredicateservingasthediscriminator.Ifsuchavalueis0(false),thecorresponding9intersectionmatrixisaddedtothelistiml;otherwise,itisaddedtothelistimr.Aspecialcasenowisthatimhasnotbeenpartitionedsothateitherimlorimrisempty(conditioninlines18to19yieldsfalse).Inthiscase,thediscriminatordoesnotcontributetoadecisionandisskipped;thenextdiscriminatorisselected(line28).Ifbothlistsimlandimrarenonempty(lines18to19),weremovethediscriminatorfromanewcopynew mpofthelistmp(line20)andrecursivelyndtheminimumcostdecisiontreesforthe9intersectionmatricesiniml(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 54 showstheresultsofthisalgorithmbygivingatextualpreorder(depthrstsearch)encodingofallMCDTsforalltypecombinationsonthebasisofequalprobability 160
PAGE 161
MCDTpreorderrepresentationsforalltypecombinationsonthebasisofequalprobabilityofoccurrenceofalltopologicalpredicates. MCDTpreorderrepresentation 3446474836373856 30313263646566676869 13789151614171821 17222324252930313839 517 518 519 and 520 aswellasin[ 50 59 ]. Figures 522 showsavisualizationoftheMCDTsofthreespatialdatatypecombinationsontheassumptionthatalltopologicalpredicatesoccurwithequalprobability.TheMCDTsfortheothertypecombinationshavebeenomittedduetotheirverylargesize.Eachinnernodeis 161
PAGE 162
Thefollowingdenitionspeciesmeasuresthatweusetosummarizeandinterprettheseresults.Weareespeciallyinterestedintheaveragenumberofmatrixpredicatestobeevaluated. 3 5 3 AB 5 7 AB 2 4 6 AB 8 10 12 14 Figure522. 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 55 showsasummaryoftheresultsandinthelasttwocolumnstheconsiderableperformanceenhancementofminimumcostdecisiontrees.Thereductionofmatrixpredicatecomputationsrangesfrom90%forthepoint/pointcaseto98%fortheline/linecase. TheMCDTapproachissimilartoatechniqueintroducedin[ 10 ]fortopologicalpredicatesbetweensimpleregions.However,theirmethodofdeterminingabinarydecisiontreerestsonthethinnedout9intersectionmatricesandresultsinanearoptimalalgorithmandsolution.Thereasonwhyoptimalityisnotachievedisthatatopologicalpredicatecanhavemultiple,equipollentthinnedoutmatrices,thatis,thinnedoutmatricesarenotunique.Therefore,usingaspecicsetofthinnedoutmatricesasthebasisforpartitioningthesearchspacecanonlyleadtoanoptimaldecisiontreeforthissetofthinnedoutmatricesandmaynotbeoptimalinthegeneralcase.Ouralgorithmrestsonthecomplete9intersectionmatrices.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:13whilethesocalledrenedcostmethodin[ 10 ],whichusesthinnedoutmatrices,producesatreewiththetotalcostof2:16. WecanobservethefollowingrelationshipbetweenMCDTsandthinnedoutmatrices: 55 )isgreaterthanorequaltothetotalcostofallitsthinnedoutmatrices(giveninTable 53 ),thatis,
PAGE 165
5.5 .Aqualitativeassessment,performancestudyandanalysisofthisimplementationispresentedinSection 6.1 .Here,wespecifyasetoffunctioninterfacesforourtopologicalpredicateimplementationsothattheycanbeusedtosupportourspatiotemporalpredicateimplementationtobedescribedinthenextsection. ThetopologicalpredicateimplementationprovidesthreespecicinterfacemethodsTopPredExploration,TopPredVerication,andTopPredDeterminationandoneuniversalinterfacemethodTopPredforprovidingthefunctionalityoftheexplorationphaseandtheevaluationphaseaswellasthecombinedeffectofbothphases.ThemethodTopPredExplorationexploresthetopologicaldataofinterestfortwointeractingspatialobjects.Thisinterfaceisoverloadedtoaccepttwospatialobjectsofanytypecombinationasinput.Dependingontheinputobjecttypes,itexecutesoneofthesixplanesweepbasedexplorationalgorithmsfromSection 5.2.2 .Theoutputconsistsoftwotopologicalfeaturevectorswhichholdtherelevanttopologicalinformationforbothargumentobjects. ThemethodsTopPredVericationandTopPredDeterminationhandlepredicatevericationandpredicatedeterminationqueriesrespectively.Bothinterfacesareoverloadedandtaketwotopologicalfeaturevectorsasinput.Bothmethodsleveragethegeneralevaluationmethodof9intersectionmatrixcharacterizationfromSection 5.2.3 .TheinterfacemethodTopPredVericationtakesapredicateidenticationnumberasanadditionalinputparameter.Itcorrespondstothematrixnumber(speciedin[ 59 ]andusedinFigures 517 to 519 and 520 )ofthetopologicalpredicatetobeevaluated.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.Timesynchronizedintervalrenement:Sincetheunitintervalsofbothoperandobjectsareusuallyincompatible,meaningthatthestartandendpointsoftheintervalsoftherstoperandoftendonotcoincidewithanystartandendpointsoftheintervalsofthesecondoperand,anintervalrenementhastobecomputedcoveringallstartandendpointsofunitintervalsofbothoperands.Anoptimizationisbasedonthefactthataspatiotemporalpredicateisonlydenedattimeinstantsandduringperiodsinwhichbothoperandobjectsaredened.Hence,thosetimeintervalscanbeskippedinwhichonlyoneoftheoperandsisdened 167
PAGE 168
2.Functionvaluedintervalrenement:Eachpairofmatchingunitsinbothobjectshaspossiblytobefurtherreneddependingontheevolutionsrepresentedbythetwounitfunctions.Thisisthecaseifboth3Dunitobjectsintersectortoucheachotherandthuschangetheirtopologicalrelationship.Asaresult,wewillhavecomputedthenestintervalgranularityneededforthedeterminationofthetopologicalrelationshipbetweentwomatchingunits. 3.Developmentdetermination:Foreachpairofmatchingunitswenowdeterminetheunique,basicspatiotemporalpredicate(periodpredicate)ortopologicalrelationship(instantpredicate).Wethensequentiallycollectthetopologicalrelationshipsofallmatchingunitsandintotalobtainthedevelopmentofthetwooperandobjectsofthespatiotemporalquerypredicate. 4.Patternmatchingwithquerypredicate:Thisstepincludesapatternmatchingprocessbetweenthedevelopmentcomputedandthequerypredicateaskingforevaluation.ItresultsinoneoftheBooleanvaluestrueorfalse.Notethatthisstepisnotrequiredforaquerytodeterminethedevelopment. Toenhancethecomprehensibilityofthealgorithmicscheme,wehavedeliberatelydelineateditsstepsinaconsecutiveandseparatedmanner.Forexample,steps2and3caneasilybecombinedbecauseduringthecomputationoftheintersectionoftwo3Dunitobjects(step2)thespatiotemporalpredicatescanbedirectlyderived(step3).Evenacompletelyinterleavedexecutionofthealgorithmicstepsispossiblesincesteps1to4canbenested.Thisleadstoaslightincreaseinthealgorithmiccomplexitybutisalittlefasterbyaconstantfactor,althoughitdoesnotchangetheruntimecomplexity,aswewillseelater. Thealgorithmicschemeisindependentofthepredicatesequenceofthedevelopmentinducedbytheoperandobjectsofthequerypredicate,anditalsodoesnotdependonthequerypredicateitself.Steps1and4aregenericinthesensethattheydonotdependonthetypesoftheoperandobjects.Forsteps2and3,typecombinationspecicintersectiondetectionalgorithmsandtypecombinationspecictopologicalpredicatedeterminationareneededrespectively. Thefactthatweemployasinglealgorithmicschemeforcomputingallspatiotemporalpredicatesnecessitatesandimpliesthattheirevaluationprocedureduringqueryprocessingisdifferent 168
PAGE 169
22 ]).Instep4,suchaquerystringpatternisthenmatchedagainsttheactualdevelopmentoftwomovingobjectsunderconsideration,whichisalsorepresentedbyastring. Inthefollowing,wedescribeaversionofthealgorithmicscheme,calledSTPredEvaluator(Figure 523 ),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. Figure523. Spatiotemporalpredicateevaluatoralgorithm. ThealgorithmTimeSynchronizeIntervalsyieldsasequenceofmatchingunitswithconcordant,possiblyreducedunitintervals.AswewillseeinSection 5.3.2 ,itsruntimecomplexityisO(n+m+b)wherenandmarethenumbersofunitintervalsofmo1andmo2,respectively,andbisthenumberofmatchingunitintervals. ThealgorithmFunctionValuedRenementfurtherrenesthissequencedependingontheunitfunctions;itreturnsthesocalledobjectdevelopmentandabooleanagindicatingtheexistenceofthewildcardstrueorTrueintheunitdevelopment.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
524 ).Butduetoreasonsofefciency,wewillnotcopymatchingpartsandconstructtworeducedmovingobjects.Instead,wewilltakeanadditionalintervalsequencedatastructureandonlystorecommonintervalswithpointerstothematchingunitsofthetwomovingobjectsforlateruse. Figure524. Timesynchronizedrenementoftwounitintervalsequences:twosetsoftimeintervalsontheleftside,andtheirrenementpartitionfordevelopmentevaluationontherightside. Theimplementationoftheparallelscanthroughtheunitintervalsequencesofbothmovingobjectsturnsouttobenotsotrivialasitseemsatrstglance.Forexample,thedeploymentofAllen'sthirteendifferenttemporalpredicates[ 1 ],whichuniquelycharacterizethepossibletopologicalrelationshipsbetweentwointervals,isfeasiblebutleadstoalargenumberofcasedistinctionsandpredicateevaluationsthatmakeacompletetreatmenterrorproneandlengthy.Ourapproachleadstoshorter,faster(byaconstantfactor),andmorecomprehensiblecodeandisabletohandleclosed,halfopen,andopenintervals.Itcollectsthestartandendpointsoftheintervalsofbothobjectsintemporalorderandthendeterminestheintersectionintervals.Inthefollowingalgorithm(Figure 525 ),thenotationhidenotestheemptysequence,sequenceconcatenation,thefunctioneostestswhethertheendofasequencehasbeenreached,the 171
PAGE 172
Figure525. Timesynchronizedintervalrenementalgorithm. 172
PAGE 173
Instep1ofthealgorithm,inthecasewheret1andt2coincide,eachofbothtimeinstantsmayindicatealeftclosed([),leftopen((),rightclosed(]),orrightopen())interval.Thisresultsin16possiblecombinationsforbothtimeinstants.ForeachcombinationwehavetodecidetheorderofthetwotimeinstantsinthelistTListofintervalendpoints.Thisisneededinstep2ofthealgorithmtodeterminetherenedintervalsand,inparticular,todetecttimeintervalswhichhavedegeneratedtotimeinstants.ThedecisionprocessisillustratedinTable 56 whichinthersttwolineslistsallcombinationsofclosedandopen,leftandrightintervalendpointsandwhichinthethirdlinedeterminestheirorder.Thenotation,2meanst1mustprecedet2,,1meanstheinverse,andj2meansthattheorderisarbitrary. Table56. 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 526 )whichpositionsonthenexttimeinstantoftheunitintervalsequenceofoneofbothmovingobjectsandwhichneedsO(1)time. Instep2ofthealgorithm,thetemporallyorderedlistofallintervalleftandrightendpointsistraversedfordeterminingtheintersectionintervals.Thisisdonebycomputingoverlapnumbers(seeSection 5.2.1.2 ,hereappliedtotheonedimensionalcase)indicatingthenumberofintervalscoveringatimeinstant.Onlytimeinstantsandintervalswithoverlapnumber2belongtotheresult.Theruntimecomplexityforstep2andalsoforthewholealgorithmTimeSynchronizeIntervalsisO(n+m+b)(=O(n+m)sincebn+m)wherebistheascertainednumberofmatchingunitintervals. 173
PAGE 174
Figure526. 527 ).Wedonotstorethisfurtherrenementexplicitlybutonlymakeourconclusionswithrespecttothedevelopmentintherespectiveunit. Figure527. IntersectingunitsegmentsoftwomovingpointsrepresentingthedevelopmentDisjoint.meet.Disjointandthusrequiringafurtherintervalrenement. Wealsohavetotakeintoaccountthatpartsofthewholedevelopmenttobecomputedmaybeundened.Hence,twoconsecutivetimeintervalsmaybeseparatedbytemporalgaps.In 174
PAGE 175
528 Figure528. Functionvaluedintervalrenementalgorithm. Foreachrenedinterval,wedeterminetheunitdevelopmentofthecorrespondingunitsofthetwomovingobjectsbycallingtheUnitIntersectalgorithm.Thisalgorithmreturnstheunitdevelopmentspeciedbythetwo3Dunitobjects.ThealgorithmaredescribedinFigure 529 .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 530 Figure530. 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 531 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. Figure531. Balloonpredicateevaluatoralgorithm. uncertaindevelopmentrespectivelyandthenreturnsthecorrespondingstringvalue.Dependingontherelativecomparisonbetweent1andt2(localpresentinstantsthatseparatethehistoricalandpredictedmovements),thecorrespondingdevelopmentbetweenthehistoricalmovementofanobjectandapredictedmovementoftheotherobjectisdeterminedandappendedtotheobjectdevelopment.Next,weappendthedevelopmentbetweenthepredictedmovementsofbothballoonobjectsandnormalizetheobjectdevelopment.ThenalstepistoemploythepatternmatchingprocessbycallingPatternMatchingandreturnthenalresult. Withanimplementationofthisalgorithm,onecanposeaqueryconsistingofbothtemporallycertainanduncertaindevelopments.Forexample,assumethattheprexescandudenotecertainanduncertaindevelopmentrespectively.AquerystringcDisjointuDisjointaskedtoverifywhetherthedevelopmenthasalwaysbeenandwillalwaysbedisjoint.AquerystringTrueuInsideTrueaskedwhetherthedevelopmentInsideexistssometimesinthefuture. 181
PAGE 182
First,oneshoulddesignanddevelopanalgebra,itsdatatypesandoperationsfromanabstractdatatypespointofview.Thisallowsaclearandcomprehensibledesignofthedatatypesandoperationsaswellasaseamlesstransformationofthedesignintoimplementableclassesandmethods. Second,oneshouldconsideranumberofrequirementspertainingtotheextensibilityoptionofDBMSsofinterest.Theseincludestheabilitytocreateuserdenedtypes(UDT)anduserdenedfunctions(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
532 ,weshowhowwecanregisteroneofourmovingballoondatatypesmballoonppandanoperationgetFunctionCount(returnsthenumberofunitfunctionsinamovingballoonobject)inOracle. RegistrationofadatatypeandanoperationinOracle. Inthiscase,ourmovingballoonobjectsarestoredinbinarylargeobjects(blob).AninvocationofthegetFunctionCountoperationrequiresalocator(apointertoablob)tobepassed 183
PAGE 184
Inthememorystorageoption,objectsarenotpersistentinthattheyonlyexistinmemoryforthedurationoftheprogramexecution.Thisoptionisalsorequiredformemoryexecutionmodeofdatabaseobjectswhereobjectsareloadedentirelyintomemory.Theblobstorageoptionallowsobjectstobestoredpersistentlyanddirectlyindatabaseblobs.Thisoptionfacilitatesmemoryexecutionmodesinceeachblobneedstobeloadedcompletelyintomemorytoconstructamemorybasedobjectthroughadeserializationprocess.Thisoptionispreferableforsmallsizedobjectsthatdonotrequirefrequentupdate(updateoperationsrequirewritingbacktodatabaseblobsthroughaserializationprocess).Toenabledatabaseexecutionmode,ourmSLOBstorageoptionmakesuseofanintermediatelayercalledmSLOBforstoragemanagement.mSLOBisourimplementationofamultistructuredlargeobjectmanagementconceptfordatabaseblobs[ 40 ].mSLOBprovidescomponentbasedreadandwriteaccesstostructuredandmultistructuredobjectsstoredinblobs.Thus,itallowsustoreadandwriteanycomponentofourobjectsondemandwithouttheneedtoloadtheentireobjectsintomainmemory.Therefore,themSLOBstorageoptionispreferableforlargeobjectsandfrequentlyupdatedobjects.Figure 533 illustratestheapplicationsystemarchitectureinwhichanumberofalgebracanbeintegratedinaDBMSwithorwithoutmSLOB. WithouralgebraintegratedinaDBMSandourUDTsandUDFsregistered,wecannowcreatetablesusingourregisteredtypes,populatedata,andposequeryusingourregisteredfunctions.Forexample,wecancreateasimpletabletostoreourmballoonppobjectsasshowninFigure 534 184
PAGE 185
TheintegrationofalgebrainextensibleDBMSs Creatingatableusingauserdenedtype. Assumingthatwehavepopulatedthistablewithafewmovingballoonobjects.Wecanthenposeaquery(Figure 535 )onthistableinSQLusingourUDFgetFunctionCounttogetthenumberofunitfunctionsineachobject. UsingauserdenedfunctioninSQLquery. Hurricanesaresomeofthemostpowerfulanddeadliestforcesofnature.AccordingtotheNationalHurricaneCenter,1385tropicalstormsandhurricaneshadbeenrecordedbetween1851 185
PAGE 186
Traditionally,stormdataincludingitsmovements(alsoknownasbesttrackdata)arecollectedandstoredinatextleinaspecicformatcalledHURDAT.Fromthisdata,researchersemploysophisticatedpredictionmodelstopredictthepositionofthestormatevery12hourintervalwithinupto120hoursinthefuture.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 Figure536. VisualizationofhurricaneKatrinausingtheMovingBalloonAlgebra. 187
PAGE 188
536 Aand 536 BshowhurricaneKatrinaasaballoonobjectonAugust26,2005at00:00GMTandAugust29,2005at00:00GMTrespectively.Figure 536 CshowsKatrinaasamovingballoonobjectconsistingofhertrackandall28ofherpredictionsoverthecourseofherlifetimedrawnontopofoneanother.Wecanswitchthevisualizationtoatemporalanalysisperspectivemodewherewecananalyze,atanyspecicinstant,thepositionoftheeyeaswellasthestateofthepredictions.Figure 536 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 537 Ashowsanobjectbasedperspectiveofthecompletetrackandprediction#7whichwasproducedonAugust25,2005at12:00GMT.Figure 537 Billustratesatemporalanalysisperspectiveoftheeye'spositionandtheuncertaintyregionofprediction#7onAugust27,2005at12:00GMTwhentheactualpositionoftheeyestartstostrayoutsideofthepredictedregion. ByperformingthiskindofanalysisforalloftheNorthAtlanticstormsoverthepast5years(20032007forwhichpredictiondataareavailable),wecandetermineforeachstormthenumberofaccurateandinaccuratepredictionsasshowninFigure 538 A.Intotal,82storms 188
PAGE 189
Figure537. VisualizinghurricaneKatrina.A)Katrina'sprediction#7inobjectbasedperspectives.B)TemporalanalysisperspectiveonAugust27,2005at12:00GMT. havebeenrecorded,and1863predictionshavebeenproducedofwhich655(orabout35%)havebeenfoundtobeinaccurate.Wehavealsodiscoveredthatmostofthestormsthathavehighpercentageofinaccuratepredictionsoftenexperiencecertainbehaviorssuchasmaking90degreeturnsanduturns(e.g.,hurricaneKate(#1312)asshowninFigure 538 B),orformingaloop(e.g.,hurricaneLisa(#1329)asshowninFigure 538 C).Itisclearthatthistypeofinformationwouldbeusefulforresearcherstostudysuchbehaviorsandmakenecessaryadjustmentstotheirpredictionmodel. 189
PAGE 190
BC Figure538. Hurricaneanalysis.A)Hurricanepredictionanalysisbetween2003and2007.B)HurricaneKate(#1312).C)HurricaneLisa(#1329). 190
PAGE 191
Inthischapter,weprovideanassessmentofourMovingBalloonAlgebraanditsimplementation.Theassessmentispresentedattwolevels.Werstprovideanassessmentofourtopologicalpredicateimplementationconcept.Thenwediscussanassessmentofourspatiotemporalmodel. 191
PAGE 192
192
PAGE 193
Fortestingtheresultsoftheevaluationphase,wetakethetopologicalfeaturevectorsasinputforthe9intersectionmatrixcharacterizationmethodandtheoptimizationmethodsofmatrixthinningandminimumcostdecisiontrees.Thecorrectnessofallmethodshasbeencheckedbyatechniqueknownasgrayboxtesting,whichcombinestheadvantagesoftwoothertechniquescalledblackboxtestingandwhiteboxtesting.Theblackboxtestingtechniquearrangesforwelldenedinputandoutputobjects.Inourcase,theinputconsistsoftwocorrecttopologicalfeaturevectorsaswellasamatrixnumberofthetopologicalpredicatetobeveriedincaseofpredicateverication.Thisenablesustotestthefunctionalbehaviorofthethreemethodimplementations.TheoutputisguaranteedtobeeitheraBooleanvalue(predicateverication)oravalidmatrixnumberofatopologicalrelationshippredenedforthetypecombinationunderconsideration(predicatedetermination).Thewhiteboxtestingtechniqueconsiderseverysingleexecutionpathandguaranteesthateachstatementisexecutedatleastonce.Thisensuresthatallcasesthatarespeciedandhandledbythealgorithmsareproperlytested. Allcaseshavebeensuccessfullytestedandindicatethecorrectnessofourconceptsandtheabilityofouralgorithmstocorrectlyverifyordetermineatopologicalpredicate. 2.3 wehaveseenthatallavailableimplementationsoftopologicalrelationshipsmainlyfocusontheeightpredicatesdisjoint,meet,overlap,equal,inside,contains,covers,andcoveredBythathave 193
PAGE 194
Figure61. Predicatevericationwithoutandwithmatrixthinning beengeneralizedtoanduniedforallcombinationsofcomplexspatialdatatypes.Hence,acomparisontoourmuchmorenegrainedcollectionof184(248)topologicalpredicates(Section 2.1.2 )isnotpossible.Second,studyingthecorrespondingdocumentation,wehavenotfoundaformaldenitionofthesemanticsoftheseeightgenericpredicatesforalltypecombinations.Third,animplementationofourcollectionoftopologicalpredicatesandpredicateexecutiontechniquesisnottrivialinthecontextofcommercialimplementationssincetheiralgorithmsandprogramcodearenotpubliclyavailableandtheirsystemenvironmentsareveryspecial.Forexample,thealgorithmsfortheeighttopologicalpredicateshavenotbeenpublished. 194
PAGE 195
50 ]. Forpredicateverication(PV),Figures 61 Band 61 Cillustratetheaverageexecutiontimeforeachpredicateofeachtypecombinationwithoutandwithmatrixthinning(MT).TheoverallaverageforeachtypecombinationisshowninFigure 61 A.Theperformanceimprovementsfromusingmatrixthinningarequitenoticeableandrangefrom13%executiontimereductionfortheline/linecaseupto55%forthepoint/pointcase. Similarly,forpredicatedetermination(PD),Figures 62 Band 62 Cshowtheaverageexecutiontimeforeachpredicateofeachtypecombinationwithoutandwiththeuseofminimumcostdecisiontrees.TheoverallaverageforeachtypecombinationisshowninFigure 62 A.Theresultsindicatesignicantperformanceimprovementsfromusingminimumcostdecisiontrees.Theimprovementsrangefrom75%executiontimereductionforthepoint/regioncaseupto91%fortheline/linecase. Althoughtheexecutiontimereductionsareremarkableforbothpredicatevericationandespeciallypredicatedeterminationandclearlyreectthetrend,theempiricalresultsshowninFigures 61 and 62 arenotasoptimisticasthecomputationalresultsgiveninTables 53 and 55 .Thereasonthatwecannotreachtheselowerboundsinpracticeconsistsinprogrammingandruntimeoverheadssuchasextraconditionalchecks,constructionofthinnedoutmatricesandminimumcostdecisiontrees,andtheirtraversals.However,evenwiththeseoverheads,itisevidentthatourapproachprovidesconsiderableperformanceoptimizations. 195
PAGE 196
Figure62. 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.Themodelsforfuturemovementsofmovingobjectstendtoemphasizeonusingspecicpredictionmethodsandcombiningpredictionmethodswithmovingobjectmodelsinatopdownverticalapproachtoaddressaspecicproblemonly.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.SpringerVerlag,2ndeditionedition,2000. [4] MartinBreunig,CanTurker,MichaelH.Bohlen,StefanDieker,RalfHartmutGuting,ChristianS.Jensen,LukasRelly,PhilippeRigaux,HansJorgSchek,andMichelScholl.ArchitecturesandImplementationsofSpatiotemporalDatabaseManagementSystems.InSpatioTemporalDatabases:TheCHOROCHRONOSApproach,pages263,2003. [5] E.ClementiniandP.DiFelice.AModelforRepresentingTopologicalRelationshipsbetweenComplexGeometricFeaturesinSpatialDatabases.InformationSystems,90:121136,1996. [6] E.ClementiniandP.DiFelice.AModelforRepresentingTopologicalRelationshipsbetweenComplexGeometricFeaturesinSpatialDatabases.InformationSciences,90(14):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.ASmallSetofFormalTopologicalRelationshipsSuitableforEndUserInteraction.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:ManagingGeoSpatialInformationwithintheDBMS.Technicalreport,IBMCorporation,1998. [12] M.J.Egenhofer,A.Frank,andJ.P.Jackson.ATopologicalDataModelforSpatialDatabases.In1stInt.Symp.ontheDesignandImplementationofLargeSpatialDatabases,pages271.SpringerVerlag,1989. [13] M.J.EgenhoferandR.D.Franzosa.PointSetTopologicalSpatialRelations.Int.JournalofGeographicalInformationSystems,5:161,1991. [14] M.J.EgenhoferandJ.Herring.AMathematicalFrameworkfortheDenitionofTopologicalRelationships.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.ModelingConceptualNeighborhoodsofTopologicalLineRegionRelations.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.AbstractandDiscreteModelingofSpatioTemporalDataTypes.InACMSymp.onGeographicInformationSystems(ACMGIS),pages131,1998,. [19] M.Erwig,R.H.Guting,M.Schneider,andM.Vazirgiannis.SpatioTemporalDataTypes:AnApproachtoModelingandQueryingMovingObjectsinDatabases.GeoInformatica,3,(3,):265,1999,. [20] M.ErwigandM.Schneider.DevelopmentsinSpatioTemporalQueryLanguages.InIEEEInt.WorkshoponSpatioTemporalDataModelsandLanguages,pages441,1999. [21] M.ErwigandM.Schneider.VisualSpecicationsofSpatioTemporalDevelopments.In15thIEEESymp.onVisualLanguages(VL),pages187,1999. [22] M.ErwigandM.Schneider.SpatioTemporalPredicates.IEEETrans.onKnowledgeandDataEngineering,14,(4,):1,2002,. [23] MartinErwig,MartinErwig,andMarkusSchneider.QueryByTrace:VisualPredicateSpecicationinSpatioTemporalDatabases.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.GeoRelationalAlgebra:AModelandQueryLanguageforGeometricDatabaseSystems.InInt.Conf.onExtendingDatabaseTechnology(EDBT),pages506,1988. [30] R.H.GutingandM.Schneider.Realms:AFoundationforSpatialDataTypesinDatabaseSystems.In3rdInt.Symp.onAdvancesinSpatialDatabases,LNCS692,pages14.SpringerVerlag,1993. [31] R.H.GutingandM.Schneider.RealmBasedSpatialDataTypes: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:EfcientAlgorithmsforRealmBasedSpatialDataTypes.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.MultiStructuredLargeObjectsinDatabases.Technicalreport,UniversityofFlorida,DepartmentofComputer&InformationScience&Engineering,2006. [41] M.McKenney,A.Pauly,R.Praing,andM.Schneider.EnsuringtheSemanticCorrectnessofComplexRegions.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/01029/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.LiteratureReviewofSpatioTemporalDatabaseModels.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:AFiniteRepresentationandDataStructuresforMovingObjectsinSpatioTemporalDatabases.Technicalreport,CISEDepartment,UniversityofFlorida,2008. [53] R.PraingandM.Schneider.MovingBalloonAlgebra:AnIntegrativeSpatioTemporalDataModelforHistoricalandPredictiveMovementsofMovingObjectsinDatabases.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.SpatialDataTypesforDatabaseSystemsFiniteResolutionGeometryforGeographicInformationSystems,volumeLNCS1288.SpringerVerlag,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

