Temporal extension for GRASS GIS 7: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Adding the time dimension to GRASS GIS raster, vector and voxel data types for FIELD based applications using a time stamp approach =
'''Looking for the time series tutorial? See [[Temporal data processing]]'''
 
{{MovedToTrac|Grass7/TemporalExtension}}
 
<!--
= Adding the time dimension to GRASS GIS raster, vector and voxel data types for field based applications using a time stamp approach =


== Time stamps in SQL tables ==
== Time stamps in SQL tables ==
Line 9: Line 14:
** absolute:  
** absolute:  
*** start date
*** start date
***end date
*** end date
** relative
** relative
*** duration
*** a relative time stamp
*** a relative time stamp


Line 25: Line 29:
** The '''creation date''' is of type datetime
** The '''creation date''' is of type datetime
** The '''modification date''' is of type datetime
** The '''modification date''' is of type datetime


* The '''absolute time table''' to store the absolute time stamps for each map. The layout is equal for raster, raster3d and vector maps. This table stores:
* The '''absolute time table''' to store the absolute time stamps for each map. The layout is equal for raster, raster3d and vector maps. This table stores:
Line 38: Line 43:
A map can only have an absolute or relative time stamp.  
A map can only have an absolute or relative time stamp.  


* The '''metadata table''' is specific for each grass data type. It stores the spatial and temporal extent as well as map specific attributes (creator, range, cell type, features, ...)
* The '''metadata table''' is specific for each grass data type. It stores the spatial and temporal extent as well as map specific attributes (creator, range, cell type, features, registered spacetime datasets, ...)


In long term these kind of SQL tables may replace the text file based storage of map metadata, database links and time stamps.
In long term these kind of SQL tables may replace the text file based storage of map metadata, database links and time stamps.
Line 44: Line 49:
== New temporal GRASS datatypes ==
== New temporal GRASS datatypes ==


Adding new temporal data types to grass: time and thematic spatio-temporal datasets
To manage temporal raster, raster3d and vector objects, three new datatypes will be added to GRASS GIS: Spacetime raster, vector and voxel datasets. Additionally thematic spatio-temporal datasets will be added to handle thematic related spacetime datasets of different type.
Spacetime raster, vector and voxel datasets are handled as new data types.  
 
Maps can be registered and unregistered in spacetime datasets. Maps are registered by id (name). All relevant spatio-temporal data is availabe in SQL tables. Cross referencing must be implemented (raster maps storing the spacetime raster datasets in which they are registered)
Maps can be registered and unregistered in spacetime datasets. Maps are registered by id (name). All available spatio-temporal data is availabe in SQL tables. Cross referencing must be implemented (maps storing the spacetime datasets in which they are registered and vis versa)
Spacetime datasets have absolute or relative time type, these types cant be mixed up but converted
Spacetime datasets have absolute or relative time type, these types cant be mixed up but converted.
Specific metadata for raster spacetime maps
 
The spatial extent computed or updated via trigger from all registered raster maps
A temporal resolution can be set for each spacetime dataset (1s - decades) defining the granularity of the datasets (like the resolution settings for raster/voxel maps).
The temporal extent computed or updated via trigger from all registered raster maps
 
The raster datatype (CELL, FCELL, DCELL, MIXED)
The new spacetime datasets are handled like raster or vector maps. They are registered in mapset specific tables with creation and modification date and absolute/relative time stamp.
Temporal resolution (1s - decades) defining the granularity of the datasets (like the resolution settings for raster/voxel maps)
 
Thematic spacetime datasets will include several spacetime datasets to handle them thematically
=== Raster spacetime datasets ===
 
The raster spacetime datasets store raster map specific attributes and metadata:
* The spatial extent (e, w, n, s)
* The temporal extent (start and end time or duration)
* The data range (min and max)
* The raster datatype (CELL, FCELL, DCELL, MIXED)
 
All these table entries are computed or updated via trigger from all registered raster maps when maps are added or removed.
 
Table layout:
 
The base spacetime tables are equal to the raster/vector and raster3d one.
 
* '''Spacetime metadata raster table'''
** '''id''' the name of the spacetime raster table
** '''temporal type''' relative or absolute
** '''Raster register table name''' the name of the table storing the ids (names) of all registered raster maps
** '''spatial extent''' (4 columns: e, w, s,n) of all registered raster maps
** '''temporal exten'''t of all registered raster maps
** '''data range''' of all registered raster maps
** ...
 
=== Raster3d spacetime datasets ===
 
The raster3d spacetime tables are equal to the raster spacetime tablse, except that the spatial extent is computed based on east, west, south, north, top and bottom.


=== Vector spacetime datasets ===


The new datatypes are handled like the existing -> registered im mapset specific tables with creation and modification date and absolute/relative time stamp.


Tools:
== New temporal modules ==
Spacetime modules for registration and un-registration and extraction of raster, voxel and vector maps
tr.register, tr.unregister, tr.extract
t3.register, t3.unregister, t3.extract
tv.register, tv.unregister, tv.extract


New temporal modules must be implemented for registration and un-registration and extraction of raster, voxel and vector maps in spacetime datasets:
* {{cmd|tr.register|version=70}}, {{cmd|tr.unregister|version=70}}, {{cmd|tr.extract|version=70}}
* {{cmd|t3.register|version=70}}, {{cmd|t3.unregister|version=70}}, {{cmd|t3.extract|version=70}}
* {{cmd|tv.register|version=70}}, {{cmd|tv.unregister|version=70}}, {{cmd|tv.extract|version=70}}
* Spacetime modules for resampling, interpolation, time stamp snapping and extraction must be implemented.


Spacetime modules for resampling, interpolation, time stamp snapping and extraction must be implemented.
== Basic Spatio-temporal algorithms ==


Extraction is based on where SQL statements or specific time stamps. Interpolated maps are created or existing map ids will be returned.
Extraction is based on where SQL statements or specific time stamps. Interpolated maps are created or existing map ids will be returned.
The extraction tool will provide different types of extraction algorithms
The extraction tool will provide different types of extraction algorithms
Nearest neighbour
Nearest neighbour
Interpolation (only raster and voxel maps) (linear, quadratic, ...)
Interpolation (only raster and voxel maps) (linear, quadratic, ...) or
Last valid time stamp
first valid time stamp.




tr(3).resample -> will create a new spacetime raster (voxel) datasets with a different spatio-temporal resolution, several methods will be available:
tr(3).resample -> will create a new spacetime raster (voxel) datasets with a different spatio-temporal resolution, several methods will be available:
averaging (mean, median, geometric mean, ...)
* averaging (mean, median, geometric mean, ...)
summation, multiplication
* summation, multiplication
max and min functions
* max and min functions


== Implementation details ==


Access to spacetime tables must be implemented as GRASS GIS library:
Access to spacetime tables must be implemented as GRASS GIS library:
Registration and unregistration of maps into spacetime datasets
* Registration and unregistration of maps into spacetime datasets
Update/creation of base table entries, so the SQL tables can be modified in low level GRASS GIS library functions (creation, deletion of maps)
* Update/creation of base table entries, so the SQL tables can be modified in low level GRASS GIS library functions (creation, deletion of maps)
Selection of maps from spacetime datasets
* Selection of maps from spacetime datasets
-->

Latest revision as of 10:15, 1 February 2015

Looking for the time series tutorial? See Temporal data processing