SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

42
SPATIO-TEMPORAL DATABASES Spatio-temporal Databases
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    236
  • download

    1

Transcript of SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Page 1: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

SPATIO-TEMPORAL DATABASES

Spatio-temporal Databases

Page 2: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Spatio-temporal Data. Modeling Spatio-temporal Objects

80’s and 90’s – research for spatial and temporal databases.

90’s – space and time objects are put together in one single data model => spatio-temporal data models.

First attempts: adding time attributes in a spatial data model or adding spatial objects in a temporal data model. Then – ST data models that treat space and time equally, as similar dimensions / domains (unified ST view).

Page 3: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Spatio-temporal Semantics

Spatio-temporal attribute: an attribute that contains the evolution of a spatial object in time (spatial attribute + time attribute)

Spatio-temporal object: an object that contains a ST attribute

Spatio-temporal evolution: the spatial evolution of an object, in time.

For example: land parcels are evaluated when a working day is finished – this kind of evolution is a discrete point-based; the shape of a land parcel is modifying in time, but only in discrete steps; a car that is moving on a road has a continuous evolution of its spatial position.

Page 4: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Spatial attributes and changes of ST objects’ spatial attributes

Spatial properties represent characteristics: metric (position and size), directional (orientation or direction), or topological (shape).

These properties may suffer changes during following actions: translation: changing of position (in case of objects of type

point, line, or region), rotation: changing of direction (in case of objects of type

line or region), expansion or contraction: changing of direction size (in

case of objects of type line or region), mutation: changing of shape (in case of objects region).

Page 5: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Spatial attributes and changes of ST objects’ spatial attributes Remark. Other types of transformations (as mutations)

are aggregation (reunion or join) and fragmentation (division or detachment). These operations are affecting more than one object; usually – some objects are destroyed or created during these actions.

Figure 1.7. represents a spatial object (rectangle) in its initial state (a), its state after performing a 90˚ rotation (in trigonometric direction) (b), and its state after performing a mutation (other shape, but with the same area) (c).

Usually – for a spatial object we represent only its coordinates (the coordinates if it is a point, the coordinates of its end-points if it is a line segment, or the coordinates of the polygon’s vertexes if it is a region). The other properties can be evaluated using the coordinates.

Page 6: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Figure 1.7. (a), (b), (c)

Page 7: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Spatio-temporal applications

1. events in space and time: point spatial objects with discrete point-based evolution in time (e.g. world records);

2. objects (positions) valid on a time interval: point spatial objects X time intervals (e.g. trailers);

3. mobile objects: objects for which the shape is not important, are represented as point, and their position has a continuous evolution in time (e.g. transportation systems);

4. regions with instantaneous existence: the spatial properties include position and shape, and they have a discrete point-based evolution in time (e.g. region where Olympic Games take place in one year);

5. regions that are valid for a time interval: spatial objects with shape X time intervals (e.g. land parcels);

6. mobile regions: the shape of spatial objects is continuously changing in time (e.g. meteorological phenomenon).

Page 8: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

The Properties of Spatio-temporal Objects

Practically, the properties of a single ST object may include: non-spatial, non-temporal (thematic); without spatial or

temporal meaning; spatial (geometric); usually – objects with complex

structure; temporal (non-spatial); thematic time-varying attributes

+ time attribute; spatio-temporal; spatial attribute + time attribute.

Page 9: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Spatio-temporal Databases

Definition. Spatio-temporal databases (STDB) manage spatial objects and their evolution in time. A ST DBMS should include ST data types, ST query language, ST indexes etc.

Example. Let’s consider a relation that contains information about land parcels Land, having one spatial attribute (the rectangular shape of the parcel) and a time attribute that represents the VT interval for that spatial. The pair of attributes (shape, time) is a ST attribute, and Land objects are ST objects. Table 1.12. contains example of Land objects.

Page 10: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Table 1.12.

Id_land Shape Time

P1 ((50, 75), (110, 160)) [01/01/1999, 01/07/1999)

P1 ((50, 75), (95, 160)) [01/07/1999, 31/12/2002)

P2 ((110, 150), (300, 160)) [20/01/2001, 01/03/2003)

P1 ((40, 75), (95, 170)) [31/12/2002, Now)

P2 ((110, 150), (310, 165)) [01/03/2003, 01/09/2006)

P2 ((125, 150), (310, 165)) [01/09/2006, Now)

Page 11: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Identifying Spatio-temporal Objects

Some ST data models consider that an object preserves its id after its spatial state is changing, but other models consider that such an object changes its id for every change. Exception – in case of aggregation or fragmentation actions: Aggregation

reunion: the affected objects are destroyed and we obtain a new object

join: the objects that are attached to another object are destroyed, and the object to which we attached some objects preserves its id

Fragmentation division: one object is destroyed and new objects are obtained after

division detachment: we are detaching some parts from one object; this object

preserves its id, and we also obtain some new objects.

See Figure 1.9.

Page 12: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Figure 1.9. (a) Initial configuration of three objects; (b) Spatial configuration after the reunion of P1 and P3, or after attachment of P3 to P1; (c) Spatial configuration after the division of P2 in P5 and P6, or after detaching P6 from P2

Page 13: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Modeling Spatio-temporal Data: Spatio-temporal Data Models Snapshot data model [LC88]

It is one of the simplest ST data models. It starts from a spatial data model (with any structure of space) and adds a time attribute.

This model applies a timestamping at the level of a set of objects. The objects are represented as spatial layers, and each layer is timestamped. The spatial objects that can be represented are points, lines, regions, or partitions or networks. All the states that belong to one object are marked with the same id (id preservation in time).

If at least one spatial object is changed (position and / or shape), one spatial object is created, or one spatial object disappears, a new layer is stored (of course – with a new timestamp).

Page 14: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

There is no direct relation between two successive layers. There is no information about the events that caused the

changing in represented layers. The time is VT, and it is linear, discrete, absolute,

represented as time instances (discrete point-based evolutions).

Figure 1.10. represents a succession of spatial layers. Advantages. This model can be easily implemented. The

current state of all objects is available in any moment. Disadvantages. If one object is changing more frequently

than the others, than all the generated layers contain the same information about those objects. The list of layers does not contain explicit information about the changes – in order to see the changing suffered by an object, we have to compare the successive layers.

Page 15: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Figure 1.10. Layers for Snapshot data model

Page 16: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Improvement for Snapshot model [Ar92]: in order to see easier the changes suffered by objects and to reduce the amount of redundant data, the usage of so-called delta-files is proposed.

Only the initial and the current layers are stored. All the changes that took place are stored in delta-files.

Therefore, if we want to see the evolution of one spatial object or its state in a specific moment, we read the delta-files beginning with the first layer, until we reach the moment in which we want to know the object’s state.

Page 17: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Another ST data model that tries to add Time in GIS [La92] proposes to apply timestamps at attribute level (it is a model spatial-oriented). In this model, space is partitioned and for each partition the evolution of some attribute is stored.

Figure 1.11.(a) represents a partition of space. Each of these regions can be in one of two states: flooded (1) and not-flooded (0). For each region we have its spatial characteristic (shape) and the evolution of its state in time. Each timestamp (when something changed for at least one region) is a new attribute in this ST table.

The spatial objects are represented in a vectorial manner, and the temporal domain is linear, discrete, and both time types (VT and TT) are supported.

Page 18: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Figure 1.11.

Page 19: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

The model presented in [HW90] (Historical Cadastral Database) associates timestamps to spatial objects. One timestamp is represented as a time interval [tc, td], where tc and td represent the moments when the objects was created / destroyed, and are VT time instances. The temporal domain is linear, discrete, and absolute.

The objects that exist in reality have td = Now. Spatial objects – are modeled using vectorial

representation, and they can be points, lines, or regions. This model is able to represent their interval-based discrete evolution.

This model has the advantage that does not store redundant data (as Snapshot model).

One object is loosing its id after one change. A solution [RM94] for this “problem” is to store references between the successive states of the same object.

Page 20: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

ST-simplexes

This is another ST data model that uses timestamping at object level [Wo94]. Actually, this data model is the extension of the spatial data model of simplicial complexes. In this case, spatial objects are represented as simplicial complexes, and each k-simplex is timestamped with two time intervals (VT and TT). Therefore, the basic objects are ST-simplexes (one 2D spatial object and two time intervals).

In this model, the space is vectorial, and there are two linear, discrete temporal dimensions.

The model of ST-simplexes is one of the data models that are able to treat time as another spatial dimension (a ST-simplex can be seen as a 4D object).

An object-oriented model was proposed for the implementation of ST-simplexes.

Page 21: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

ESTDM [PD95] – event-based ST data model.

The most important query that is wanted to be solved is about the events that caused the changes in objects’ states.

This model does not store snapshots of reality or independent evolutions of spatial objects, but explicitly stores information about events and the changes they have caused.

The space is represented as grid; actually – this model is able to store the temporal evolution for one or more thematic layers. For each thematic layer, this model proposes the following structures: base map: the initial state of the thematic layer; double-chained list of events: each event is timestamped with a time

instance (VT); also, each event contains references to the changes that were caused by it (a list of elements that contain the cell of the grid and the change in it); this list represents the spatial dynamics of the thematic map;

header: contains thematic information, references to the base map and references to the first and the last event from the list of events.

Page 22: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

This model does not represent redundant data. It is easy to execute event-oriented queries, but it is more difficult to

solve object-oriented queries (for example: the state of a thematic map at a certain moment – for each cell of the map, its current state must be determined – by visiting each list of components for the events that happened before that moment).

Another event-based ST data model is proposed in [CJ98]. It was designed for the management of land parcels and buildings within a city (cadastral application). Besides the spatial objects and their changes, also decisional information is stored (decisions regarding creating / destroying a building, changing the shape of a land parcel etc.). There are established relations between states, states and events, and events.

Page 23: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

The Three-Domain Model [Yu99] considers that the data we are working with belongs to one of the following three domains: semantic, temporal, and spatial. Then, relationships between these domains are established (see Figure 1.14.). In this way, it is allowed to treat in an independent manner the objects of each domain.

Figure 1.14.

Page 24: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

The relational model contains four tables: one relation for each domain and one relation that represents the ST data (ST table; the relationship between the three domains).

The spatial model represents a partition of the working space. The regions that are components of the current partition are stored in the spatial table. In order to see the evolution of each region in time, an oriented graph is also stored.

The time table (table with time elements) contains elements of type instance of time (they can also been time intervals, if needed). The thematic table contains all the possible values for a thematic attribute.

The ST table then contains, for each time element (stored in time table) the regions that have a specific thematic value for the thematic attribute (thematic value, time instance, list of regions).

Page 25: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

One model for moving objects is MOST [SW+97, WX+98, WS+99].

This model was proposed initially for spatial objects of type point, with continuous evolution in time.

This model introduces the idea of “dynamic attribute”, as an attribute whose values are changing without an explicit update. This is possible by representing this kind of attribute as a tuple AD = (AD.vi, AD.ti, AD.fi), where: AD.vi is the attribute’s value at time AD.ti, and AD.fi is a function of time, defined on [0, AD.ti+1 – AD.ti) (the times ti, ti+1 represent the time moments where a new value is stored). Therefore, the value of AD at time t (between ti and ti+1) is given by AD.vi + AD.fi(dt), where dt = t – AD.ti. Usually, the functions AD.fi are linear functions of time.

Therefore, the MOST model is able to represent continuous evolutions of point objects.

Page 26: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Another model for mobile objects (but – in this case – objects of any type) is given in [EG+98, GB+00, FG+00].

This model starts with a set of data types: simple data types (numeric, string, Boolean etc.) and complex spatial data types. The spatial objects can be: point, line segments (represented by two points), line (represented by a list of line segments), region (represented as polygons = closed chain of segments), region with holes and others.

A static data type is enriched with a temporal dimension, obtaining so-called mobile types: mreal, mpoint, mregion and so on. Actually, each mobile type mType is a function of time mType : iTime Type, where iTime is a time interval.

Page 27: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

One value of a mobile type is represented using the so-called sliced-representation: the temporal evolution of an object is decomposed in units, and each unit is represented by a pair (v, iT), where iT is a time interval, and v is the “value” of that object over that time interval (v can be a function of time). In this manner, this model is able to represent continuous evolution for objects of thematic data types and spatial data types. See Figure 1.15.

Some operations that were initially defined for static data, were lifted in order to operate on “mobile” data. For example: in order to calculate the distance between two mobile objects, a “lifted” distance operator was implemented, and the result of this operator is mreal.

Page 28: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Figure 1.15. Sliced representation of a mreal object

Page 29: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

The spatial data model k-Spaghetti was also extended in order to represent continuous evolutions of spatial objects (Parameterized k-Spaghetti [CL+99]). There are two main differences between k-Spaghetti and Parameterized k-Spaghetti data models: the coordinates of the represented triangles can be constants or

linear functions of time; two more attributes are added: two time attributes that represent

the time interval on which the coordinates are valid (or on which the function of time is defined).

This model works with parameterized polygons (triangles). Therefore, we can say that the timestamping is performed at object level.

Page 30: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Also, the spatial data model with linear constraints is extended in a straightforward manner, in order to represent ST objects [GR+98b].The corresponding data model stores linear constraints that, besides the spatial variables, contain (at least) one variable that represents time.

An example can be seen in Table 1.13.

Table 1.13. ST-objects represented using linear constraints

Geometric object Linear constraints

O1 x = 2 y = 5 t = 150

O2 3x - y = 2 -x -1 x 2 -t -100 t 200

O2 -x + y + 2t -5 x 7 -y -2 -t -250

Page 31: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

3SST data model [Sa07b] is proposed as a core ST data model (which can be easily extended, if needed, for a specific application).

This model (as 3-Domain model, but more than that) considers four independent domains: thematic, spatial, time, and events. A relationship is allowed between any two domains. Therefore, the following types of objects can be represented using 3SST: thematic static objects; spatial static objects; thematic temporal objects (without any spatial property); spatio-temporal objects; plus – events – which have associated a position (where they

happened) and a time instance (when they happened); anyway, these objects are not temporal objects, even if they have associated a timestamp.

Page 32: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

The space (the spatial objects) is represented vector-based.

Each spatial object is represented as a set of points. A point is represented by a point. A line segment is represented by a pair of points (the order

matters!). A line is represented by a list of oriented segments). A polygon (convex or concave) is represented by a closed list of

oriented segments. Each point can be represented by a constant or by a linear

function of time. See Figure 1.16.

Page 33: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Remark. The vertexes of a polygon are stored in a list in trigonometric order (see next remark).

Remark. Let’s consider the triangle given by V0 = (x0, y0), V1 = (x1, y1), and V2 = (x2, y2), in trigonometric order. The area of the triangle V0V1V2 is given by:

The relational structures for 3SST data model is given in Figure 1.27.

0201

0201

2

1)( 210 yyyy

xxxxVVVA

Page 34: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Figure 1.16. S – line segment, SO – oriented line segment, L – line, LS – simple line, Pg - polygon

Page 35: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Figure 1.27. 3SST relational model

Page 36: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Spatial, Temporal, Spatio-temporal Operations

Operations with numerical result: Simple:

Spatial (e.g. the distance between two points, the margin of a polygon, the area of a triangle);

Temporal (e.g. the length of a time interval); Aggregation:

Spatial (e.g. the area of the surface covered by a set of spatial objects);

Temporal (e.g. the average length for a set of time intervals);

Operations with thematic result (e.g. value of a temporal attribute at a moment in time);

Page 37: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Spatial, Temporal, Spatio-temporal Operations

Operations with Boolean result (predicates): Topological:

Spatial (e.g. the equality of two geometric objects, the intersection of two polygons (to see if they intersect), the inclusion of a polygon into another);

Temporal (e.g. the adjacency of two time intervals); Metric:

Spatial (e.g. checking if a point is situated in the neighborhood of another object);

Temporal (e.g. similar); Directional:

Spatial (e.g. an object is north of another object);

Page 38: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Spatial, Temporal, Spatio-temporal Operations Operations with result of type spatial or time:

Selection of components Spatial (e.g. the geometric components of a static spatial object); Temporal (e.g. the initial time instance of a time interval, the middle

instance of a time interval); Simple, of construction:

Spatial (e.g. the intersection, the reunion, the difference of two polygons, the convex hull, the Voronoi diagram);

Temporal (e.g. the intersection, the reunion, the difference of two time intervals);

Simple, of transformation: Spatial (translating, rotation, scaling);

Aggregation: Spatial (e.g. the intersection of a set of polygons); Temporal (e.g. the last time interval that belongs to an object’s

evolution);

Page 39: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Spatial, Temporal, Spatio-temporal Operations

Usually, a ST operation is a combination of a spatial and a temporal operation. For example: Operations with numeric result: the speed of a mobile object

in a moment in time; the distance covered by a mobile object;

Predicates: the intersection of two regions during a specific time interval

Operations with ST result: the trajectory of a mobile object

Another category of operations: for a set of correlated

objects (partitions and networks). For example: windowing, clipping, fusion, cover, etc.

Page 40: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Spatial and Temporal Topological Relationships One of the most well-known models is the 4-intersection

model [EH90]. In this model, the only spatial objects considered are regions (simple, without holes), in a 2D space. Each region is considered to have interior and border. In Table 1.15. are specified all possible combinations of intersections. From 16 combinations, only 8 of them are possible.

Topological relationships are similar to the spatial ones. Maybe the most important study regarding this subject is found in [Al83], where 13 topological relationships between time. From these, 7 can be considered as basic relationships (precedes / precededBy, meets / metBy, overlaps / overlappedBy, finishes / finishedBy, contains / during, starts / startedBy). See Figure 1.29.

Page 41: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Table 1.15.

∂A – border of A;

A˚ – interior of A

∂A ∂B ∂A B˚ A˚ ∂B A˚ B˚ R

A disjoint B

A in B

A in B

(*)

A touch B

A equal B

A cover B

B cover A

A overlap B

Page 42: SPATIO-TEMPORAL DATABASES Spatio-temporal Databases.

Figure 1.29. Temporal topological relationships