Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Architecture of a Flexible Querier for Spatio- Temporal Databases Karine Reis Ferreira Lúbia Vinhas Gilberto Ribeiro de Queiroz Ricardo Cartaxo Modesto.

Similar presentations


Presentation on theme: "The Architecture of a Flexible Querier for Spatio- Temporal Databases Karine Reis Ferreira Lúbia Vinhas Gilberto Ribeiro de Queiroz Ricardo Cartaxo Modesto."— Presentation transcript:

1 The Architecture of a Flexible Querier for Spatio- Temporal Databases Karine Reis Ferreira Lúbia Vinhas Gilberto Ribeiro de Queiroz Ricardo Cartaxo Modesto de Souza Gilberto Câmara GeoInformation Group Image Processing Division – DPI

2 Introduction Challenge to GISystems: use spatially enabled DBMS to build innovative applications which deal with spatio- temporal data How to address it: ST Types and their associated Algebra (Gutting, 2005) Conceptual models, E-R models for ST-Data (Pelekis et al, 2004) ST Query Languages (ISO, 2001) ST Predicates (Egenhofer and Franzosa, 1991; Allen,1983) Which is the canonical set of ST Predicates? Application specialized subset Building blocks that can be combined (Erwig and Schneider, 2002)

3 Introduction How to design a flexible query processor for spatio- temporal data using object-relational DBMS? Some aspect to be considered: Applications are different: in terms of queries and responses An unified and flexible architecture is desired

4 Layers A geographical database is composed by layers Layers contain Spatio-Temporal Objects (ST-Objects) Static Layers: ST-Objects do not change along the time, neither in their descriptive or geometrical attributes Temporal Layers ST-Objects change along the time, either in their descriptive or geometrical attributes ST-Instance represent version in a given time of a ST-Object

5 Database Model Ex: a layer of districts of a city DistrictsG geomId: int objId: string spatialD: spatial 1D1bbbbbbbbbbbbb 2D2bbbbbbbbbbbbb 3D3bbbbbbbbbbbbb DistrictsA CODDIS: string NOME: string POP: int D1Agua Rasa85896 D2Cangaiba D3Capão Redondo layers layerId: int layerName: string 1Distritos representations layerId: int geomRelatio: string 1DistrictsG attributesRel layerId: int attrRelation: string 1DistrictsA Data Metdata

6 Database Model DistrictsG geomId: int objId: string spatialD: spatial 1D1bbbbbbbbbbbbb 2D2bbbbbbbbbbbbb 3D3bbbbbbbbbbbbb DistrictsStatus attrInst string geomInst: string timeI: time timeF: time 1101/01/ Initial State DistrictsA CODDIS: string NOME: string POP: int attrInst string D1Agua Rasa D2Cangaiba D3Capão Redondo

7 Database Model DistrictsG geomId: int objId: string spatialD: spatial 1D1bbbbbbbbbbbbb 2D2bbbbbbbbbbbbb 3D3bbbbbbbbbbbbb 4D1bbbbbbbb DistrictsStatus attrInst string geomInst: string timeI: time timeF: time 1101/01/200331/12/ /01/ /12/2003 DistrictsA CODDIS: string NOME: string POP: int attrInst string D1Agua Rasa D2Cangaiba D3Capão Redondo Change in Geometry

8 Database Model DistrictsG geomId: int objId: string spatialD: spatial 1D1bbbbbbbbbbbbb 2D2bbbbbbbbbbbbb 3D3bbbbbbbbbbbbb 4D1bbbbbbbb DistrictsStatus attrInst string geomInst: string timeI: time timeF: time 1101/01/200331/12/ /01/ /06/ /01/ /12/ /06/2004 DistrictsA CODDIS: string NOME: string POP: int attrInst string D1Agua Rasa D2Cangaiba D3Capão Redondo D2Cangaiba Change in Attributes

9 Database Model DistrictsG geomId: int objId: string spatialD: spatial 1D1bbbbbbbbbbbbb 2D2bbbbbbbbbbbbb 3D3bbbbbbbbbbbbb 4D1bbbbbbbb 5D3bbbb DistrictsStatus attrInst string geomInst: string timeI: time timeF: time 1101/01/200331/12/ /01/ /06/ /01/ /09/ /12/ /06/ /09/2004 DistrictsA CODDIS: string NOME: string POP: int attrInst string D1Agua Rasa D2Cangaiba D3Capão Redondo D2Cangaiba D3Capão Redondo Change in Attributes and Geometry

10 ST Data - Examples Crime events: crime occurrences in a city, specifying its time and location Which crimes happened on Friday in the Humaitá district of Porto Alegre city?

11 ST Data - Examples Epidemiological data: the weekly counting of mosquito eggs in a set of traps arbitrarily deployed over a city How many eggs were counted by trap in each month?

12 ST Data - Examples Land parcels For each month, which changes occurred in the parcels?

13 The Querier Processor Architecture Application Program Interface Parameters SQL ST Data ST Instances Processing Querier Application Spatio-temporal Database PostGISMySQLOracle …

14 Querier Parameters Layer: the source of the ST-Instances Chronon: defines how the time extension of the layer should be divided into a set of time frames second, minute, hour, day, month, year, day of week, day of month, day of year, month of year, week of year, hour of day, minute of hour or second of minute

15 Querier Parameters Aggregate functions: how to group a set of ST-Instances of a time frame in a representative one average, sum, counting, variance maximum or minimum, Which time frames will be retrieved: controls if the Querier should returns either every time frame existent in the total interval of the data or only the time frames where some change occurred

16 Querier Parameters Temporal predicate: defines a relation between the data and the time frames (as specified by the Chronon) temporal interval predicates: equals, before, after, meets, during, overlaps, ends or starts [Allen,1983] Spatial predicate: defines a relation between the data and a geometry disjoint, touches, crosses, within, overlaps, contains, intersects, equals, covers and covered by [Egenhofer and Franzosa, 1991]

17 Querier Examples Return all crime events, their location and properties CrimeLayer = database->getLayer (Crimes); Source of the ST Data

18 Querier Examples Return all crime events, their location and properties CrimeLayer = database->getLayer (Crimes); Querier->setParams(loadGeometries, loadAllAttributes); Querier->setParams(CrimeLayer); Set parameters

19 Querier Examples Return all crime events, their location and properties CrimeLayer = database->getLayer (Crimes); Querier->setParams(loadGeometries, loadAllAttributes); Querier->setParams(CrimeLayer); Querier->loadInstances(); Run the query processor

20 Querier Examples Return all crime events, their location and properties CrimeLayer = database->getLayer (Crimes); Querier->setParams(loadGeometries, loadAllAttributes); Querier->setParams(CrimeLayer); Querier->loadInstances(); while (Querier->fetchInstance(sti)) { Geometry = sti.getGeometry(); Properties = sti.getProperties(); Time = sti.getTime(); } Consume the instances

21 Querier Examples Which crimes happened in 2003 in the district Cabanga of Recife city? DistrictLayer = database->getLayer (Districts); DistrictGeometry = DistrictLayer->getGeometry(Cabanga);

22 Querier Examples Which crimes happened in 2003 in the district Cabanga of Recife city? DistrictLayer = database->getLayer (Districts); DistrictGeometry = DistrictLayer->getGeometry(Cabanga); Querier->setParams(loadGeometries, loadAllAttributes); Querier->setParams(CrimeLayer, year, ChangedTimeFrames); Querier->setSpatialRestriction(DistrictGeometry,within);

23 Querier Examples Which crimes happened in 2003 in the district Cabanga of Recife city? DistrictLayer = database->getLayer (Districts); DistrictGeometry = DistrictLayer->getGeometry(Cabanga); Querier->setParams(loadGeometries, loadAllAttributes); Querier->setParams(CrimeLayer, year, ChangedTimeFrames); Querier->setSpatialRestriction(DistrictGeometry,within); TimeFrame = Querier->getTimeFrame(2003); Querier->loadInstances(TimeFrame); while (Querier->fetchInstance(sti)) {... }

24 Querier Examples How many eggs were counted in each trap in each month? TrapLayer = database->getLayer (Traps);

25 Querier Examples How many eggs were counted in each trap in each month? TrapLayer = database->getLayer (Traps); GroupingAttributes->insert(num_eggs, SUM); Querier->setParams(loadGeometries, GroupingAttributes); Querier->setParams(TrapLayer, month, ChangedTimeFrames);

26 Querier Examples How many eggs were counted in each trap in each month? TrapLayer = database->getLayer (Traps); GroupingAttributes->insert (num_eggs, SUM); Querier->setParams(loadGeometries, GroupingAttributes); Querier->setParams(TrapLayer, month, ChangedTimeFrames); numTimeFrames = Querier->getNumTimeFrames(); for (frame=0 to numTimeFrames) Querier->loadInstances(frame); while (Querier->fetchInstance(sti))...

27 Querier Examples Which changes occurred in the land parcels in each month? ParcelLayer = database->getLayer (Parcels);

28 Querier Examples Which changes occurred in the land parcels in each month? ParcelLayer = database->getLayer (Parcels); Querier->setParams(loadGeometries, loadAllAttributes); Querier->setParams(ParcelLayer, month,ChangedTimeFrames, Starts | Ends);

29 Querier Examples Which changes occurred in the land parcels in each month? ParcelLayer = database->getLayer (Parcels); Querier->setParams(loadGeometries, loadAllAttributes); Querier->setParams( ParcelLayer, month,ChangedTimeFrames, Starts | Ends); numTimeFrames = Querier->getNumTimeFrames(); for (frame=0 to numTimeFrames) Querier->loadInstances(frame); while (Querier->fetchInstance(sti))...

30 The Database Change Observer The Querier mechanism is being implemented in the TerraLib environment TerraLib spatial and temporal structures TerraLib Generic Database Application Interface Support to: MySQL, Oracle Spatial, PostGIS, PostgreSQL… The application shows the status of a spatio-temporal database

31 ST Database Observer

32 Observing the crime events

33 Observing the crime events

34 Observing the egg traps

35

36

37

38 Observing the land parcels

39

40

41

42

43 Final Remarks The proposed architecture of a geographical database fulfills the demands of our spatio-temporal applications The spatio-temporal database model is simple and can be implemented in different DBMS A Querier Mechanism based on the combination of spatial and temporal parameters is a flexible alternative to deal with the different applications

44 Future Improvements The Querier mechanism has to deal with two layers: Ex: fire spots and deforestation: two different data set that is highly related in space and in time Build a catalog of some well-known operations such as trajectory using the Querier mechanism Study the possibility of using the Querier mechanism as a processor for a ST-Language

45 The Architecture of a Flexible Querier for Spatio- Temporal Databases {karine, lubia, gribeiro, cartaxo, GeoInformation Group Image Processing Division


Download ppt "The Architecture of a Flexible Querier for Spatio- Temporal Databases Karine Reis Ferreira Lúbia Vinhas Gilberto Ribeiro de Queiroz Ricardo Cartaxo Modesto."

Similar presentations


Ads by Google