• Keine Ergebnisse gefunden

Methods for Processing Moving Regions in Moving Objects Databases

N/A
N/A
Protected

Academic year: 2022

Aktie "Methods for Processing Moving Regions in Moving Objects Databases"

Copied!
165
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Florian Heinz

Methods for Processing Moving Regions in Moving Objects Databases

Dissertation

Mathematik und

Informatik

(2)

in Moving Objects Databases

Florian Heinz

Der Fakult¨ at f¨ ur Mathematik und Informatik der FernUniversit¨ at in Hagen

vorgelegte

Dissertation

zur Erlangung des akademischen Grades eines Doktors der Naturwissenschaften

(Dr. rer. nat.)

Regensburg, 2021

(3)

Moving objects database systems are specialized to store and process data with spatiotemporal attributes. A simple object type in this context is a moving point, which can represent the motion of a pedestrian, car or airplane. Another, more complex, type of object is a moving region, which is a region that changes position and shape over time. This thesis discusses various aspects for handling moving regions. One topic in this thesis is the region interpolation problem, where snapshots of regions are interpolated to moving regions. This procedure can be performed in several ways with varying results. The goal is to achieve a high quality result, which means primarily that the database model should match the corresponding real world objects as accurately as possible. Another chapter presents a new, polyhedra based, model for moving regions. This has two advantages compared to the prevailing unit based models:

Complex moving regions, especially the results of binary set operations as, for instance,

“union” can be represented in a much more compact way. Furthermore, operations on moving regions can be mapped into geometrical operations on polyhedra, for which robust and efficient algorithms are available. Based on this new model, operations for spatiotemporal coverage analysis of moving regions are developed. This is a set of operations to determine which regions are covered for which time intervals by a given moving region. In the light of large forest fires in the world, a method for creating moving regions from earth satellite scan data is discussed, that has several advantages over the prevailing methods. Another topic is the decomposition of moving regions into smaller and less complex entities, to improve their manageability in moving objects databases. Finally, an alternative data model for moving regions is introduced, which is optimized for rigid objects. The class of moving regions supported by that model is unable to change shape, but in return rotational movement is modeled accurately. For this new data type, useful operations like “moving point inside”,

“traversed area” and more are introduced. As a part of this work, reference implementations for all these topics are distributed in form of freely available C++ libraries, which can be easily integrated into existing moving objects database systems, as, for example, the DBMS Secondodeveloped at the FernUniversit¨at in Hagen.

ii

(4)

Datenbanksysteme f¨ur bewegliche Objekte sind darauf spezialisiert, Daten mit r¨aumlichen und zeitlichen Attributen zu speichern und zu verarbeiten. Ein einfacher Datentyp in die- sem Zusammenhang ist ein beweglicher Punkt, mit dem beispielsweise die Bewegung eines Fußg¨angers, eines Autos oder eines Flugzeugs beschrieben werden kann. Ein weiterer, et- was komplizierterer Objekttyp ist die bewegliche Region, welche ein bewegliches und form- ver¨anderliches Gebiet abbilden kann. Ein Thema in dieser Arbeit ist das Problem, Moment- aufnahmen von sich ver¨andernden Gebieten zu beweglichen Regionen zu interpolieren. Hierbei k¨onnen verschiedene Methoden zur Anwendung kommen, die zu unterschiedlichen Resulta- ten f¨uhren. Die Zielstellung ist, ein qualitativ hochwertiges Ergebnis zu erreichen, das die Realit¨at m¨oglichst genau abbildet. Ein weiteres Kapitel stellt ein neues, polyeder-basiertes Modell f¨ur bewegliche Gebiete vor. Im Vergleich zu den bisherigen Datenmodellen hat dieses zwei Vorteile: Zum einen k¨onnen komplexere bewegliche Gebiete einfacher und kompakter dargestellt werden; dies gilt insbesondere f¨ur komplexe bewegliche Regionen, die beispielswei- se aus den Mengenoperationen Vereinigung, Intersektion und Differenz hervorgehen k¨onnen.

Weiterhin er¨offnet dies die M¨oglichkeit, alle g¨angigen Operationen auf beweglichen Gebieten durch geometrische Operationen auf Polyedern zu berechnen, f¨ur die robuste, effiziente und gut getestete Algorithmen existieren. Basierend auf diesem neuen Modell werden Algorithmen zur Analyse der r¨aumlich-zeitlichen ¨Uberdeckung von Regionen durch bewegliche Regionen entwickelt. Dies ist eine Familie von Operationen um zu ermitteln, ¨uber welche Zeitspannen hinweg Regionen durch eine bewegliche Region verdeckt werden. In Anbetracht zahlreicher Waldbr¨ande weltweit wird eine Methode vorgestellt, um Abtastungs-Daten von Erdsatelliten in bewegliche Regionen zu konvertieren, die einige Vorteile gegen¨uber den vorherrschenden Interpolationsverfahren besitzt. Ein weiteres Thema ist die Dekomposition von beweglichen Regionen in kleinere Untereinheiten um die Handhabbarkeit der Objekte in Datenbanken zu verbessern. Zuletzt wird ein weiteres Datenmodell f¨ur bewegliche Gebiete vorgestellt, das auf die Modellierung von starren Objekten spezialisiert ist. Diese Klasse von beweglichen Regionen ist nicht in der Lage die Form zu ¨andern, jedoch k¨onnen Drehbewegungen wesentlich akkura- ter abgebildet werden. F¨ur diesen neuen Datentyp werden g¨angige Operationen wie “Moving Point Inside”, “Traversed Area” und weitere beschrieben. Als Teil dieser Arbeit wurden Refe- renzimplementierungen f¨ur alle Themenbereiche vorgenommen, die als C++-Bibliotheken frei verf¨ugbar sind. Diese k¨onnen auf einfache Art in bestehende Moving Objects Datenbanksys- teme eingebunden werden, beispielsweise in Secondo, das an der FernUniversit¨at in Hagen entwickelt wird.

iii

(5)
(6)

Firstly, I wish to express my sincere gratitude to my advisor Professor Ralf Hartmut G¨uting, whose guidance and feedback was of inestimable value. Despite not being an official member of the department he put much effort into supervising my doctoral research. In our numer- ous personal and virtual meetings he provided me with precious information, feedback and suggestions for interesting research topics, but also supported my personal initiatives.

I would also like to thank very much Professor Seeger from the University of Marburg for performing the second review.

Thanks also to the very kind people at the Department of Database Systems for New Appli- cations at the Fernuniversit¨at in Hagen.

Furthermore, I wish to thank my beloved wife Corinna who supported me in many ways: With our numerous discussions, by proofreading the various papers and this thesis, by encouraging me in challenging times and by accompanying me on all my trips to Hagen.

Last but not least, thanks to my parents and my sister for always motivating me and showing their interest in my research.

v

(7)

1 Introduction 1

2 Related Work 3

2.1 Approaches and Frameworks for Moving Objects Databases . . . 3

2.2 Methods for Interpolation of Regions . . . 4

2.3 Aggregate Operations on Moving Regions . . . 6

3 Essentials 7 3.1 Data Model for Moving Objects Databases . . . 7

3.2 Object Types . . . 9

3.2.1 Point . . . 9

3.2.2 Time Interval . . . 9

3.2.3 Region . . . 9

3.3 Moving Objects . . . 10

3.3.1 Moving Booleans . . . 11

3.3.2 Moving Real Values . . . 12

3.3.3 Moving Points . . . 13

3.3.4 Moving Regions . . . 14 vi

(8)

4.1 Interpolation of Regions . . . 21

4.1.1 Method McKenney&Webb . . . 23

4.1.2 Method Tøssebro&G¨uting . . . 24

4.1.3 Snailshell Configuration . . . 25

4.1.4 Combining the Strategies . . . 26

4.2 Recursive Approach . . . 26

4.2.1 Recursion-Based Algorithm . . . 27

4.2.2 Modified Rotating Plane . . . 28

4.2.3 Handle Intersections . . . 30

4.3 Face Matching . . . 34

4.3.1 Relation between Matching Strategy and Application . . . 34

4.3.2 Implementing Strategies . . . 34

4.3.3 General Conception of Matching Strategies . . . 36

4.3.4 Application-Specific Modifications . . . 38

4.4 Examples . . . 38

4.5 Integration into Existing DBMS . . . 41

4.6 Conclusion . . . 43 vii

(9)

5.1 Motivation for a New Data Model . . . 46

5.2 Polyhedral Model of Moving Regions . . . 48

5.2.1 Definition and Representation of Polyhedra . . . 48

5.2.2 Pmregion Object Representation . . . 48

5.3 Operations on Polyhedral Moving Regions . . . 49

5.3.1 Atinstant . . . 49

5.3.2 Moving Point Intersection and Inside . . . 50

5.3.3 Perimeter, Distance and Area . . . 51

5.3.4 Set Operations: Union, Intersection, Difference . . . 52

5.3.5 Operation Intersects . . . 52

5.3.6 Operation Traversedarea . . . 52

5.4 Implementation of the Operations . . . 53

5.4.1 Atinstant Implementation . . . 53

5.4.2 Moving Point Intersection and Inside Implementation . . . 55

5.4.3 Implementation of Perimeter, Distance and Area . . . 55

5.4.4 Implementation of Set Operations: Union, Intersection, Difference . . 55

5.4.5 Intersects Implementation . . . 57

5.4.6 Traversedarea Implementation . . . 58

5.4.7 Conversions between the Two Models . . . 58

5.5 Examples . . . 59

5.5.1 Example Intersection and Union of Two Moving Regions . . . 60

5.5.2 Example Atinstant . . . 61

5.5.3 Example Moving Point Inside . . . 62

5.5.4 Example Multiple Faces and Holes . . . 62

5.5.5 Large Scale Comparison of Union, Intersection and Difference . . . . 62

5.6 Conclusion . . . 65 viii

(10)

6.1 Spatiotemporal Coverage Aggregates . . . 68

6.1.1 Definitions . . . 70

6.1.2 Method Overview . . . 71

6.1.3 Calculating a CD-Polyhedron . . . 72

6.2 Spatiotemporal Coverage Analysis Operations . . . 73

6.2.1 Setting the Base Region . . . 74

6.2.2 Operation Coverduration . . . 76

6.2.3 Operation Coveredlonger . . . 77

6.2.4 Operation Coveredshorter . . . 78

6.2.5 Operation Intervalcovered . . . 79

6.2.6 Operation Avgcoverduration . . . 80

6.3 Implementation . . . 81

6.4 Evaluation . . . 81

6.4.1 Sunlight Incidence in a Valley Basin . . . 81

6.4.2 Hurricanes Aug - Oct 2019 Atlantic Region . . . 82

6.4.3 Runtime Complexity . . . 84

6.5 Conclusion . . . 86

7 Creating Moving Regions from Satellite Scan Data 87 7.1 Dataset Format . . . 88

7.2 Converting Datasets into Moving Regions . . . 89

7.2.1 Creating Polyhedral Moving Regions . . . 89

7.2.2 Converting to Unit-based Moving Regions . . . 91

7.2.3 Splitting the Moving Region . . . 91

7.3 Practical Tests . . . 92

7.3.1 Forest Fires in South America . . . 92

7.3.2 Bush Fires in Australia . . . 93

7.3.3 Correlation with Raster Data . . . 94

7.3.4 Development of Burning Area . . . 96

7.4 Comparison with Interpolation from Snapshots . . . 97

7.5 Conclusion . . . 98 ix

(11)

8.2 Definitions . . . 102

8.3 Algorithm for Decomposition . . . 103

8.3.1 Elementary Region Units . . . 103

8.3.2 Adjacency Graph . . . 103

8.3.3 Isolation Step . . . 103

8.3.4 Debranching Step . . . 104

8.3.5 Decomposing Polyhedral Moving Regions . . . 105

8.4 Evaluation . . . 106

8.5 Conclusion . . . 108

9 Moving Regions of Fixed Shape 109 9.1 Motivation for a New Data Model . . . 110

9.2 Discrete Model of Fixed Moving Regions . . . 111

9.3 Operations on Fixed Moving Regions . . . 112

9.3.1 Atinstant . . . 112

9.3.2 Inside . . . 113

9.3.3 Interpolate . . . 116

9.3.4 Traversedarea . . . 117

9.4 Data Model of the Border Region . . . 122

9.4.1 Operation Point Inside . . . 124

9.4.2 Operation Region Intersects . . . 124

9.4.3 Converting a Curved Region to a Region . . . 125

9.5 Integration into Existing DBMS . . . 125

9.6 Evaluation . . . 126

9.6.1 Atinstant . . . 126

9.6.2 MPoint Inside . . . 127

9.6.3 Interpolate . . . 127

9.6.4 Traversedarea . . . 128

9.6.5 Application: Debris in Space . . . 128

9.6.6 Application: Icebergs Traversing the Sea . . . 129

9.7 Conclusion . . . 131 x

(12)

A PMRegion: Source Codes 139

A.1 AtInstant . . . 139

A.2 MPointInside . . . 139

A.3 Union . . . 140

A.4 Traversedarea . . . 141

A.5 Code Examples . . . 141

B Comparison Results Polyhedra vs. Units 142 C Coverduration Library Functions 144 D Fixed Moving Regions: Formulae 146 D.1 Rotate . . . 146

D.2 Atinstant . . . 146

D.3 Inside . . . 146

D.4 Trochoid . . . 148

D.5 Ravdoid . . . 148

D.6 Intersections . . . 149

D.6.1 Intersections between two Trochoids . . . 149

D.6.2 Intersections between two Ravdoids . . . 150

D.6.3 Intersections between Trochoids and Ravdoids . . . 150

D.6.4 Intersections between Curves and Line Segments . . . 150

E Secondo Distributed Interpolation 151

xi

(13)
(14)

Chapter 1

Introduction

Database systems in general are designed to store and process various kinds of data. Many general purpose database management systems focus on a relational model, where data is structured in tables and rows which can be filtered, linked or aggregated using appropriate queries. In a broad field of applications, as, for example, traffic and aviation planning and surveillance or weather forecast systems, the database system is required to support data types for moving objects like cars, airplanes, clouds and ships. Moving object database systems (MODs) are specialized to intrinsically handle such objects with spatiotemporal attributes; this means, that not only spatial and temporal information is taken into account, but particularly also the combination of both, and many operations related to the spatiotemporal aspects of the data are already implemented atdatabase level. This becomes more and more important with the increasing amount of applications that generate and process spatiotemporal data, for example, with the help of mobile devices, which are nowadays equipped with high-resolution gps tracking and a permanent internet connection.

A simple type of object in a MOD is amoving point, representing, for instance, the movement of a car or an airplane. A typical query might target during which time intervals a moving point is located inside a given region, for example, to determine at which times an airplane is located over Europe. Another database query could identify the distance between two moving entities. The result in this case is a moving real, which is a number object whose value is a function of time. There are several more moving object types such asmoving lines, which could, for example, model the movement of a riverbed over a long time span ormoving booleans, which represent a time dependent truth value.

One of the most complex spatiotemporal objects type is themoving region, which is a region that changes position and shape over time. This data type is well suited for real-world phenomena like forest fires, oil spills on the sea or bad weather areas, and also for large objects with significant extent as, for example, cruise ships or icebergs. These objects can of course be set into relation with other object types like moving points, which can, for instance, be useful to determine during which time intervals a flying airplane is located inside a moving bad weather area (see Figure 1.1).

In this thesis, several advanced methods for modeling and processing moving regions in moving objects databases are developed and discussed.

(15)

t1 t2 t3 t4 t5

Figure 1.1: A Moving Region traversed by a Moving Point

The following Chapter 2 provides a survey of previous and related work that is relevant for the research performed in this thesis. After that, Chapter 3 introduces the foundation on which the research in this work is based.

In Chapter 4, a method for creating moving regions from snapshots in time is presented.

The interpolation of these snapshots can be performed in several ways, which has significant influence on the quality of the result. The primary objective is to always achieve valid interpolation results with a robust algorithm and furthermore match the real behavior of the moving regions between the snapshots as accurately as possible.

Chapter 5 presents another, alternative model for moving regions in databases. The classical model, that is introduced in Chapter 3, suffers from several drawbacks that are addressed in the proposed model, which is based on polyhedra. This new model can represent the same class of moving regions as the classical model.

In Chapter 6, algorithms for spatiotemporal coverage analysis of moving regions are discussed.

This enables a database user to determine which parts of a region are covered by a moving region for a specific time interval. This can be useful, for instance, to calculate the area where a hurricane has the least impact or where a certain amount of rain falls.

Chapter 7 proposes an alternative method to the interpolation approach for creating a moving region from data sets with some special characteristics, for example, from satellite scan data where only a set of tuples with a timestamp and a pair of coordinates is available.

In Chapter 8, the decomposition of moving regions into smaller entities for better handling in databases is discussed. This is useful when complex moving regions have to be processed, but regularly only small parts of it are targeted in database queries.

Chapter 9 proposes another model for moving regions of fixed shape. The motivation for this model is to support rotational movement accurately, which is not possible with the previously discussed models. This means that this model represents a different class of moving regions than the existing ones, to be able to model large and rigid objects like cruisers or icebergs, which are likely to perform rotating movement.

The research from Chapters 4, 5, 6 and 9 was published in [HG16], [HG20a], [HG20b] and [HG18].

(16)

Chapter 2

Related Work

2.1 Approaches and Frameworks for Moving Objects Databases

Currently, only few approaches and implementations or frameworks on moving objects databases exist.

The popular database system PostgreSQL provides an extension called PostGIS1, which en- ables the database to store and process spatial objects. However, the temporal dimension is not taken into account intrinsically. There is some limited support for trajectories, which are represented by a strictly monotonously rising 3d polyline and can be used with functions likeST ClosestPointOfApproach or ST DistanceCPA to find out the minimum distance and the point of minimum distance of two point-like objects, but more complex spatiotemporal objects like moving regions are not supported. For more details see [Str17].

In 2012 a spatiotemporal extension for Oracle was proposed in [MMC12], that supports moving object types like moving points and moving regions. The underlying model for moving regions is not based on moving segments, but the polygons of the moving regions are formed by an ordered set of moving points. This allows creating a bigger class of moving regions, but has the implication, that operations like intersects or intersection must be implemented by discretizing the temporal dimension and computing the operation for the projections at regular time instants. Since the spatial projection of the moving points form a polyline, rotating objects, whose vertices are generally following curved paths, cannot be represented exactly with this model either.

Another implementation presented in [PFGT15] is the Hermes MOD developed at the Uni- versity of Pir¨aus, which supports spatiotemporal objects like Point, Box and Range. These objects have an associated timestamp or time range but are not changing their spatial at- tributes, meaning they don’t move or change shape. The object types that are indeed mov- ing are SegmentST and Trajectory, which represent moving points. Several spatiotemporal

1https://postgis.net/

(17)

queries are implemented, such as atinstant, which determines, where a moving point is lo- cated at a given timestamp or the operation overlaps to test if a moving point is inside a box at some point in time. More complex moving object types, for example, moving regions, are not supported. The focus of Hermes MOD is the processing of movement data of point like objects, for example, citizen movement based on GPS data. Hermes is open-source and comes as an extension for Oracle, PostgreSQL and Neo4j.

In [DYGL15] a model and methods for matching trajectories representing moving points to movement networks like street maps or railways called NMTMOD is proposed. Data from GPS position updates is transformed into a movement vector, from which a network- matched trajectory on the underlying street map is generated. From a representative amount of those trajectories, traffic jams and their locations can be derived by traffic-flow analysis algorithms. When tracking and processing the movement data of a large number of people in big cities, huge amount of GPS data with dynamic location updates in real-time has to be processed. [DYCG16] presents a distributed and parallel moving object database framework called PD-NMOD, which is highly scalable and provides a database model for the management of moving objects. Because this work concentrates on traffic movement, the only moving objects considered are moving points.

A moving objects database system with a great variety of object types isSecondodeveloped at the Fernuniversit¨at in Hagen [GBD10]. The supported data types include moving objects of type boolean, string, integer, real, point, line and region, which are able to change their attributes over time. Furthermore, many functions and queries exist to put these objects into relation, for example, to calculate, during which times a moving point is located inside a moving region. The implementation of Secondo is based on a data model for moving objects databases presented in [GBE+00] and [FGNS00]. The fundamental basics of the data models for these object types, which are based on sets of unit objects over disjoint time intervals, are introduced in the following Section 3.

The data model of the moving regions is based on moving segments, as shown later in Figure 3.6. This is also the basis for similar models and implementations, as, for example, the “Component Moving Region” (CMR) model described in [MF15]. This is a derived work which focuses on the processing of regions and moving regions. An implementation is available in the form of an open source python library calledpyspatiotemporalgeom, which is developed by McKenney et al. Included are, for example, the implementations of algorithms to interpolate moving regions from snapshots of regions, set operations like intersection and union as well as temporal coverage aggregate functions. This framework makes use of the CMR model, which is also based on units with disjoint time intervals called “Component Interval Regions” (CIR). This is presented in [MVL14a], the implementation of set operations on this model is described in [MSB17].

2.2 Methods for Interpolation of Regions

Transforming objects into each other is a common problem in computer science. Shape morphing, for example, is one field of research which is distantly related to the interpolation

(18)

of regions to moving regions, since both approaches roughly have the same goal: An intuitive and realistic interpolation between two snapshots of objects.

Most shape morphing algorithms follow a similar scheme: First, a feature matching algo- rithm is used to determine corresponding points in both snapshots. Such points of the source objects are transformed into their counterparts of the destination objects during the actual morphing process. Several feature matching techniques have been developed, as, for example, described in [YF09], where a robust metric to quantify visual similarities is utilized for that purpose.

In the next phase, paths have to be found, which interconnect these points. During the morphing sequence, the feature points of the source object move along these paths to the matching points of the destination object. Gotsman&Surazhsky in [GS01] describe a method, how to find guaranteed intersection-free paths. In general, these are not straight, but arbitrarily shaped (e.g., curves or polylines).

The main focus of Shape morphing is on the visual effect, which is a bit different from the goal to create a moving region suitable for moving objects databases. Particularly, the main obstacles for using a shape morphing based approach for interpolating moving regions are:

Another discrete datatype has to be found to define and store moving regions, which is differ- ent from the current moving segments based type. This is non-trivial and usually unneeded for shape morphing applications, since in a typical usage case, either the whole shape-morphing algorithm is performed when needed or a series of snapshots to show an animation is stored, for example, animated gifs or videofiles. For a database object, however, it is important to have an object representation which is completely independent from the algorithm that was used to create it. Furthermore, the external representation should be unambiguous and the complexity should be kept low to ease the implementation of the data type in database management systems or object viewers. Another important point is that the internal rep- resentation of the moving regions must be suitable to be able to efficiently combine them with other objects, for example, to determine during which time intervals a moving point is located inside a moving region. In the case of shape morphing, the 3d-representation of the resulting moving region is an arbitrarily shaped object, which makes most operations hard and inefficient to implement.

Another field of ongoing research is sampling-based motion planning, which can also be used to calculate the movement of “closed chains”, represented by polygons, as described in [MTA14b] and [MTA14a]; these are a suitable model for a robotic arm or similar devices.

The basic concept is to interpolate between a source and a target configuration of the device, usually honoring several constraints, e.g., to rule out collisions with obstacles during the movement, and to derive the appropriate movement commands for the physical actors from that. This is done by generating samples (in a deterministic or random way) for the joints of some of the segments, which are candidates for waypoints during the movement, and the use of inverse kinematics for the remaining segments to complete the closed chain.

From these candidates a suitable set for the intended movement is chosen which fulfills the given constraints. These algorithms thus concentrate on the special case, where the polygon segments’ lengths are immutable, but can be translated and rotated. Especially the rotation of the segments is absolutely crucial for the intended application, so the methods described

(19)

in [MTA14a] are not trivial to generalize for interpolating arbitrary polygons, since it heavily relies on immutable segments of the closed chains. There is no obvious way to apply them to moving regions.

Methods for interpolating regions to moving regions for the prevailing moving regions model in moving objects database systems, as, for example, Secondo, are discussed in [TG01]

and [MW10]. The basic idea is to interpret the source and destination region as top and bottom surfaces of a polyhedron and rotate a plane around it to create the lateral surface (Rotating-Plane Algorithm). This algorithm is discussed more detailed later in Section 4.2.2.

2.3 Aggregate Operations on Moving Regions

[MFBM17] presents an approach for so-called temporal coverage aggregate functions on moving regions. These functions are designed to analyze the characteristics of a moving region with regard to the durations that regions are covered by a moving region.

The research in [MFBM17] presents two functions,minTCAandmaxTCA, that take a mov- ing region as parameter and returns the areas of absolute maximum and minimum coverage durations. In many cases these are only a set of lines, especially when the moving region does not overlap itself in the start and final instant or during the movement. Figure 2.1 shows an example of both operations.

Figure 2.1: Example operations minTCA and maxTCA

The moving region shown on the left consists of a single triangle that moves from left to right. The result of the minTCA operation on the right is the green border (solely the border, not the interior). Each point on this border line is covered for exactly one instant in time. In contrast, the maxTCA function yields the red line in the middle. The points on this line are covered for a maximum time duration during the movement of the triangle.

The method developed in [MFBM17] is based on a concept called Coverage Points of Interest (CPoI), that are derived from the moving segments of a moving region projected out of the temporal dimension. These points are then stored together with the coverage duration and cycles are created from elements with identical values. For example, in Figure 2.1, the two end points of the line in the middle are CPoIs with the same (maximal) temporal dimension, hence the line is the result of the maxTCA operation. Similarly, the corner points of the polygonal shape are CPoIs with minimal temporal dimension, so this shape is the result of the minTCA operation. In that paper and the associated reference implementation2 only moving regions containing a single time interval and one face are considered, but the algorithms can probably be extended to support arbitrary moving regions, too.

2https://bitbucket.org/marmcke/pyspatiotemporalgeom/

(20)

Chapter 3

Essentials

3.1 Data Model for Moving Objects Databases

An extensive foundation for the data models commonly used for many objects in moving objects databases was developed in [GBE+00] and [FGNS00], from which the most important topics for this thesis are reiterated in this chapter.

The first step is to define a so-called abstract model for each data type, which is a very general description of the corresponding class of objects that gears more towards a mathematical level.

This has the advantage that it describes a very basic concept of the objects, that can then be refined later in the implementation.

For example, a line value is informally defined in [GBE+00] as a finite set of continuous curves in the plane(which is then backed by a formal mathematical definition). This covers a large class of lines in an elegant way, but has the drawback, that there is no fixed, finite representation.

This is where discrete models come into play. A discrete model of a data type does not necessarily cover the whole class of objects covered by the corresponding abstract model;

different discrete models can represent different subsets. With the example of aline, several discrete models are conceivable. A simple discrete model is a set of polylines defined by the endpoints of each polyline segment. If curved lines are required, another discrete model might use spline curves up to some polynomial degree instead of straight line segments. The decision for one model or another depends on the specific requirements of the application;

in this case, the latter model might resemble some paths more accurate, while the former is easier to implement and computationally less demanding, for instance, when it comes to operations likeline intersection with other objects. Figure 3.1 shows two lines that resemble similar paths, but are based on different discrete models.

The foundation in [FGNS00] defines four important base types: bool, int, real and string. Furthermore, the spatial typespoint,points,lineandregionas well as the time typeinstant

(21)

Figure 3.1: Two lines following similar paths with different discrete models

are introduced there. The abstract model of any typeαhas a corresponding carrier set named Aα.

To augment these objects with a temporal component, a type constructor named moving is introduced that transforms each of these object types into a correspondingmoving object datatype. In the abstract model, a moving object ofmoving(α) is a function from time into the domain of the corresponding base data type α. For example, a moving point mpoint is a function from aninstant in time to apoint:

mpoint :Ainstant →Apoint

Again, the abstract models of the derived moving object types cannot be implemented directly;

suitable discrete models have to be found. In the following, the prevailing discrete models of these datatypes as proposed in [FGNS00] are introduced. These are commonly used in today’s moving object databases as, for example,Secondo. For the textual representation of these objects, the following notation calledNested Listis used; for this reason, this notation is described briefly first.

Nested List Notation This notation is, for example, used in the moving objects database systemSecondoto import and export objects from and into ascii text files. It is important to note, that the database internal format (in-memory and on-disk) is an optimized binary representation of this object that is not related to this nested list format.

A list is enclosed in parentheses and contains zero or more elements:

( ELEM ELEM ... )

An element can be a text string enclosed in quotes, an integer, a real number, a boolean truth value (TRUE or FALSE), an identifier called symbol (for example, a data type) or another (nested) list. The following is the nested list representation of aSecondo point object:

(22)

( OBJECT p1 () point ( ( 200.0 100.0 ) ) )

Comments are enclosed in ! and ! . The database system Secondo makes use of the nested list notation for importing and exporting objects in a text file format; as already stated previously, the database internal representation of all objects are binary structures.

3.2 Object Types

3.2.1 Point

A point is a 2d object defined by a pair of coordinates. The nested list representation is a two-element list (x y)with x andy of typereal.

3.2.2 Time Interval

A time interval is a contiguous subset of the time domain. The discrete model of a time interval is defined as two real values that are mapped linearly into the time domain, repre- senting the start and end instant, supplemented by two boolean values that specify, if the start and end instant are part of the time interval (left- or right-closed interval).

The nested list representation is comprised by a four-element list with two string values representing the start and end instant down to milliseconds in the format ”YYYY-mm-dd- HH:MM:SS.sss”, as well as two boolean values that denote if the start or end instant is included in the time interval.

( "2019-06-21-14:44:43.524" "2019-06-27-13:37:00.982" TRUE FALSE )

3.2.3 Region

The abstract model of aregion is defined as follows:

Definition 1 A region is a finite set of disjoint faces, where each face is a connected subset of the plane with non-empty interior. Faces may have holes and may lie within holes of other faces.

(23)

Since this abstract model specifies an infinite set of points, the following discrete model is further used as a finite representation of a region: Aregion is defined as a set of faces, each face optionally containing one or more holes. Faces and holes are represented by simple, non-intersecting 2d polygons described by an ordered list of vertices (points). Holes must be inside a face and the area inside a hole does not count to the interior of the corresponding face. Furthermore, a face may not intersect another face. A point can be inside, outside or on the border of a region. A formal description on the discrete region model used in moving objects databases can be found in [FGNS00]. Listing 3.1 and Figure 3.2 are an example of a region with two faces, one containing a hole. Other discrete models, for example with curvy borders, are conceivable (see thecregion datatype in Section 9.4).

1 ( OBJECT r e g 2 ( ) r e g i o n

3 (

4 ( ! F a c e 1 !

5 ( ! C y c l e !

6 ( 2 2 9 . 0 −363.0 )

7 ( 9 8 . 0 −283.0 )

8 ( 1 5 2 . 0 −105.0 )

9 ( 3 4 0 . 0 −108.0 )

10 ( 3 7 6 . 0 −295.0 )

11 )

12 ( ! H o l e 1 i n F a c e 1 !

13 ( 2 7 1 . 0 −248.0 )

14 ( 1 8 8 . 0 −240.0 )

15 ( 2 4 5 . 0 −187.0 )

16 )

17 )

18 ( ! F a c e 2 !

19 ( ! C y c l e !

20 ( 6 3 2 . 0 −253.0 )

21 ( 4 5 9 . 0 −254.0 )

22 ( 5 5 6 . 0 −141.0 )

23 ( 5 5 4 . 0 −216.0 )

24 )

25 )

26 )

27 )

Listing 3.1: Nested list representation of a region

3.3 Moving Objects

A moving object is different from classical objects because at least some attributes of the object are determined by a function of the time. In the abstract model, a type is converted into a moving type by applying the type constructor moving, which constructs a mapping from the time domain into the typeα. So, for each data typeα, the carrier set for moving(α) is

(24)

Figure 3.2: A Region with two Faces and one Hole

the set of (partial) functions from the time domain into the typeα. This is an elegant method for the abstract model; however, it is not possible to have a type constructor to generically convert the discrete model of an object type into the corresponding discrete moving object type.

Still, the discrete models of the moving types as proposed in [FGNS00] follow a common schema: A moving object consists of several units, each defining the object over a different time interval. The time intervals of the units constituting a single moving object have to be pairwise disjoint and the moving object is defined over the union of the time intervals of all units. A time interval[t1, t2], which can be (half-)open, is externally represented as described in Section 3.2.2).

There are several operations that apply to most moving object types. A very basic operation is atinstant, that determines the state of an object at a specific instant in time. Operations regarding topological relationships between moving objects includeintersectsandinside, that determine all time intervals during which one object intersects or is located inside another object. Furthermore, set operations likeintersection,union anddifference can be applied to various constellations of moving objects.

3.3.1 Moving Booleans

A bool value represents a truth value (TRUEor FALSE). The corresponding moving object is an mbool (moving bool), which elevates a boolean value to a truth value changing over time. The basic unit is aubool

ubool : (bool,[ts;te])

which defines a (constant) boolean value over a specific time interval. An mbool is defined as a set of ubool with disjoint time intervals. Thus, from each instant in one of the time intervals defined by the mbool, a truth value can be derived. Furthermore, it may also be

(25)

Figure 3.3: An example moving boolean

undefinedat an instant, if this instant is outside all time intervals covered by the mbool; this also applies to the other moving object types. Figure 3.3 illustrates this.

For example, the following mbool, composed from two units, is TRUE for one hour, then FALSEfor the following hour, and undefined at all other instants:

( ( ( "2018-11-12-14:00:00" "2018-11-12-15:00:00" TRUE FALSE ) TRUE ) ( ( "2018-11-12-15:00:00" "2018-11-12-16:00:00" TRUE TRUE ) FALSE ) )

3.3.2 Moving Real Values

An mreal object represents a real number which changes over time. It consists of one or moreureal units with disjoint time intervals:

ureal := ([ts, te],(a, b, c))with a, b, c∈R mreal ⊂UREAL (with disjoint time intervals)

To compute the value of an mreal object at a given instant t, the corresponding ureal unit has to be located according to the associated time intervals. If a matching unit is present, the value for a specific instanttcan be calculated using the following formula

atinstant (ureal,t) =ax2+bx+cwith x= tt−ts

1day

wheret1day is the scalar duration value of a single day.

The following is an example mreal object consisting of two units. A graph of this mreal is shown in Figure 3.4.

(

( ( "2018-11-12-14:00:00" "2018-11-12-15:00:00" TRUE FALSE ) ( 100.0 2.0 10.0) ) ( ( "2018-11-12-15:00:00" "2018-11-12-16:00:00" TRUE TRUE )

( -80.0 20.0 112.0) ) )

InSecondo,mreal objects also contain a fourth boolean parameterr, which denotes, if the root should be extracted for the final result; this parameter is omitted since it is not used in this work.

(26)

0 20 40 60 80 100 120

14:00 14:30 15:00 15:30 16:00

mreal

Figure 3.4: Graph of an mreal object

3.3.3 Moving Points

AUPointis defined as a triple

upoint : (S,−→v ,[ts;te])

with astart pointS, avector−→v describing the linear movement and atime interval[ts;te] consisting of a start and end instant.

The parametric function of this point is

x(t) :=Sx+t·vx y(t) :=Sy+t·vy

with the time interval[ts;te] and the instant t normalized to [0; 1] with ts = 0 andte = 1.

An mpoint consists of a set of upoint with disjoint time intervals. The atinstant operation on a moving point is effectively a linear interpolation between the start and end configuration of the correspondingupoint.

The following example mpoint consisting of two units moves 90 minutes to the right from (20 10) to (100 20) and then 30 minutes to the upper left from (100 20) to (30 70) (see also Figure 3.5).

( ( ( "2018-11-12-14:00:00" "2018-11-12-15:30:00" TRUE FALSE )

( ( 20 10 ) ( 100 20 ) ) )

( ( "2018-11-12-15:30:00" "2018-11-12-16:00:00" TRUE FALSE )

( ( 100 20 ) ( 30 70 ) ) ) )

(27)

Figure 3.5: Trajectory of anmpoint

3.3.4 Moving Regions

Generally spoken, an mregion (moving region) is a region that moves and changes shape over time. Theabstract modelof an mregion is defined as follows:

mregion :instant →region

The following is the prevailingdiscrete model for implementing moving regions in databases:

In contrast to aregion, which consists of a set of segments, the base elements of anmregion are moving segments from a set MS ⊂ {(si, sf)|si, sf ∈ SEGMENTS ∧si k sf}, where each moving segment is defined by a tuple of two parallel line segments (from which at most one can be degenerated to a point), describing the situation at the initial and final instant of a time interval. The state of the segment at any instant in between is then derived by linear interpolation. This is illustrated in Figure 3.6, where the red-dashed lines show an interpolation state in the middle of the time interval. Since the two defining line segments are required to be parallel, all interpolated line segments are parallel to these, too; this means, that a single moving segment cannot rotate during the movement; a rotating segment has to be emulated by two moving segments (see Segments s2a/s2b in Figure 3.6).

The reason for this restriction is that when rotating segments and points are allowed many operations and topological predicates on mregion objects cannot be calculated efficiently, since trigonometric functions are involved then and, in general, even with high calculation effort only numerically approximated results can be found. Furthermore, this restriction allows to interpret classical moving regions as 3d polyhedra, because the 3d interpretation of a parallel moving segment is a planar surface. This is an important aspect in the following chapters. As a drawback, rotations and circular movements cannot be modeled accurately.

(28)

Figure 3.6: Schema of Moving Segments

Moving segments form closed moving polygon cycles. Each moving cycle is either a moving face of the moving region or a hole in a face. A set of moving faces together with an interval from start to end instant of the movement defines a unit region uregion. A set of uregion with disjoint time intervals form anmregion.

Definition 2 Unit Region and Moving Region:

uregion := ([ti;tf],mfaces ⊂MFACES)

mregion ⊂UREGION (with disjoint time intervals)

Other, similar models were also based on these definitions, for instance, the CMR model developed in [MVL14b]. These models are all unit-based, meaning they are composed of a time interval and a corresponding set of moving segments, which form one or more (moving) polygon cycles. Figure 3.7 shows a moving region consisting of two units with time intervals [t0;t1]and]t1;t2]. In the first unit (a-c), one face is expanding and its hole (gray) is shrinking, while another face moves to the top left. In the second unit (d,e), the large face has vanished and the remaining face shrinks to a point.

(a)t0 (b) (c)t1 (d) (e)t2

Figure 3.7: Example of a Moving Region composed of two units

In Figure 3.8, the moving segments are illustrated, which make up the moving region. Equally colored segments are part of the same moving segments, the black arrow lines show the motion direction of the segments’ endpoints. Figure 3.9 shows the same moving region in a 3d view, where the z-axis represents the time.

The following listing is the external, textual representation in nested list form (see Section 3.1) of the moving region from Figures 3.7 and 3.8 following the classical unit based discrete moving region model.

(OBJECT mregion () mregion (

(29)

Face 2 Face 1

Hole 1

Unit 1

Face 1

Unit 2 Figure 3.8: Moving Segments of a Moving Region

( _! Unit 1 !_

("1970-01-01-00:00:00.000" "1970-01-02-00:00:00.000" TRUE FALSE) ( _! Faces !_

( _! Face 1 !_

( _! Main Cycle !_

( 70 90 50 110 ) ( 100 120 80 140 ) ( 70 120 50 140 ) ))

( _! Face 2!_

( _! Main Cycle !_

( 50 50 0 0 )

( 150 50 200 0 ) ( 150 150 200 200 ) )

( _! Hole 1 Cycle !_

( 70 60 80 60 ) ( 140 60 120 60 ) ( 140 130 120 100 ) ))))

( _! Unit 2 !_

("1970-01-02-00:00:00.000" "1970-01-03-00:00:00.000" TRUE TRUE) ( _! Faces !_

( _! Face 1 !_

( _! Main Cycle !_

( 50 110 50 140 ) ( 80 140 50 140 ) ( 50 140 50 140 ) ))))))

The external representation of moving segments are in the form

(30)

Figure 3.9: 3d view of a moving region with moving segments’ paths (red)

( ix_1 iy_1 fx_1 fy_1 ) ( ix_2 iy_2 fx_2 fy_2 )

...

( ix_n iy_n fx_n fy_n )

and describe a moving cycle with moving segments:

((ix1iy1)(ix2iy2))→((f x1f y1)(f x2f y2)) ((ix2iy2)(ix3iy3))→((f x2f y2)(f x3f y3)) . . .

((ixniyn)(ix1iy1))→((f xnf yn)(f x1f y1))

In summary, the prevailing discrete model of moving regions is based on units. Each unit has an associated time interval and a set of moving cycles (with optionally moving holes); these moving cycles are made up from moving segments, which describe the state at the beginning (initial instant) and the end (final instant) of this time interval. All instants in between are linearly interpolated.

(31)
(32)

Chapter 4

Interpolation of Regions to Moving Regions

A general problem related to moving objects is how to create them in the first place. For example, a straight movement with constant speed of point-like objects can be easily in- terpolated by defining a spatiotemporal start and end point; all intermediate states are then calculated by linear interpolation (see Section 3.3.3). To support changes of speed and move- ment, several of such units are defined to approximate any real object’s behavior as closely as necessary.

A moving region is one of the more complex data types in the context of moving object databases. It consists of one or more cycles of moving segments (see Section 3.3.4) and it is perfectly possible to define those explicitly to create an object of that type. However, in general, there is no obvious way to derive the movement of the individual segments from the available data. In many cases, only snapshots of regions at some points in time are available.

TheRegion Interpolation Problem addresses the issue to find a method, which enables a user to calculate moving regions from such snapshots without having to care about the details of the underlying structures and data types. The source data consists of two region objects (see Section 3.2.3) representing snapshots of a moving region in time, and the interpolation result is a mregion. For the resulting moving region to be valid, the interpolation for each instant in the time interval must yield a valid region in the sense of Section 3.2.3. This means, the moving segments must form a complete cycle at each border of the interval and must not intersect during their movement. So, if the moving segments of a moving region are interpreted astrapezoids in 3d space, none of these may intersect or overlap.

From a static point of view, a moving region can be seen as one or more 3d-objects (depending on the number of faces). Two regions R1 and R2, that are to be interpolated, form the top and bottom surface, which are both parallel to the xy plane. The trapezoids representing the moving segments cover the lateral surface, the z dimension represents the time. This is illustrated in Figure 4.1.

(33)

Figure 4.1: 3d Interpretation of a Moving Region

An interpolation step is now represented by a slice of that object parallel to the xy plane. This means, vice-versa, if two regions are to be interpolated, the task is to construct the lateral surface of such an object. Finding these 3d trapezoids, which correspond to the moving segments, is the primary goal of theRegion Interpolation Problem.

Based on themregion model (see Section 3.3.4), in [TG01] Tøssebro&G¨uting describe a way how to derive these moving segments from the start and end configurations of one moving polygon and thus deliver a first algorithm to solve the Region Interpolation Problem. At the beginning, the more simple case of convex polygons is handled, which is later improved to the interpolation of arbitrary shapes. To achieve good interpolation results, the algorithm uses heuristics to match concavities from the source and destination polygon which are to be transformed into each other.

Few years later in 2010, McKenney&Webb proved in [MW10] that the algorithm described in [TG01] isnot robust. For certain shapes of regions it yields invalid results, which manifests in the intersection of moving segments at some points of the time interval. To handle this problem they introduced an additional mechanism calledevaporation to eliminate interfering parts of the polygons prior to the main interpolation procedure. To achieve this, the matching of concavities is omitted, which resulted in a more simple and efficient algorithm, but as a drawback the interpolation quality sufferedseverely.

This chapter contributes to the solution of the Region Interpolation Problem by combining the advantages of these two approaches, overcoming the limitations which restrict both existing algorithms and providing some enhancements to further improve the quality of the resulting objects:

1. This method works with an arbitrary number of source and destination polygons with optionally one or more holes per polygon face.

2. Corresponding concavities and holes can be transformed into each other, which results inhigh interpolation quality. Still the algorithm is robust, meaning that it does not fail and no invalid moving regions are created in any case.

(34)

3. The heuristics for matching polygons, concavities or holes, which are to be transformed into each other, can be selected, parameterized or even wholly implemented in a script language by the database user without much hassle to serve the needs of specific applications.

4. The resulting moving object is guaranteed to be valid, which means, for instance, that no moving segments intersect during the interpolation.

5. The algorithm for interpolating substructures of the polygon (namely concavities and holes) was simplified and improved compared to [TG01]. This leads to interesting effects, for example, transforming concavities to holes (and vice versa).

6. In summary, the mechanisms demonstrated in this chapter lead to the implementation of a library, which enables a moving object database system to create robust high-quality interpolations between two snapshots of a region.

The remainder of this chapter is structured as follows: First, the interpolation of regions is introduced. This is followed by a discussion, how the existing methods were combined and enhanced to achieve better results. Then, face matching strategies (which couple correspond- ing structures in the source and destination region) and how they can be implemented are presented. A showcase with some examples illustrates the algorithms used. Finally, the inter- face of the interpolation library is defined and a lookout on further improvements concludes the chapter.

The results of this chapter were also published in [HG16].

4.1 Interpolation of Regions

A first example of an interpolated moving region is shown in Figure 4.2. Picture a) and e)

(a) (b) (c) (d) (e)

Figure 4.2: An interpolated moving region

are the source and destination regions while b), c) and d) are intermediate states, which were calculated by the methods developed in this chapter. The snapshots could, for instance, show an oil spill at two different points in time.

Furthermore, aside from the question how the polygons of the two regions are interpolated, the algorithm must decide, which faces (polygons) correspond to each other, if more than one is available in the source or destination region. This decision must be made with respect

(35)

Figure 4.3: Sample regions

to the context of the region data. In the following example, illustrated in Figure 4.3, two faces in the source region are to be interpolated to one face in the destination region.

Depending on the nature of the data, several different behaviors are feasible:

1. Crop fields: S1 and S2 is harvested and D1 is grown, so each region face behaves completely independent.

2. Encountering shoals of fish: FacesS1 andS2 merge to faceD1.

3. Clouds: S1 or S2transforms to D1, depending on the wind direction, while the other cloud dissolves.

All of these options are perfectly valid, so a way has to be found how the matching strategy can be tailored to specific application needs. Instead of attempting to construct a universal strategy, which can be parameterized to fit all purposes (which is hardly possible considering the number of applications), a different approach was chosen; the database user should not only be able to parameterize existing matching algorithms, but be able to implement his own matching strategies on demand, without having to care about the details of region interpolation or the database management system.

To interpolate between two convex polygons, a geometric way has been developed in [TG01]:

TheRotating Planealgorithm. The basic concept behind it is to rotate a plane around the two base areas, touching both simultaneously in one segment and a point or two segments (if these are parallel). The triangle or trapezoid cornered by the end points of the segments on the rotating plane immediately corresponds to a moving segment. After all segments of both base areas have been visited, a complete cycle of moving segments for the interpolation of these regions has been determined. Figure 4.4 illustrates the procedure. In this figure, the two red front segments are parallel and can be interpolated by one single moving segment.

On the other hand, the green and blue segments in the back need two moving segments each, since they differ in angle.

This algorithm is the foundation of the interpolation methods described in this chapter. It was presented first in [TG01]. However, in its basic form it is not capable of handling concavities.

For arbitrary polygons, first of all their convex hulls have to be determined, for example, by the Graham Scan as described in [Gra72]. After this, the convex polygons can be interpolated by the rotating plane algorithm. If concavities are present, these have to be processed later in a separate step.

(36)

Figure 4.4: Rotating Plane

4.1.1 Method McKenney&Webb

McKenney&Webb extended the Rotating Plane Algorithm by comparing the segments of the hulls with the original polygon segments during the process. If these differ, a concavity has been found. Then, for all segments which form a concavity, moving segments are created in a way, that each segment is transformed into the corresponding corner point of the peer face. This way, all concavities are effectively collapsed into (or expanded from) a single point.

This keeps the algorithm simple and the runtime complexity is low: O(n·logn)with n as the number of line segments of both faces (dominated by the calculation of the convex hull).

An implementation of this algorithm described in [MW10] is available for download1. Figure 4.5 shows the results.

Figure 4.5: Interpolation McKenney/Webb

This is a simple case of two faces, each containing one concavity. The segment −−−→

Q1Q3 is part of the convex hull of the lower face, but −−−→

Q1Q2 is the next segment. Thus, a concavity has been detected and the moving segments (−−−→

Q1Q2 → P1) and (−−−→

Q2Q3 → P1) are created, which together collapse C1 to P1. In the same way, C2 is expanded from Q3. The face on the right side shows the interpolation state at the middle of the time interval [t1;t2]. The full algorithm is presented in [MW10].

1https://bitbucket.org/marmcke/pyspatiotemporalgeom/

(37)

4.1.2 Method Tøssebro&G¨uting

As a drawback, the interpolation quality is in many cases considerably inferior compared to the original approach of Tøssebro&G¨uting, especially when large concavities are involved.

A high-quality interpolation requires the algorithm to be able to match concavities and holes and transform corresponding ones into each other. In a large class of applications, the intermediate steps better match the reality this way. If an object is deformed (e.g., in Figure 4.7 object (a) is bent to object (e)), an objective criterion for the quality of the interpolation might be to keep the difference between the polygon area in each time frame and the area of the source or destination polygon minimal, where Tøssebro&G¨uting perform obviously better. Data with different semantics might require other methods to quantify the interpolation quality.

Tøssebro&G¨uting’s strategy provides basic functionality to match and interpolate concavities of faces, which are then embedded into their parent structures. To achieve this, a tree-like structure, the Convex Hull Tree, is created for both the source and destination face. A node contains the convex hull of a polygon and from each concavity a subtree is built in the same manner. If a polygon doesn’t contain a concavity, it becomes a leaf of this tree.

In the next step, the nodes of each level of both trees are matched by a criterion, which involves the overlapping area of the polygons. If a preset threshold is exceeded, a match has been found and the procedure recurses with the subtrees of these nodes until the leaves have been reached.

Now, stepping down the tree from its root, the convex hulls of the matched nodes are fed to the rotating plane algorithm, which generates a moving face. When a leaf is reached, on each step up in the recursion tree the interpolation of the children is integrated into the moving face of the parent node by eliminating common moving segments and unifying the remaining ones. This is shown in Figure 4.6. Again, the face on the right side shows the interpolation state in the middle of the time interval.

Figure 4.6: Interpolating concavities

Unmatched concavities are collapsed (or expanded, respectively) as in McKenney&Webb’s approach. Their base algorithm thus yields similar results as a special case here, in which no concavities are matched at all.

(38)

To illustrate the difference in quality, the two methods are directly compared in Figure 4.7.

The approach proposed in this chapter achieves at least the high interpolation quality of Tøssebro&G¨uting (f-j).

(a) (b) (c) (d) (e)

(f) (g) (h) (i) (j)

Figure 4.7: Comparison McKenney&Webb (a-e) with Tøssebro&G¨uting (f-j)

4.1.3 Snailshell Configuration

McKenney&Webb proved the existence of regions for which no valid interpolation can be created by both methods. One example is a so-called snailshell configuration, as shown in Figure 4.8.

(a) (b)

Figure 4.8: Snailshell configuration

It is evident, that if at least one of these concavities C1 or C2 has to collapse into a single point during the interpolation, it will inevitably cross the other one. Tøssebro&G¨uting did not handle such a situation at all and would either fail or yield invalid results, which shows that this algorithm is not robust. McKenney&Webb’s solution for this situation is to discover

(39)

intersecting moving segments by geometric analysis and eliminate the concavities in a pre- or succeeding time interval. In the case of Figure 4.8a, C1 has to be triangulated, which means, dissected into triangles (for example, by the clipping ears algorithm as described in [FM84]) and each triangle collapses towards an interior point. This is called evaporation, Figure 4.8b shows this process. Following that, the main interpolation algorithm is performed.

The counterpart to evaporation is calledcondensation(a concavity appears) and takes place after the main interpolation, if required. To make this possible, the described tradeoffs at the expense of lower quality were necessary. See [MW10] for further details.

4.1.4 Combining the Strategies

One aspect of this work was to combine the advantages of both approaches.

Robustness The algorithm has to be robust, which means, it should never fail or yield invalid results for any pair of (valid) input regions. This is achieved by adopting the intersection counter measures of McKenney&Webb’s strategy.

High Quality The algorithm must deliver high-quality interpolation results. This means, the resulting moving region must not only be formally valid, but also has to be sensible in the context of the data. It is therefore necessary to interpolate substructures of faces (namely:

concavities and holes) as in Tøssebro&G¨uting’s approach.

Since each concavity in turn may contain concavities itself, a recursive element must be present in the strategy. The Convex Hull Tree, for example, is a recursive data structure which is traversed several times in order to build it, compute the overlap graph and generate the interpolation data.

4.2 Recursive Approach

Compared to the existing methods, another elegant way is to integrate these tasks into one uniform recursion step which is then performed for each set of concavities contained in the faces to be interpolated. The general idea is to have a uniform step which interpolates two sets of faces that are coupled by a flexible matching algorithm. If such a pairing contains concavities, these form two new sets of faces, which are recursively fed back to the algorithm.

The returned results are integrated into the enclosing structure of the caller.

(40)

Algorithm 1 Interpolate

Input: Two sets of faces to be interpolated Output: A set of moving faces

1: functionInterpolate(src: set(Face), dst: set(Face))

2: pairs ← MatchFaces(src, dst)

3: mfaces← ∅

4: for all (sface, dface)∈ pairsdo

5: if sface6=nil ∧ dface6=nil then

6: (parent, scvs, dcvs)← RotatingPlane(sface, dface)

7: children ← Interpolate(scvs, dcvs) . Recursion

8: HandleIntersections(parent, children)

9: mface ← MergeMFaces(parent, children)

10: mfaces:= mfaces∪ mface

11: else

12: if sface6=nil then

13: mfaces:= mfaces∪Collapse(sface)

14: else

15: mfaces:= mfaces∪Expand(dface)

16: end if

17: end if

18: end for

19: returnmfaces

20: end function

4.2.1 Recursion-Based Algorithm

The coarse schema of that procedure is described in Algorithm 1.

MatchFaces: set(face) × set(face) → set(face ×face) in line 2 couples the faces of the source and destination region, the result is a set of pairs of faces (exactly one face of each pair may be empty (nil) if no partner could be assigned).

RotatingPlane: face ×face → movingface × set(face) × set(face) in line 6 is called for all real pairs (which means, neither side of the tuple is nil; this is checked in the previous line 5) and returns the interpolation of the convex hulls (parent) and additionally two sets of faces, the concavities and holes of the source (scvs) and destination face (dcvs).

These two sets of concavities are then recursively processed by

Interpolate : set(face) × set(face) → set(movingface) in line 7. Thus, the problem of interpolating substructures is reduced to the interpolation of two face sets, which is exactly the situation at the beginning of the whole procedure. The recursion stops when only convex polygons are present.

The resulting moving faces are examined for intersections by the procedure

HandleIntersections: movingface×set(movingface) in line 8, which also sanitizes the set of children by eliminating all moving faces with intersecting segments if required.

Referenzen

ÄHNLICHE DOKUMENTE

In this paper we determine the number of eigenvalues of a rational eigenvalue problem governing free vibrations of a plate with elastically attached masses or the mechanical

An alternative idea is to extend the strategy used in spatial databases to offer abstract data types with suitable operations: In this case we offer spatio-temporal data types such

In Table 7 it is shown how these operations apply to the new data types moving(gpoint) and moving(gline). The semantics of these operations is defined in [GBE+00] 5. We briefly

The MON-Tree showed good scalability when increasing the number of objects and time units in the index structure, and the query window and time interval in querying.. In our tests,

We propose a new line of research where moving points and moving regions are viewed as three-dimensional (2D space + time) or higher-dimensional entities whose structure and behavior

Abstract Type Discrete Type moving ( int ) mapping ( const ( int )) moving ( string ) mapping ( const ( string )) moving ( bool ) mapping ( const ( bool )) moving ( real ) mapping

The properties of the GS-points allow to represent Minkowski sum, De- myanov difference and Demyanov distance between sets in terms of their GS-points, as well as the Aumann integral

They used the potential fluid theory by giving the Green function of point source in two layers of finite deep fluid upper layer and discussed the influence of surface waves