<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://grasswiki.osgeo.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=%E2%9A%A0%EF%B8%8FMastho</id>
	<title>GRASS-Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://grasswiki.osgeo.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=%E2%9A%A0%EF%B8%8FMastho"/>
	<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/wiki/Special:Contributions/%E2%9A%A0%EF%B8%8FMastho"/>
	<updated>2026-05-25T17:59:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19748</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19748"/>
		<updated>2013-09-22T09:57:24Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= t.select =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
t.select performs selection of maps that are registered in space time datasets using temporal algebra.&lt;br /&gt;
&lt;br /&gt;
== Program Use ==&lt;br /&gt;
The module expects an &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; as input parameter in the following form: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; &amp;quot;result = expression&amp;quot; &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The statement structure is similar to r.mapcalc.&lt;br /&gt;
Where &amp;lt;b&amp;gt;result&amp;lt;/b&amp;gt; represents the name of a space time dataset (STDS)that will &lt;br /&gt;
contain the result of the calculation that is given as &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; &lt;br /&gt;
on the right side of the equality sign. &lt;br /&gt;
These expression can be any valid or nested combination of temporal &lt;br /&gt;
operations and functions that are provided by the temporal algebra.  &amp;lt;br&amp;gt;&lt;br /&gt;
The temporal algebra works with space time datasets of any type (STRDS, STR3DS and STVDS). &lt;br /&gt;
The algebra provides methods for map selection from STDS based on their temporal relations. &lt;br /&gt;
It is also possible to temporally shift maps, to create temporal buffer and to snap time &lt;br /&gt;
instances to create a valid temporal topology. Furthermore expressions can be nested and &lt;br /&gt;
evaluated in conditional statements (if, else statements). Within if-statements the algebra &lt;br /&gt;
provides temporal variables like start time, end time, day of year, time differences or &lt;br /&gt;
number of maps per time interval to build up conditions. These operations can be assigned &lt;br /&gt;
to space time datasets or to the results of operations between space time datasets. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The type of the input space time datasets must be defined with the input &lt;br /&gt;
parameter &amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt;. Possible options are STRDS, STVDS or STR3DS. &lt;br /&gt;
The default is set to space time raster datasets (STRDS).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As default, topological relationships between space time datasets will be &lt;br /&gt;
evaluated only temporal. Use the &amp;lt;b&amp;gt;s&amp;lt;/b&amp;gt; flag to activate the &lt;br /&gt;
additionally spatial topology evaluation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The expression option must be passed as &amp;lt;b&amp;gt;quoted&amp;lt;/b&amp;gt; &lt;br /&gt;
expression, for example: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;t.select expression=&amp;quot;C = A : B&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
Where &amp;lt;b&amp;gt;C&amp;lt;/b&amp;gt; is the new space time raster dataset that will contain maps&lt;br /&gt;
from &amp;lt;b&amp;gt;A&amp;lt;/b&amp;gt; that are selected by equal temporal relationships &lt;br /&gt;
to the existing dataset &amp;lt;b&amp;gt;B&amp;lt;/b&amp;gt; in this case. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Temporal Algebra for t.select==&lt;br /&gt;
The temporal algebra provides a wide range of temporal operators and &lt;br /&gt;
functions that will be presented in the following section. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal relations&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several temporal topology relations between space &lt;br /&gt;
time datasets are supported: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
equals            A ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
during            A  ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
contains          A ------&lt;br /&gt;
                  B  ---- &lt;br /&gt;
&lt;br /&gt;
starts            A ----&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
started           A ------&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
finishs           A   ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
finished          A ------&lt;br /&gt;
                  B   ----&lt;br /&gt;
&lt;br /&gt;
precedes          A ----&lt;br /&gt;
                  B     ----&lt;br /&gt;
&lt;br /&gt;
follows           A     ----&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
overlapped        A   ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
overlaps          A ------&lt;br /&gt;
                  B   ------&lt;br /&gt;
&lt;br /&gt;
over              booth overlaps and overlapped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The relations must be read as: A is related to B, like - A equals B - A is &lt;br /&gt;
during B - A contains B &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Topological relations must be specified in {} parentheses. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal selection&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The temporal selection simply selects parts of a space time dataset without &lt;br /&gt;
processing raster or vector data.&lt;br /&gt;
&lt;br /&gt;
The algebra provides a selection operator &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt; that selects parts &lt;br /&gt;
of a space time dataset that are temporally equal to parts of a second one &lt;br /&gt;
by default. The following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: Select all parts of space time dataset A that are equal to B and store &lt;br /&gt;
it in space time dataset C. The parts are in this case time stamped maps. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In addition the inverse selection operator &amp;lt;b&amp;gt;!:&amp;lt;/b&amp;gt; is defined as the complement of &lt;br /&gt;
the selection operator, hence the following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: select all parts of space time time dataset A that are not equal to B &lt;br /&gt;
and store it in space time dataset (STDS) C. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To select parts of a STDS by different topological relations to other STDS, &lt;br /&gt;
the temporal topology selection operator can be used. The operator consists of &lt;br /&gt;
topological relations, that must be separated by the logical OR operator &lt;br /&gt;
&amp;lt;b&amp;gt;||&amp;lt;/b&amp;gt; and the temporal selection operator. Both parts are separated by &lt;br /&gt;
comma and surrounded by curly braces: &lt;br /&gt;
{&amp;quot;topological relations&amp;quot;, &amp;quot;temporal selection operator&amp;quot;}  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals,:} B&lt;br /&gt;
C = A {equals,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
We can now define arbitrary topological relations using logical OR operator &lt;br /&gt;
to connect them:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals||during||overlaps,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Select all parts of A that are equal to B, during B or overlaps B. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The selection operator is implicitly contained in the temporal topology &lt;br /&gt;
selection operator, so that the following statements are exactly the same:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
C = A {:} B&lt;br /&gt;
C = A {equal,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same for the complementary selection:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
C = A {!:} B&lt;br /&gt;
C = A {equal,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Conditional statements&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selection operations can be evaluated within conditional statements.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Note A and B can either be space time datasets or expressions.&lt;br /&gt;
&lt;br /&gt;
if statement                         decision option                        temporal relations&lt;br /&gt;
  if(if, then, else)&lt;br /&gt;
  if(conditions, A)                    A if conditions are True;              temporal topological relation between if and then is equal.&lt;br /&gt;
  if(conditions, A, B)                 A if conditions are True, B otherwise; temporal topological relation between if, then and else is equal.&lt;br /&gt;
  if(topologies, conditions, A)        A if conditions are True;              temporal topological relation between if and then is explicit specified by topologies.&lt;br /&gt;
  if(topologies, conditions, A, B)     A if conditions are True, B otherwise; temporal topological relation between if, then and else is explicit specified by topologies.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The conditions are comparison expressions that are used to evaluate &lt;br /&gt;
space time datasets. Specific values of temporal variables are &lt;br /&gt;
compared by logical operators and evaluated for each map of the STDS.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The supported logical operators:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Symbol  description&lt;br /&gt;
&lt;br /&gt;
  ==    equal&lt;br /&gt;
  !=    not equal&lt;br /&gt;
  &amp;gt;     greater than&lt;br /&gt;
  &amp;gt;=    greater than or equal&lt;br /&gt;
  &amp;lt;     less than&lt;br /&gt;
  &amp;lt;=    less than or equal&lt;br /&gt;
  &amp;amp;&amp;amp;    and&lt;br /&gt;
  ||    or&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Temporal functions: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
td(A)                   Returns a list of time intervals of STDS A&lt;br /&gt;
&lt;br /&gt;
start_time()            Start time as HH::MM:SS&lt;br /&gt;
start_date()            Start date as yyyy-mm-DD&lt;br /&gt;
start_datetime()        Start datetime as yyyy-mm-DD HH:MM:SS&lt;br /&gt;
end_time()              End time as HH:MM:SS&lt;br /&gt;
end_date()              End date as yyyy-mm-DD&lt;br /&gt;
end_datetime()          End datetime as  yyyy-mm-DD HH:MM&lt;br /&gt;
&lt;br /&gt;
start_doy()             Day of year (doy) from the start time [1 - 366]&lt;br /&gt;
start_dow()             Day of week (dow) from the start time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
start_year()            The year of the start time [0 - 9999]&lt;br /&gt;
start_month()           The month of the start time [1 - 12]&lt;br /&gt;
start_week()            Week of year of the start time [1 - 54]&lt;br /&gt;
start_day()             Day of month from the start time [1 - 31]&lt;br /&gt;
start_hour()            The hour of the start time [0 - 23]&lt;br /&gt;
start_minute()          The minute of the start time [0 - 59]&lt;br /&gt;
start_second()          The second of the start time [0 - 59]&lt;br /&gt;
end_doy()               Day of year (doy) from the end time [1 - 366]&lt;br /&gt;
end_dow()               Day of week (dow) from the end time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
end_year()              The year of the end time [0 - 9999]&lt;br /&gt;
end_month()             The month of the end time [1 - 12]&lt;br /&gt;
end_week()              Week of year of the end time [1 - 54]&lt;br /&gt;
end_day()               Day of month from the start time [1 - 31]&lt;br /&gt;
end_hour()              The hour of the end time [0 - 23]&lt;br /&gt;
end_minute()            The minute of the end time [0 - 59]&lt;br /&gt;
end_second()            The second of the end time [0 - 59]            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the number of maps in intervals can be computed and &lt;br /&gt;
used in conditional statements. &amp;lt;br&amp;gt;&lt;br /&gt;
The operator to count the number of maps &lt;br /&gt;
is the hash &amp;lt;b&amp;gt;#&amp;lt;/b&amp;gt;. &lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
A{contains,#}B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
This expression computes the number of maps from space &lt;br /&gt;
time dataset B which are during the time intervals of maps from &lt;br /&gt;
space time dataset A.&amp;lt;br&amp;gt;&lt;br /&gt;
A list of integers (scalars) corresponding to the maps of A &lt;br /&gt;
that contain maps from B will be returned. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore the temporal algebra allows temporal buffering, shifting &lt;br /&gt;
and snapping with the functions buff_t(), tshift() and tsnap()&lt;br /&gt;
respectively.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
buff_t(A, size)         Buffer STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tshift(A, size)         Shift STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tsnap(A)                Snap time instances and intervals of STDS A&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Examples&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which have equal time stamps &lt;br /&gt;
with space time dataset B and C and are ealier that Jan. 1. 2005 and &lt;br /&gt;
store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(start_date() &amp;lt; &amp;quot;2005-01-01&amp;quot;, A : B : C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which contains more than three&lt;br /&gt;
maps of space time dataset B, else select maps from C with time&lt;br /&gt;
stamps that are not equal to A and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(A {contain, #} B &amp;gt; 3, A {contain, :} B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset B which are during the temporal &lt;br /&gt;
buffered space time dataset A with a map interval of three days, else&lt;br /&gt;
select maps from C and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(contain, td(buff_t(A, &amp;quot;1 days&amp;quot;)) == 3, B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || in progress&lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 9 - 2012-07-26 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented functions for temporal operators into the temporal algebra.&lt;br /&gt;
* Finsihed the module t.select.&lt;br /&gt;
* Wrote the manual page for t.select.&lt;br /&gt;
* Started to implement vector operations into the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue documentation of the GRASS module t.select and the integration of the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 10 - 2012-08-02 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Fixed bugs in the temporal algebra.&lt;br /&gt;
* More testing of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the integration of the vector operations into the temporal vector algebra and write documentation and tests.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 11 - 2012-08-09 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Finished implementation of vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Integrated a new function to evaluate spatio-temporal operators with PLY.&lt;br /&gt;
* Worked on a lot minor fixes and tests.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Finish the the temporal vector algebra and write documentation. Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 12 - 2012-08-16 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Integrated buffer function into temporal vector algebra.&lt;br /&gt;
* Finished temporal vector algebra. &lt;br /&gt;
* Worked on documentation and examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write documentation and start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I travelled to Estonia for my PhD thesis, so I had limited time for my project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Week 13 - 2012-08-23 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Write tests and documentation for the temporal vector algebra.&lt;br /&gt;
* Fixed a lot of bugs in the temporal vector algebra.&lt;br /&gt;
* Worked on examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I was still busy with the temporal vector algebra this week. Some difficult and time intensive bugs prevent me from starting with the raster algebra.&lt;br /&gt;
&lt;br /&gt;
== Week 14 - 2012-08-30 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed some more bugs in the temporal vector algebra.&lt;br /&gt;
* Made some improvements to speed up the meta data analysis.&lt;br /&gt;
* Finished the temporal vector algebra.&lt;br /&gt;
* Started with the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occurred&lt;br /&gt;
&lt;br /&gt;
== Week 15 - 2012-09-06 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Worked on the temporal raster algebra.&lt;br /&gt;
* Implemented the lexical analysis for expressions.&lt;br /&gt;
* Added arithmetic operations to the temporal raster algebra.&lt;br /&gt;
* Rearrange the command list to work with r.mapcalc expression strings.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Occurring problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 16 - 2012-09-13 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Finished the temporal raster algebra.&lt;br /&gt;
* Implemented the correct precedence for arithmetic operations.&lt;br /&gt;
* Get the arithmetic operators running.&lt;br /&gt;
* Improved and fixed the command list to work better with r.mapcalc expression strings.&lt;br /&gt;
* Created the new module t.rast.mapcalc to work with the temporal raster algebra,&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Adding some more r.mapcalc functions to the temporal raster algebra and writing documentation for t.rast.mapcalc&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Occurring problems could be solved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Week 17 - 2012-09-20 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Added additional functions to the raster algebra.&lt;br /&gt;
* Wrote documentation for the temporal raster algebra.&lt;br /&gt;
* Did intensive testing and fixed a lot bugs.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Writing some tutorials for the vector and raster algebra and add some more functions from r.mapcalc into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor issues.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19747</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19747"/>
		<updated>2013-09-22T09:52:04Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Project plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= t.select =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
t.select performs selection of maps that are registered in space time datasets using temporal algebra.&lt;br /&gt;
&lt;br /&gt;
== Program Use ==&lt;br /&gt;
The module expects an &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; as input parameter in the following form: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; &amp;quot;result = expression&amp;quot; &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The statement structure is similar to r.mapcalc.&lt;br /&gt;
Where &amp;lt;b&amp;gt;result&amp;lt;/b&amp;gt; represents the name of a space time dataset (STDS)that will &lt;br /&gt;
contain the result of the calculation that is given as &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; &lt;br /&gt;
on the right side of the equality sign. &lt;br /&gt;
These expression can be any valid or nested combination of temporal &lt;br /&gt;
operations and functions that are provided by the temporal algebra.  &amp;lt;br&amp;gt;&lt;br /&gt;
The temporal algebra works with space time datasets of any type (STRDS, STR3DS and STVDS). &lt;br /&gt;
The algebra provides methods for map selection from STDS based on their temporal relations. &lt;br /&gt;
It is also possible to temporally shift maps, to create temporal buffer and to snap time &lt;br /&gt;
instances to create a valid temporal topology. Furthermore expressions can be nested and &lt;br /&gt;
evaluated in conditional statements (if, else statements). Within if-statements the algebra &lt;br /&gt;
provides temporal variables like start time, end time, day of year, time differences or &lt;br /&gt;
number of maps per time interval to build up conditions. These operations can be assigned &lt;br /&gt;
to space time datasets or to the results of operations between space time datasets. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The type of the input space time datasets must be defined with the input &lt;br /&gt;
parameter &amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt;. Possible options are STRDS, STVDS or STR3DS. &lt;br /&gt;
The default is set to space time raster datasets (STRDS).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As default, topological relationships between space time datasets will be &lt;br /&gt;
evaluated only temporal. Use the &amp;lt;b&amp;gt;s&amp;lt;/b&amp;gt; flag to activate the &lt;br /&gt;
additionally spatial topology evaluation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The expression option must be passed as &amp;lt;b&amp;gt;quoted&amp;lt;/b&amp;gt; &lt;br /&gt;
expression, for example: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;t.select expression=&amp;quot;C = A : B&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
Where &amp;lt;b&amp;gt;C&amp;lt;/b&amp;gt; is the new space time raster dataset that will contain maps&lt;br /&gt;
from &amp;lt;b&amp;gt;A&amp;lt;/b&amp;gt; that are selected by equal temporal relationships &lt;br /&gt;
to the existing dataset &amp;lt;b&amp;gt;B&amp;lt;/b&amp;gt; in this case. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Temporal Algebra for t.select==&lt;br /&gt;
The temporal algebra provides a wide range of temporal operators and &lt;br /&gt;
functions that will be presented in the following section. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal relations&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several temporal topology relations between space &lt;br /&gt;
time datasets are supported: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
equals            A ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
during            A  ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
contains          A ------&lt;br /&gt;
                  B  ---- &lt;br /&gt;
&lt;br /&gt;
starts            A ----&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
started           A ------&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
finishs           A   ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
finished          A ------&lt;br /&gt;
                  B   ----&lt;br /&gt;
&lt;br /&gt;
precedes          A ----&lt;br /&gt;
                  B     ----&lt;br /&gt;
&lt;br /&gt;
follows           A     ----&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
overlapped        A   ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
overlaps          A ------&lt;br /&gt;
                  B   ------&lt;br /&gt;
&lt;br /&gt;
over              booth overlaps and overlapped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The relations must be read as: A is related to B, like - A equals B - A is &lt;br /&gt;
during B - A contains B &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Topological relations must be specified in {} parentheses. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal selection&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The temporal selection simply selects parts of a space time dataset without &lt;br /&gt;
processing raster or vector data.&lt;br /&gt;
&lt;br /&gt;
The algebra provides a selection operator &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt; that selects parts &lt;br /&gt;
of a space time dataset that are temporally equal to parts of a second one &lt;br /&gt;
by default. The following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: Select all parts of space time dataset A that are equal to B and store &lt;br /&gt;
it in space time dataset C. The parts are in this case time stamped maps. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In addition the inverse selection operator &amp;lt;b&amp;gt;!:&amp;lt;/b&amp;gt; is defined as the complement of &lt;br /&gt;
the selection operator, hence the following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: select all parts of space time time dataset A that are not equal to B &lt;br /&gt;
and store it in space time dataset (STDS) C. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To select parts of a STDS by different topological relations to other STDS, &lt;br /&gt;
the temporal topology selection operator can be used. The operator consists of &lt;br /&gt;
topological relations, that must be separated by the logical OR operator &lt;br /&gt;
&amp;lt;b&amp;gt;||&amp;lt;/b&amp;gt; and the temporal selection operator. Both parts are separated by &lt;br /&gt;
comma and surrounded by curly braces: &lt;br /&gt;
{&amp;quot;topological relations&amp;quot;, &amp;quot;temporal selection operator&amp;quot;}  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals,:} B&lt;br /&gt;
C = A {equals,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
We can now define arbitrary topological relations using logical OR operator &lt;br /&gt;
to connect them:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals||during||overlaps,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Select all parts of A that are equal to B, during B or overlaps B. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The selection operator is implicitly contained in the temporal topology &lt;br /&gt;
selection operator, so that the following statements are exactly the same:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
C = A {:} B&lt;br /&gt;
C = A {equal,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same for the complementary selection:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
C = A {!:} B&lt;br /&gt;
C = A {equal,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Conditional statements&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selection operations can be evaluated within conditional statements.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Note A and B can either be space time datasets or expressions.&lt;br /&gt;
&lt;br /&gt;
if statement                         decision option                        temporal relations&lt;br /&gt;
  if(if, then, else)&lt;br /&gt;
  if(conditions, A)                    A if conditions are True;              temporal topological relation between if and then is equal.&lt;br /&gt;
  if(conditions, A, B)                 A if conditions are True, B otherwise; temporal topological relation between if, then and else is equal.&lt;br /&gt;
  if(topologies, conditions, A)        A if conditions are True;              temporal topological relation between if and then is explicit specified by topologies.&lt;br /&gt;
  if(topologies, conditions, A, B)     A if conditions are True, B otherwise; temporal topological relation between if, then and else is explicit specified by topologies.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The conditions are comparison expressions that are used to evaluate &lt;br /&gt;
space time datasets. Specific values of temporal variables are &lt;br /&gt;
compared by logical operators and evaluated for each map of the STDS.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The supported logical operators:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Symbol  description&lt;br /&gt;
&lt;br /&gt;
  ==    equal&lt;br /&gt;
  !=    not equal&lt;br /&gt;
  &amp;gt;     greater than&lt;br /&gt;
  &amp;gt;=    greater than or equal&lt;br /&gt;
  &amp;lt;     less than&lt;br /&gt;
  &amp;lt;=    less than or equal&lt;br /&gt;
  &amp;amp;&amp;amp;    and&lt;br /&gt;
  ||    or&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Temporal functions: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
td(A)                   Returns a list of time intervals of STDS A&lt;br /&gt;
&lt;br /&gt;
start_time()            Start time as HH::MM:SS&lt;br /&gt;
start_date()            Start date as yyyy-mm-DD&lt;br /&gt;
start_datetime()        Start datetime as yyyy-mm-DD HH:MM:SS&lt;br /&gt;
end_time()              End time as HH:MM:SS&lt;br /&gt;
end_date()              End date as yyyy-mm-DD&lt;br /&gt;
end_datetime()          End datetime as  yyyy-mm-DD HH:MM&lt;br /&gt;
&lt;br /&gt;
start_doy()             Day of year (doy) from the start time [1 - 366]&lt;br /&gt;
start_dow()             Day of week (dow) from the start time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
start_year()            The year of the start time [0 - 9999]&lt;br /&gt;
start_month()           The month of the start time [1 - 12]&lt;br /&gt;
start_week()            Week of year of the start time [1 - 54]&lt;br /&gt;
start_day()             Day of month from the start time [1 - 31]&lt;br /&gt;
start_hour()            The hour of the start time [0 - 23]&lt;br /&gt;
start_minute()          The minute of the start time [0 - 59]&lt;br /&gt;
start_second()          The second of the start time [0 - 59]&lt;br /&gt;
end_doy()               Day of year (doy) from the end time [1 - 366]&lt;br /&gt;
end_dow()               Day of week (dow) from the end time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
end_year()              The year of the end time [0 - 9999]&lt;br /&gt;
end_month()             The month of the end time [1 - 12]&lt;br /&gt;
end_week()              Week of year of the end time [1 - 54]&lt;br /&gt;
end_day()               Day of month from the start time [1 - 31]&lt;br /&gt;
end_hour()              The hour of the end time [0 - 23]&lt;br /&gt;
end_minute()            The minute of the end time [0 - 59]&lt;br /&gt;
end_second()            The second of the end time [0 - 59]            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the number of maps in intervals can be computed and &lt;br /&gt;
used in conditional statements. &amp;lt;br&amp;gt;&lt;br /&gt;
The operator to count the number of maps &lt;br /&gt;
is the hash &amp;lt;b&amp;gt;#&amp;lt;/b&amp;gt;. &lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
A{contains,#}B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
This expression computes the number of maps from space &lt;br /&gt;
time dataset B which are during the time intervals of maps from &lt;br /&gt;
space time dataset A.&amp;lt;br&amp;gt;&lt;br /&gt;
A list of integers (scalars) corresponding to the maps of A &lt;br /&gt;
that contain maps from B will be returned. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore the temporal algebra allows temporal buffering, shifting &lt;br /&gt;
and snapping with the functions buff_t(), tshift() and tsnap()&lt;br /&gt;
respectively.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
buff_t(A, size)         Buffer STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tshift(A, size)         Shift STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tsnap(A)                Snap time instances and intervals of STDS A&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Examples&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which have equal time stamps &lt;br /&gt;
with space time dataset B and C and are ealier that Jan. 1. 2005 and &lt;br /&gt;
store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(start_date() &amp;lt; &amp;quot;2005-01-01&amp;quot;, A : B : C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which contains more than three&lt;br /&gt;
maps of space time dataset B, else select maps from C with time&lt;br /&gt;
stamps that are not equal to A and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(A {contain, #} B &amp;gt; 3, A {contain, :} B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset B which are during the temporal &lt;br /&gt;
buffered space time dataset A with a map interval of three days, else&lt;br /&gt;
select maps from C and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(contain, td(buff_t(A, &amp;quot;1 days&amp;quot;)) == 3, B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || in progress&lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 9 - 2012-07-26 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented functions for temporal operators into the temporal algebra.&lt;br /&gt;
* Finsihed the module t.select.&lt;br /&gt;
* Wrote the manual page for t.select.&lt;br /&gt;
* Started to implement vector operations into the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue documentation of the GRASS module t.select and the integration of the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 10 - 2012-08-02 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Fixed bugs in the temporal algebra.&lt;br /&gt;
* More testing of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the integration of the vector operations into the temporal vector algebra and write documentation and tests.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 11 - 2012-08-09 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Finished implementation of vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Integrated a new function to evaluate spatio-temporal operators with PLY.&lt;br /&gt;
* Worked on a lot minor fixes and tests.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Finish the the temporal vector algebra and write documentation. Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 12 - 2012-08-16 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Integrated buffer function into temporal vector algebra.&lt;br /&gt;
* Finished temporal vector algebra. &lt;br /&gt;
* Worked on documentation and examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write documentation and start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I travelled to Estonia for my PhD thesis, so I had limited time for my project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Week 13 - 2012-08-23 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Write tests and documentation for the temporal vector algebra.&lt;br /&gt;
* Fixed a lot of bugs in the temporal vector algebra.&lt;br /&gt;
* Worked on examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I was still busy with the temporal vector algebra this week. Some difficult and time intensive bugs prevent me from starting with the raster algebra.&lt;br /&gt;
&lt;br /&gt;
== Week 14 - 2012-08-30 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed some more bugs in the temporal vector algebra.&lt;br /&gt;
* Made some improvements to speed up the meta data analysis.&lt;br /&gt;
* Finished the temporal vector algebra.&lt;br /&gt;
* Started with the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occurred&lt;br /&gt;
&lt;br /&gt;
== Week 15 - 2012-09-06 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Worked on the temporal raster algebra.&lt;br /&gt;
* Implemented the lexical analysis for expressions.&lt;br /&gt;
* Added arithmetic operations to the temporal raster algebra.&lt;br /&gt;
* Rearrange the command list to work with r.mapcalc expression strings.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Occurring problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 16 - 2012-09-13 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Finished the temporal raster algebra.&lt;br /&gt;
* Implemented the correct precedence for arithmetic operations.&lt;br /&gt;
* Get the arithmetic operators running.&lt;br /&gt;
* Improved and fixed the command list to work better with r.mapcalc expression strings.&lt;br /&gt;
* Created the new module t.rast.mapcalc to work with the temporal raster algebra,&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Adding some more r.mapcalc functions to the temporal raster algebra and writing documentation for t.rast.mapcalc&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Occurring problems could be solved.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19724</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19724"/>
		<updated>2013-09-13T19:40:06Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= t.select =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
t.select performs selection of maps that are registered in space time datasets using temporal algebra.&lt;br /&gt;
&lt;br /&gt;
== Program Use ==&lt;br /&gt;
The module expects an &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; as input parameter in the following form: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; &amp;quot;result = expression&amp;quot; &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The statement structure is similar to r.mapcalc.&lt;br /&gt;
Where &amp;lt;b&amp;gt;result&amp;lt;/b&amp;gt; represents the name of a space time dataset (STDS)that will &lt;br /&gt;
contain the result of the calculation that is given as &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; &lt;br /&gt;
on the right side of the equality sign. &lt;br /&gt;
These expression can be any valid or nested combination of temporal &lt;br /&gt;
operations and functions that are provided by the temporal algebra.  &amp;lt;br&amp;gt;&lt;br /&gt;
The temporal algebra works with space time datasets of any type (STRDS, STR3DS and STVDS). &lt;br /&gt;
The algebra provides methods for map selection from STDS based on their temporal relations. &lt;br /&gt;
It is also possible to temporally shift maps, to create temporal buffer and to snap time &lt;br /&gt;
instances to create a valid temporal topology. Furthermore expressions can be nested and &lt;br /&gt;
evaluated in conditional statements (if, else statements). Within if-statements the algebra &lt;br /&gt;
provides temporal variables like start time, end time, day of year, time differences or &lt;br /&gt;
number of maps per time interval to build up conditions. These operations can be assigned &lt;br /&gt;
to space time datasets or to the results of operations between space time datasets. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The type of the input space time datasets must be defined with the input &lt;br /&gt;
parameter &amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt;. Possible options are STRDS, STVDS or STR3DS. &lt;br /&gt;
The default is set to space time raster datasets (STRDS).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As default, topological relationships between space time datasets will be &lt;br /&gt;
evaluated only temporal. Use the &amp;lt;b&amp;gt;s&amp;lt;/b&amp;gt; flag to activate the &lt;br /&gt;
additionally spatial topology evaluation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The expression option must be passed as &amp;lt;b&amp;gt;quoted&amp;lt;/b&amp;gt; &lt;br /&gt;
expression, for example: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;t.select expression=&amp;quot;C = A : B&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
Where &amp;lt;b&amp;gt;C&amp;lt;/b&amp;gt; is the new space time raster dataset that will contain maps&lt;br /&gt;
from &amp;lt;b&amp;gt;A&amp;lt;/b&amp;gt; that are selected by equal temporal relationships &lt;br /&gt;
to the existing dataset &amp;lt;b&amp;gt;B&amp;lt;/b&amp;gt; in this case. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Temporal Algebra for t.select==&lt;br /&gt;
The temporal algebra provides a wide range of temporal operators and &lt;br /&gt;
functions that will be presented in the following section. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal relations&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several temporal topology relations between space &lt;br /&gt;
time datasets are supported: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
equals            A ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
during            A  ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
contains          A ------&lt;br /&gt;
                  B  ---- &lt;br /&gt;
&lt;br /&gt;
starts            A ----&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
started           A ------&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
finishs           A   ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
finished          A ------&lt;br /&gt;
                  B   ----&lt;br /&gt;
&lt;br /&gt;
precedes          A ----&lt;br /&gt;
                  B     ----&lt;br /&gt;
&lt;br /&gt;
follows           A     ----&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
overlapped        A   ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
overlaps          A ------&lt;br /&gt;
                  B   ------&lt;br /&gt;
&lt;br /&gt;
over              booth overlaps and overlapped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The relations must be read as: A is related to B, like - A equals B - A is &lt;br /&gt;
during B - A contains B &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Topological relations must be specified in {} parentheses. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal selection&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The temporal selection simply selects parts of a space time dataset without &lt;br /&gt;
processing raster or vector data.&lt;br /&gt;
&lt;br /&gt;
The algebra provides a selection operator &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt; that selects parts &lt;br /&gt;
of a space time dataset that are temporally equal to parts of a second one &lt;br /&gt;
by default. The following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: Select all parts of space time dataset A that are equal to B and store &lt;br /&gt;
it in space time dataset C. The parts are in this case time stamped maps. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In addition the inverse selection operator &amp;lt;b&amp;gt;!:&amp;lt;/b&amp;gt; is defined as the complement of &lt;br /&gt;
the selection operator, hence the following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: select all parts of space time time dataset A that are not equal to B &lt;br /&gt;
and store it in space time dataset (STDS) C. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To select parts of a STDS by different topological relations to other STDS, &lt;br /&gt;
the temporal topology selection operator can be used. The operator consists of &lt;br /&gt;
topological relations, that must be separated by the logical OR operator &lt;br /&gt;
&amp;lt;b&amp;gt;||&amp;lt;/b&amp;gt; and the temporal selection operator. Both parts are separated by &lt;br /&gt;
comma and surrounded by curly braces: &lt;br /&gt;
{&amp;quot;topological relations&amp;quot;, &amp;quot;temporal selection operator&amp;quot;}  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals,:} B&lt;br /&gt;
C = A {equals,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
We can now define arbitrary topological relations using logical OR operator &lt;br /&gt;
to connect them:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals||during||overlaps,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Select all parts of A that are equal to B, during B or overlaps B. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The selection operator is implicitly contained in the temporal topology &lt;br /&gt;
selection operator, so that the following statements are exactly the same:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
C = A {:} B&lt;br /&gt;
C = A {equal,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same for the complementary selection:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
C = A {!:} B&lt;br /&gt;
C = A {equal,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Conditional statements&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selection operations can be evaluated within conditional statements.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Note A and B can either be space time datasets or expressions.&lt;br /&gt;
&lt;br /&gt;
if statement                         decision option                        temporal relations&lt;br /&gt;
  if(if, then, else)&lt;br /&gt;
  if(conditions, A)                    A if conditions are True;              temporal topological relation between if and then is equal.&lt;br /&gt;
  if(conditions, A, B)                 A if conditions are True, B otherwise; temporal topological relation between if, then and else is equal.&lt;br /&gt;
  if(topologies, conditions, A)        A if conditions are True;              temporal topological relation between if and then is explicit specified by topologies.&lt;br /&gt;
  if(topologies, conditions, A, B)     A if conditions are True, B otherwise; temporal topological relation between if, then and else is explicit specified by topologies.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The conditions are comparison expressions that are used to evaluate &lt;br /&gt;
space time datasets. Specific values of temporal variables are &lt;br /&gt;
compared by logical operators and evaluated for each map of the STDS.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The supported logical operators:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Symbol  description&lt;br /&gt;
&lt;br /&gt;
  ==    equal&lt;br /&gt;
  !=    not equal&lt;br /&gt;
  &amp;gt;     greater than&lt;br /&gt;
  &amp;gt;=    greater than or equal&lt;br /&gt;
  &amp;lt;     less than&lt;br /&gt;
  &amp;lt;=    less than or equal&lt;br /&gt;
  &amp;amp;&amp;amp;    and&lt;br /&gt;
  ||    or&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Temporal functions: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
td(A)                   Returns a list of time intervals of STDS A&lt;br /&gt;
&lt;br /&gt;
start_time()            Start time as HH::MM:SS&lt;br /&gt;
start_date()            Start date as yyyy-mm-DD&lt;br /&gt;
start_datetime()        Start datetime as yyyy-mm-DD HH:MM:SS&lt;br /&gt;
end_time()              End time as HH:MM:SS&lt;br /&gt;
end_date()              End date as yyyy-mm-DD&lt;br /&gt;
end_datetime()          End datetime as  yyyy-mm-DD HH:MM&lt;br /&gt;
&lt;br /&gt;
start_doy()             Day of year (doy) from the start time [1 - 366]&lt;br /&gt;
start_dow()             Day of week (dow) from the start time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
start_year()            The year of the start time [0 - 9999]&lt;br /&gt;
start_month()           The month of the start time [1 - 12]&lt;br /&gt;
start_week()            Week of year of the start time [1 - 54]&lt;br /&gt;
start_day()             Day of month from the start time [1 - 31]&lt;br /&gt;
start_hour()            The hour of the start time [0 - 23]&lt;br /&gt;
start_minute()          The minute of the start time [0 - 59]&lt;br /&gt;
start_second()          The second of the start time [0 - 59]&lt;br /&gt;
end_doy()               Day of year (doy) from the end time [1 - 366]&lt;br /&gt;
end_dow()               Day of week (dow) from the end time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
end_year()              The year of the end time [0 - 9999]&lt;br /&gt;
end_month()             The month of the end time [1 - 12]&lt;br /&gt;
end_week()              Week of year of the end time [1 - 54]&lt;br /&gt;
end_day()               Day of month from the start time [1 - 31]&lt;br /&gt;
end_hour()              The hour of the end time [0 - 23]&lt;br /&gt;
end_minute()            The minute of the end time [0 - 59]&lt;br /&gt;
end_second()            The second of the end time [0 - 59]            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the number of maps in intervals can be computed and &lt;br /&gt;
used in conditional statements. &amp;lt;br&amp;gt;&lt;br /&gt;
The operator to count the number of maps &lt;br /&gt;
is the hash &amp;lt;b&amp;gt;#&amp;lt;/b&amp;gt;. &lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
A{contains,#}B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
This expression computes the number of maps from space &lt;br /&gt;
time dataset B which are during the time intervals of maps from &lt;br /&gt;
space time dataset A.&amp;lt;br&amp;gt;&lt;br /&gt;
A list of integers (scalars) corresponding to the maps of A &lt;br /&gt;
that contain maps from B will be returned. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore the temporal algebra allows temporal buffering, shifting &lt;br /&gt;
and snapping with the functions buff_t(), tshift() and tsnap()&lt;br /&gt;
respectively.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
buff_t(A, size)         Buffer STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tshift(A, size)         Shift STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tsnap(A)                Snap time instances and intervals of STDS A&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Examples&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which have equal time stamps &lt;br /&gt;
with space time dataset B and C and are ealier that Jan. 1. 2005 and &lt;br /&gt;
store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(start_date() &amp;lt; &amp;quot;2005-01-01&amp;quot;, A : B : C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which contains more than three&lt;br /&gt;
maps of space time dataset B, else select maps from C with time&lt;br /&gt;
stamps that are not equal to A and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(A {contain, #} B &amp;gt; 3, A {contain, :} B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset B which are during the temporal &lt;br /&gt;
buffered space time dataset A with a map interval of three days, else&lt;br /&gt;
select maps from C and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(contain, td(buff_t(A, &amp;quot;1 days&amp;quot;)) == 3, B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || in progress&lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 9 - 2012-07-26 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented functions for temporal operators into the temporal algebra.&lt;br /&gt;
* Finsihed the module t.select.&lt;br /&gt;
* Wrote the manual page for t.select.&lt;br /&gt;
* Started to implement vector operations into the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue documentation of the GRASS module t.select and the integration of the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 10 - 2012-08-02 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Fixed bugs in the temporal algebra.&lt;br /&gt;
* More testing of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the integration of the vector operations into the temporal vector algebra and write documentation and tests.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 11 - 2012-08-09 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Finished implementation of vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Integrated a new function to evaluate spatio-temporal operators with PLY.&lt;br /&gt;
* Worked on a lot minor fixes and tests.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Finish the the temporal vector algebra and write documentation. Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 12 - 2012-08-16 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Integrated buffer function into temporal vector algebra.&lt;br /&gt;
* Finished temporal vector algebra. &lt;br /&gt;
* Worked on documentation and examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write documentation and start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I travelled to Estonia for my PhD thesis, so I had limited time for my project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Week 13 - 2012-08-23 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Write tests and documentation for the temporal vector algebra.&lt;br /&gt;
* Fixed a lot of bugs in the temporal vector algebra.&lt;br /&gt;
* Worked on examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I was still busy with the temporal vector algebra this week. Some difficult and time intensive bugs prevent me from starting with the raster algebra.&lt;br /&gt;
&lt;br /&gt;
== Week 14 - 2012-08-30 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed some more bugs in the temporal vector algebra.&lt;br /&gt;
* Made some improvements to speed up the meta data analysis.&lt;br /&gt;
* Finished the temporal vector algebra.&lt;br /&gt;
* Started with the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occurred&lt;br /&gt;
&lt;br /&gt;
== Week 15 - 2012-09-06 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Worked on the temporal raster algebra.&lt;br /&gt;
* Implemented the lexical analysis for expressions.&lt;br /&gt;
* Added arithmetic operations to the temporal raster algebra.&lt;br /&gt;
* Rearrange the command list to work with r.mapcalc expression strings.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Occurring problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 16 - 2012-09-13 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Finished the temporal raster algebra.&lt;br /&gt;
* Implemented the correct precedence for arithmetic operations.&lt;br /&gt;
* Get the arithmetic operators running.&lt;br /&gt;
* Improved and fixed the command list to work better with r.mapcalc expression strings.&lt;br /&gt;
* Created the new module t.rast.mapcalc to work with the temporal raster algebra,&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Adding some more r.mapcalc functions to the temporal raster algebra and writing documentation for t.rast.mapcalc&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Occurring problems could be solved.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19723</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19723"/>
		<updated>2013-09-13T19:35:53Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Project plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= t.select =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
t.select performs selection of maps that are registered in space time datasets using temporal algebra.&lt;br /&gt;
&lt;br /&gt;
== Program Use ==&lt;br /&gt;
The module expects an &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; as input parameter in the following form: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; &amp;quot;result = expression&amp;quot; &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The statement structure is similar to r.mapcalc.&lt;br /&gt;
Where &amp;lt;b&amp;gt;result&amp;lt;/b&amp;gt; represents the name of a space time dataset (STDS)that will &lt;br /&gt;
contain the result of the calculation that is given as &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; &lt;br /&gt;
on the right side of the equality sign. &lt;br /&gt;
These expression can be any valid or nested combination of temporal &lt;br /&gt;
operations and functions that are provided by the temporal algebra.  &amp;lt;br&amp;gt;&lt;br /&gt;
The temporal algebra works with space time datasets of any type (STRDS, STR3DS and STVDS). &lt;br /&gt;
The algebra provides methods for map selection from STDS based on their temporal relations. &lt;br /&gt;
It is also possible to temporally shift maps, to create temporal buffer and to snap time &lt;br /&gt;
instances to create a valid temporal topology. Furthermore expressions can be nested and &lt;br /&gt;
evaluated in conditional statements (if, else statements). Within if-statements the algebra &lt;br /&gt;
provides temporal variables like start time, end time, day of year, time differences or &lt;br /&gt;
number of maps per time interval to build up conditions. These operations can be assigned &lt;br /&gt;
to space time datasets or to the results of operations between space time datasets. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The type of the input space time datasets must be defined with the input &lt;br /&gt;
parameter &amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt;. Possible options are STRDS, STVDS or STR3DS. &lt;br /&gt;
The default is set to space time raster datasets (STRDS).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As default, topological relationships between space time datasets will be &lt;br /&gt;
evaluated only temporal. Use the &amp;lt;b&amp;gt;s&amp;lt;/b&amp;gt; flag to activate the &lt;br /&gt;
additionally spatial topology evaluation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The expression option must be passed as &amp;lt;b&amp;gt;quoted&amp;lt;/b&amp;gt; &lt;br /&gt;
expression, for example: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;t.select expression=&amp;quot;C = A : B&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
Where &amp;lt;b&amp;gt;C&amp;lt;/b&amp;gt; is the new space time raster dataset that will contain maps&lt;br /&gt;
from &amp;lt;b&amp;gt;A&amp;lt;/b&amp;gt; that are selected by equal temporal relationships &lt;br /&gt;
to the existing dataset &amp;lt;b&amp;gt;B&amp;lt;/b&amp;gt; in this case. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Temporal Algebra for t.select==&lt;br /&gt;
The temporal algebra provides a wide range of temporal operators and &lt;br /&gt;
functions that will be presented in the following section. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal relations&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several temporal topology relations between space &lt;br /&gt;
time datasets are supported: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
equals            A ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
during            A  ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
contains          A ------&lt;br /&gt;
                  B  ---- &lt;br /&gt;
&lt;br /&gt;
starts            A ----&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
started           A ------&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
finishs           A   ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
finished          A ------&lt;br /&gt;
                  B   ----&lt;br /&gt;
&lt;br /&gt;
precedes          A ----&lt;br /&gt;
                  B     ----&lt;br /&gt;
&lt;br /&gt;
follows           A     ----&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
overlapped        A   ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
overlaps          A ------&lt;br /&gt;
                  B   ------&lt;br /&gt;
&lt;br /&gt;
over              booth overlaps and overlapped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The relations must be read as: A is related to B, like - A equals B - A is &lt;br /&gt;
during B - A contains B &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Topological relations must be specified in {} parentheses. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal selection&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The temporal selection simply selects parts of a space time dataset without &lt;br /&gt;
processing raster or vector data.&lt;br /&gt;
&lt;br /&gt;
The algebra provides a selection operator &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt; that selects parts &lt;br /&gt;
of a space time dataset that are temporally equal to parts of a second one &lt;br /&gt;
by default. The following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: Select all parts of space time dataset A that are equal to B and store &lt;br /&gt;
it in space time dataset C. The parts are in this case time stamped maps. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In addition the inverse selection operator &amp;lt;b&amp;gt;!:&amp;lt;/b&amp;gt; is defined as the complement of &lt;br /&gt;
the selection operator, hence the following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: select all parts of space time time dataset A that are not equal to B &lt;br /&gt;
and store it in space time dataset (STDS) C. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To select parts of a STDS by different topological relations to other STDS, &lt;br /&gt;
the temporal topology selection operator can be used. The operator consists of &lt;br /&gt;
topological relations, that must be separated by the logical OR operator &lt;br /&gt;
&amp;lt;b&amp;gt;||&amp;lt;/b&amp;gt; and the temporal selection operator. Both parts are separated by &lt;br /&gt;
comma and surrounded by curly braces: &lt;br /&gt;
{&amp;quot;topological relations&amp;quot;, &amp;quot;temporal selection operator&amp;quot;}  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals,:} B&lt;br /&gt;
C = A {equals,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
We can now define arbitrary topological relations using logical OR operator &lt;br /&gt;
to connect them:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals||during||overlaps,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Select all parts of A that are equal to B, during B or overlaps B. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The selection operator is implicitly contained in the temporal topology &lt;br /&gt;
selection operator, so that the following statements are exactly the same:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
C = A {:} B&lt;br /&gt;
C = A {equal,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same for the complementary selection:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
C = A {!:} B&lt;br /&gt;
C = A {equal,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Conditional statements&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selection operations can be evaluated within conditional statements.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Note A and B can either be space time datasets or expressions.&lt;br /&gt;
&lt;br /&gt;
if statement                         decision option                        temporal relations&lt;br /&gt;
  if(if, then, else)&lt;br /&gt;
  if(conditions, A)                    A if conditions are True;              temporal topological relation between if and then is equal.&lt;br /&gt;
  if(conditions, A, B)                 A if conditions are True, B otherwise; temporal topological relation between if, then and else is equal.&lt;br /&gt;
  if(topologies, conditions, A)        A if conditions are True;              temporal topological relation between if and then is explicit specified by topologies.&lt;br /&gt;
  if(topologies, conditions, A, B)     A if conditions are True, B otherwise; temporal topological relation between if, then and else is explicit specified by topologies.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The conditions are comparison expressions that are used to evaluate &lt;br /&gt;
space time datasets. Specific values of temporal variables are &lt;br /&gt;
compared by logical operators and evaluated for each map of the STDS.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The supported logical operators:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Symbol  description&lt;br /&gt;
&lt;br /&gt;
  ==    equal&lt;br /&gt;
  !=    not equal&lt;br /&gt;
  &amp;gt;     greater than&lt;br /&gt;
  &amp;gt;=    greater than or equal&lt;br /&gt;
  &amp;lt;     less than&lt;br /&gt;
  &amp;lt;=    less than or equal&lt;br /&gt;
  &amp;amp;&amp;amp;    and&lt;br /&gt;
  ||    or&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Temporal functions: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
td(A)                   Returns a list of time intervals of STDS A&lt;br /&gt;
&lt;br /&gt;
start_time()            Start time as HH::MM:SS&lt;br /&gt;
start_date()            Start date as yyyy-mm-DD&lt;br /&gt;
start_datetime()        Start datetime as yyyy-mm-DD HH:MM:SS&lt;br /&gt;
end_time()              End time as HH:MM:SS&lt;br /&gt;
end_date()              End date as yyyy-mm-DD&lt;br /&gt;
end_datetime()          End datetime as  yyyy-mm-DD HH:MM&lt;br /&gt;
&lt;br /&gt;
start_doy()             Day of year (doy) from the start time [1 - 366]&lt;br /&gt;
start_dow()             Day of week (dow) from the start time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
start_year()            The year of the start time [0 - 9999]&lt;br /&gt;
start_month()           The month of the start time [1 - 12]&lt;br /&gt;
start_week()            Week of year of the start time [1 - 54]&lt;br /&gt;
start_day()             Day of month from the start time [1 - 31]&lt;br /&gt;
start_hour()            The hour of the start time [0 - 23]&lt;br /&gt;
start_minute()          The minute of the start time [0 - 59]&lt;br /&gt;
start_second()          The second of the start time [0 - 59]&lt;br /&gt;
end_doy()               Day of year (doy) from the end time [1 - 366]&lt;br /&gt;
end_dow()               Day of week (dow) from the end time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
end_year()              The year of the end time [0 - 9999]&lt;br /&gt;
end_month()             The month of the end time [1 - 12]&lt;br /&gt;
end_week()              Week of year of the end time [1 - 54]&lt;br /&gt;
end_day()               Day of month from the start time [1 - 31]&lt;br /&gt;
end_hour()              The hour of the end time [0 - 23]&lt;br /&gt;
end_minute()            The minute of the end time [0 - 59]&lt;br /&gt;
end_second()            The second of the end time [0 - 59]            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the number of maps in intervals can be computed and &lt;br /&gt;
used in conditional statements. &amp;lt;br&amp;gt;&lt;br /&gt;
The operator to count the number of maps &lt;br /&gt;
is the hash &amp;lt;b&amp;gt;#&amp;lt;/b&amp;gt;. &lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
A{contains,#}B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
This expression computes the number of maps from space &lt;br /&gt;
time dataset B which are during the time intervals of maps from &lt;br /&gt;
space time dataset A.&amp;lt;br&amp;gt;&lt;br /&gt;
A list of integers (scalars) corresponding to the maps of A &lt;br /&gt;
that contain maps from B will be returned. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore the temporal algebra allows temporal buffering, shifting &lt;br /&gt;
and snapping with the functions buff_t(), tshift() and tsnap()&lt;br /&gt;
respectively.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
buff_t(A, size)         Buffer STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tshift(A, size)         Shift STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tsnap(A)                Snap time instances and intervals of STDS A&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Examples&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which have equal time stamps &lt;br /&gt;
with space time dataset B and C and are ealier that Jan. 1. 2005 and &lt;br /&gt;
store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(start_date() &amp;lt; &amp;quot;2005-01-01&amp;quot;, A : B : C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which contains more than three&lt;br /&gt;
maps of space time dataset B, else select maps from C with time&lt;br /&gt;
stamps that are not equal to A and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(A {contain, #} B &amp;gt; 3, A {contain, :} B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset B which are during the temporal &lt;br /&gt;
buffered space time dataset A with a map interval of three days, else&lt;br /&gt;
select maps from C and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(contain, td(buff_t(A, &amp;quot;1 days&amp;quot;)) == 3, B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || in progress&lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 9 - 2012-07-26 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented functions for temporal operators into the temporal algebra.&lt;br /&gt;
* Finsihed the module t.select.&lt;br /&gt;
* Wrote the manual page for t.select.&lt;br /&gt;
* Started to implement vector operations into the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue documentation of the GRASS module t.select and the integration of the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 10 - 2012-08-02 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Fixed bugs in the temporal algebra.&lt;br /&gt;
* More testing of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the integration of the vector operations into the temporal vector algebra and write documentation and tests.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 11 - 2012-08-09 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Finished implementation of vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Integrated a new function to evaluate spatio-temporal operators with PLY.&lt;br /&gt;
* Worked on a lot minor fixes and tests.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Finish the the temporal vector algebra and write documentation. Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 12 - 2012-08-16 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Integrated buffer function into temporal vector algebra.&lt;br /&gt;
* Finished temporal vector algebra. &lt;br /&gt;
* Worked on documentation and examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write documentation and start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I travelled to Estonia for my PhD thesis, so I had limited time for my project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Week 13 - 2012-08-23 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Write tests and documentation for the temporal vector algebra.&lt;br /&gt;
* Fixed a lot of bugs in the temporal vector algebra.&lt;br /&gt;
* Worked on examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I was still busy with the temporal vector algebra this week. Some difficult and time intensive bugs prevent me from starting with the raster algebra.&lt;br /&gt;
&lt;br /&gt;
== Week 14 - 2012-08-30 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed some more bugs in the temporal vector algebra.&lt;br /&gt;
* Made some improvements to speed up the meta data analysis.&lt;br /&gt;
* Finished the temporal vector algebra.&lt;br /&gt;
* Started with the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occurred&lt;br /&gt;
&lt;br /&gt;
== Week 15 - 2012-09-06 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Worked on the temporal raster algebra.&lt;br /&gt;
* Implemented the lexical analysis for expressions.&lt;br /&gt;
* Added arithmetic operations to the temporal raster algebra.&lt;br /&gt;
* Rearrange the command list to work with r.mapcalc expression strings.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Occurring problems could be solved.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19687</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19687"/>
		<updated>2013-09-06T14:13:45Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= t.select =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
t.select performs selection of maps that are registered in space time datasets using temporal algebra.&lt;br /&gt;
&lt;br /&gt;
== Program Use ==&lt;br /&gt;
The module expects an &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; as input parameter in the following form: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; &amp;quot;result = expression&amp;quot; &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The statement structure is similar to r.mapcalc.&lt;br /&gt;
Where &amp;lt;b&amp;gt;result&amp;lt;/b&amp;gt; represents the name of a space time dataset (STDS)that will &lt;br /&gt;
contain the result of the calculation that is given as &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; &lt;br /&gt;
on the right side of the equality sign. &lt;br /&gt;
These expression can be any valid or nested combination of temporal &lt;br /&gt;
operations and functions that are provided by the temporal algebra.  &amp;lt;br&amp;gt;&lt;br /&gt;
The temporal algebra works with space time datasets of any type (STRDS, STR3DS and STVDS). &lt;br /&gt;
The algebra provides methods for map selection from STDS based on their temporal relations. &lt;br /&gt;
It is also possible to temporally shift maps, to create temporal buffer and to snap time &lt;br /&gt;
instances to create a valid temporal topology. Furthermore expressions can be nested and &lt;br /&gt;
evaluated in conditional statements (if, else statements). Within if-statements the algebra &lt;br /&gt;
provides temporal variables like start time, end time, day of year, time differences or &lt;br /&gt;
number of maps per time interval to build up conditions. These operations can be assigned &lt;br /&gt;
to space time datasets or to the results of operations between space time datasets. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The type of the input space time datasets must be defined with the input &lt;br /&gt;
parameter &amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt;. Possible options are STRDS, STVDS or STR3DS. &lt;br /&gt;
The default is set to space time raster datasets (STRDS).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As default, topological relationships between space time datasets will be &lt;br /&gt;
evaluated only temporal. Use the &amp;lt;b&amp;gt;s&amp;lt;/b&amp;gt; flag to activate the &lt;br /&gt;
additionally spatial topology evaluation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The expression option must be passed as &amp;lt;b&amp;gt;quoted&amp;lt;/b&amp;gt; &lt;br /&gt;
expression, for example: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;t.select expression=&amp;quot;C = A : B&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
Where &amp;lt;b&amp;gt;C&amp;lt;/b&amp;gt; is the new space time raster dataset that will contain maps&lt;br /&gt;
from &amp;lt;b&amp;gt;A&amp;lt;/b&amp;gt; that are selected by equal temporal relationships &lt;br /&gt;
to the existing dataset &amp;lt;b&amp;gt;B&amp;lt;/b&amp;gt; in this case. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Temporal Algebra for t.select==&lt;br /&gt;
The temporal algebra provides a wide range of temporal operators and &lt;br /&gt;
functions that will be presented in the following section. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal relations&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several temporal topology relations between space &lt;br /&gt;
time datasets are supported: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
equals            A ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
during            A  ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
contains          A ------&lt;br /&gt;
                  B  ---- &lt;br /&gt;
&lt;br /&gt;
starts            A ----&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
started           A ------&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
finishs           A   ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
finished          A ------&lt;br /&gt;
                  B   ----&lt;br /&gt;
&lt;br /&gt;
precedes          A ----&lt;br /&gt;
                  B     ----&lt;br /&gt;
&lt;br /&gt;
follows           A     ----&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
overlapped        A   ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
overlaps          A ------&lt;br /&gt;
                  B   ------&lt;br /&gt;
&lt;br /&gt;
over              booth overlaps and overlapped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The relations must be read as: A is related to B, like - A equals B - A is &lt;br /&gt;
during B - A contains B &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Topological relations must be specified in {} parentheses. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal selection&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The temporal selection simply selects parts of a space time dataset without &lt;br /&gt;
processing raster or vector data.&lt;br /&gt;
&lt;br /&gt;
The algebra provides a selection operator &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt; that selects parts &lt;br /&gt;
of a space time dataset that are temporally equal to parts of a second one &lt;br /&gt;
by default. The following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: Select all parts of space time dataset A that are equal to B and store &lt;br /&gt;
it in space time dataset C. The parts are in this case time stamped maps. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In addition the inverse selection operator &amp;lt;b&amp;gt;!:&amp;lt;/b&amp;gt; is defined as the complement of &lt;br /&gt;
the selection operator, hence the following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: select all parts of space time time dataset A that are not equal to B &lt;br /&gt;
and store it in space time dataset (STDS) C. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To select parts of a STDS by different topological relations to other STDS, &lt;br /&gt;
the temporal topology selection operator can be used. The operator consists of &lt;br /&gt;
topological relations, that must be separated by the logical OR operator &lt;br /&gt;
&amp;lt;b&amp;gt;||&amp;lt;/b&amp;gt; and the temporal selection operator. Both parts are separated by &lt;br /&gt;
comma and surrounded by curly braces: &lt;br /&gt;
{&amp;quot;topological relations&amp;quot;, &amp;quot;temporal selection operator&amp;quot;}  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals,:} B&lt;br /&gt;
C = A {equals,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
We can now define arbitrary topological relations using logical OR operator &lt;br /&gt;
to connect them:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals||during||overlaps,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Select all parts of A that are equal to B, during B or overlaps B. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The selection operator is implicitly contained in the temporal topology &lt;br /&gt;
selection operator, so that the following statements are exactly the same:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
C = A {:} B&lt;br /&gt;
C = A {equal,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same for the complementary selection:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
C = A {!:} B&lt;br /&gt;
C = A {equal,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Conditional statements&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selection operations can be evaluated within conditional statements.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Note A and B can either be space time datasets or expressions.&lt;br /&gt;
&lt;br /&gt;
if statement                         decision option                        temporal relations&lt;br /&gt;
  if(if, then, else)&lt;br /&gt;
  if(conditions, A)                    A if conditions are True;              temporal topological relation between if and then is equal.&lt;br /&gt;
  if(conditions, A, B)                 A if conditions are True, B otherwise; temporal topological relation between if, then and else is equal.&lt;br /&gt;
  if(topologies, conditions, A)        A if conditions are True;              temporal topological relation between if and then is explicit specified by topologies.&lt;br /&gt;
  if(topologies, conditions, A, B)     A if conditions are True, B otherwise; temporal topological relation between if, then and else is explicit specified by topologies.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The conditions are comparison expressions that are used to evaluate &lt;br /&gt;
space time datasets. Specific values of temporal variables are &lt;br /&gt;
compared by logical operators and evaluated for each map of the STDS.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The supported logical operators:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Symbol  description&lt;br /&gt;
&lt;br /&gt;
  ==    equal&lt;br /&gt;
  !=    not equal&lt;br /&gt;
  &amp;gt;     greater than&lt;br /&gt;
  &amp;gt;=    greater than or equal&lt;br /&gt;
  &amp;lt;     less than&lt;br /&gt;
  &amp;lt;=    less than or equal&lt;br /&gt;
  &amp;amp;&amp;amp;    and&lt;br /&gt;
  ||    or&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Temporal functions: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
td(A)                   Returns a list of time intervals of STDS A&lt;br /&gt;
&lt;br /&gt;
start_time()            Start time as HH::MM:SS&lt;br /&gt;
start_date()            Start date as yyyy-mm-DD&lt;br /&gt;
start_datetime()        Start datetime as yyyy-mm-DD HH:MM:SS&lt;br /&gt;
end_time()              End time as HH:MM:SS&lt;br /&gt;
end_date()              End date as yyyy-mm-DD&lt;br /&gt;
end_datetime()          End datetime as  yyyy-mm-DD HH:MM&lt;br /&gt;
&lt;br /&gt;
start_doy()             Day of year (doy) from the start time [1 - 366]&lt;br /&gt;
start_dow()             Day of week (dow) from the start time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
start_year()            The year of the start time [0 - 9999]&lt;br /&gt;
start_month()           The month of the start time [1 - 12]&lt;br /&gt;
start_week()            Week of year of the start time [1 - 54]&lt;br /&gt;
start_day()             Day of month from the start time [1 - 31]&lt;br /&gt;
start_hour()            The hour of the start time [0 - 23]&lt;br /&gt;
start_minute()          The minute of the start time [0 - 59]&lt;br /&gt;
start_second()          The second of the start time [0 - 59]&lt;br /&gt;
end_doy()               Day of year (doy) from the end time [1 - 366]&lt;br /&gt;
end_dow()               Day of week (dow) from the end time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
end_year()              The year of the end time [0 - 9999]&lt;br /&gt;
end_month()             The month of the end time [1 - 12]&lt;br /&gt;
end_week()              Week of year of the end time [1 - 54]&lt;br /&gt;
end_day()               Day of month from the start time [1 - 31]&lt;br /&gt;
end_hour()              The hour of the end time [0 - 23]&lt;br /&gt;
end_minute()            The minute of the end time [0 - 59]&lt;br /&gt;
end_second()            The second of the end time [0 - 59]            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the number of maps in intervals can be computed and &lt;br /&gt;
used in conditional statements. &amp;lt;br&amp;gt;&lt;br /&gt;
The operator to count the number of maps &lt;br /&gt;
is the hash &amp;lt;b&amp;gt;#&amp;lt;/b&amp;gt;. &lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
A{contains,#}B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
This expression computes the number of maps from space &lt;br /&gt;
time dataset B which are during the time intervals of maps from &lt;br /&gt;
space time dataset A.&amp;lt;br&amp;gt;&lt;br /&gt;
A list of integers (scalars) corresponding to the maps of A &lt;br /&gt;
that contain maps from B will be returned. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore the temporal algebra allows temporal buffering, shifting &lt;br /&gt;
and snapping with the functions buff_t(), tshift() and tsnap()&lt;br /&gt;
respectively.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
buff_t(A, size)         Buffer STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tshift(A, size)         Shift STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tsnap(A)                Snap time instances and intervals of STDS A&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Examples&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which have equal time stamps &lt;br /&gt;
with space time dataset B and C and are ealier that Jan. 1. 2005 and &lt;br /&gt;
store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(start_date() &amp;lt; &amp;quot;2005-01-01&amp;quot;, A : B : C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which contains more than three&lt;br /&gt;
maps of space time dataset B, else select maps from C with time&lt;br /&gt;
stamps that are not equal to A and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(A {contain, #} B &amp;gt; 3, A {contain, :} B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset B which are during the temporal &lt;br /&gt;
buffered space time dataset A with a map interval of three days, else&lt;br /&gt;
select maps from C and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(contain, td(buff_t(A, &amp;quot;1 days&amp;quot;)) == 3, B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || in progress&lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || in progress&lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || in progress&lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || in progress&lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 9 - 2012-07-26 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented functions for temporal operators into the temporal algebra.&lt;br /&gt;
* Finsihed the module t.select.&lt;br /&gt;
* Wrote the manual page for t.select.&lt;br /&gt;
* Started to implement vector operations into the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue documentation of the GRASS module t.select and the integration of the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 10 - 2012-08-02 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Fixed bugs in the temporal algebra.&lt;br /&gt;
* More testing of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the integration of the vector operations into the temporal vector algebra and write documentation and tests.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 11 - 2012-08-09 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Finished implementation of vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Integrated a new function to evaluate spatio-temporal operators with PLY.&lt;br /&gt;
* Worked on a lot minor fixes and tests.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Finish the the temporal vector algebra and write documentation. Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 12 - 2012-08-16 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Integrated buffer function into temporal vector algebra.&lt;br /&gt;
* Finished temporal vector algebra. &lt;br /&gt;
* Worked on documentation and examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write documentation and start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I travelled to Estonia for my PhD thesis, so I had limited time for my project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Week 13 - 2012-08-23 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Write tests and documentation for the temporal vector algebra.&lt;br /&gt;
* Fixed a lot of bugs in the temporal vector algebra.&lt;br /&gt;
* Worked on examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I was still busy with the temporal vector algebra this week. Some difficult and time intensive bugs prevent me from starting with the raster algebra.&lt;br /&gt;
&lt;br /&gt;
== Week 14 - 2012-08-30 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed some more bugs in the temporal vector algebra.&lt;br /&gt;
* Made some improvements to speed up the meta data analysis.&lt;br /&gt;
* Finished the temporal vector algebra.&lt;br /&gt;
* Started with the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occurred&lt;br /&gt;
&lt;br /&gt;
== Week 15 - 2012-09-06 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Worked on the temporal raster algebra.&lt;br /&gt;
* Implemented the lexical analysis for expressions.&lt;br /&gt;
* Added arithmetic operations to the temporal raster algebra.&lt;br /&gt;
* Rearrange the command list to work with r.mapcalc expression strings.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Occurring problems could be solved.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19686</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19686"/>
		<updated>2013-09-06T14:07:44Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Project plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= t.select =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
t.select performs selection of maps that are registered in space time datasets using temporal algebra.&lt;br /&gt;
&lt;br /&gt;
== Program Use ==&lt;br /&gt;
The module expects an &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; as input parameter in the following form: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; &amp;quot;result = expression&amp;quot; &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The statement structure is similar to r.mapcalc.&lt;br /&gt;
Where &amp;lt;b&amp;gt;result&amp;lt;/b&amp;gt; represents the name of a space time dataset (STDS)that will &lt;br /&gt;
contain the result of the calculation that is given as &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; &lt;br /&gt;
on the right side of the equality sign. &lt;br /&gt;
These expression can be any valid or nested combination of temporal &lt;br /&gt;
operations and functions that are provided by the temporal algebra.  &amp;lt;br&amp;gt;&lt;br /&gt;
The temporal algebra works with space time datasets of any type (STRDS, STR3DS and STVDS). &lt;br /&gt;
The algebra provides methods for map selection from STDS based on their temporal relations. &lt;br /&gt;
It is also possible to temporally shift maps, to create temporal buffer and to snap time &lt;br /&gt;
instances to create a valid temporal topology. Furthermore expressions can be nested and &lt;br /&gt;
evaluated in conditional statements (if, else statements). Within if-statements the algebra &lt;br /&gt;
provides temporal variables like start time, end time, day of year, time differences or &lt;br /&gt;
number of maps per time interval to build up conditions. These operations can be assigned &lt;br /&gt;
to space time datasets or to the results of operations between space time datasets. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The type of the input space time datasets must be defined with the input &lt;br /&gt;
parameter &amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt;. Possible options are STRDS, STVDS or STR3DS. &lt;br /&gt;
The default is set to space time raster datasets (STRDS).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As default, topological relationships between space time datasets will be &lt;br /&gt;
evaluated only temporal. Use the &amp;lt;b&amp;gt;s&amp;lt;/b&amp;gt; flag to activate the &lt;br /&gt;
additionally spatial topology evaluation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The expression option must be passed as &amp;lt;b&amp;gt;quoted&amp;lt;/b&amp;gt; &lt;br /&gt;
expression, for example: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;t.select expression=&amp;quot;C = A : B&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
Where &amp;lt;b&amp;gt;C&amp;lt;/b&amp;gt; is the new space time raster dataset that will contain maps&lt;br /&gt;
from &amp;lt;b&amp;gt;A&amp;lt;/b&amp;gt; that are selected by equal temporal relationships &lt;br /&gt;
to the existing dataset &amp;lt;b&amp;gt;B&amp;lt;/b&amp;gt; in this case. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Temporal Algebra for t.select==&lt;br /&gt;
The temporal algebra provides a wide range of temporal operators and &lt;br /&gt;
functions that will be presented in the following section. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal relations&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several temporal topology relations between space &lt;br /&gt;
time datasets are supported: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
equals            A ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
during            A  ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
contains          A ------&lt;br /&gt;
                  B  ---- &lt;br /&gt;
&lt;br /&gt;
starts            A ----&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
started           A ------&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
finishs           A   ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
finished          A ------&lt;br /&gt;
                  B   ----&lt;br /&gt;
&lt;br /&gt;
precedes          A ----&lt;br /&gt;
                  B     ----&lt;br /&gt;
&lt;br /&gt;
follows           A     ----&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
overlapped        A   ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
overlaps          A ------&lt;br /&gt;
                  B   ------&lt;br /&gt;
&lt;br /&gt;
over              booth overlaps and overlapped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The relations must be read as: A is related to B, like - A equals B - A is &lt;br /&gt;
during B - A contains B &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Topological relations must be specified in {} parentheses. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal selection&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The temporal selection simply selects parts of a space time dataset without &lt;br /&gt;
processing raster or vector data.&lt;br /&gt;
&lt;br /&gt;
The algebra provides a selection operator &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt; that selects parts &lt;br /&gt;
of a space time dataset that are temporally equal to parts of a second one &lt;br /&gt;
by default. The following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: Select all parts of space time dataset A that are equal to B and store &lt;br /&gt;
it in space time dataset C. The parts are in this case time stamped maps. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In addition the inverse selection operator &amp;lt;b&amp;gt;!:&amp;lt;/b&amp;gt; is defined as the complement of &lt;br /&gt;
the selection operator, hence the following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: select all parts of space time time dataset A that are not equal to B &lt;br /&gt;
and store it in space time dataset (STDS) C. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To select parts of a STDS by different topological relations to other STDS, &lt;br /&gt;
the temporal topology selection operator can be used. The operator consists of &lt;br /&gt;
topological relations, that must be separated by the logical OR operator &lt;br /&gt;
&amp;lt;b&amp;gt;||&amp;lt;/b&amp;gt; and the temporal selection operator. Both parts are separated by &lt;br /&gt;
comma and surrounded by curly braces: &lt;br /&gt;
{&amp;quot;topological relations&amp;quot;, &amp;quot;temporal selection operator&amp;quot;}  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals,:} B&lt;br /&gt;
C = A {equals,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
We can now define arbitrary topological relations using logical OR operator &lt;br /&gt;
to connect them:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals||during||overlaps,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Select all parts of A that are equal to B, during B or overlaps B. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The selection operator is implicitly contained in the temporal topology &lt;br /&gt;
selection operator, so that the following statements are exactly the same:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
C = A {:} B&lt;br /&gt;
C = A {equal,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same for the complementary selection:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
C = A {!:} B&lt;br /&gt;
C = A {equal,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Conditional statements&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selection operations can be evaluated within conditional statements.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Note A and B can either be space time datasets or expressions.&lt;br /&gt;
&lt;br /&gt;
if statement                         decision option                        temporal relations&lt;br /&gt;
  if(if, then, else)&lt;br /&gt;
  if(conditions, A)                    A if conditions are True;              temporal topological relation between if and then is equal.&lt;br /&gt;
  if(conditions, A, B)                 A if conditions are True, B otherwise; temporal topological relation between if, then and else is equal.&lt;br /&gt;
  if(topologies, conditions, A)        A if conditions are True;              temporal topological relation between if and then is explicit specified by topologies.&lt;br /&gt;
  if(topologies, conditions, A, B)     A if conditions are True, B otherwise; temporal topological relation between if, then and else is explicit specified by topologies.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The conditions are comparison expressions that are used to evaluate &lt;br /&gt;
space time datasets. Specific values of temporal variables are &lt;br /&gt;
compared by logical operators and evaluated for each map of the STDS.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The supported logical operators:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Symbol  description&lt;br /&gt;
&lt;br /&gt;
  ==    equal&lt;br /&gt;
  !=    not equal&lt;br /&gt;
  &amp;gt;     greater than&lt;br /&gt;
  &amp;gt;=    greater than or equal&lt;br /&gt;
  &amp;lt;     less than&lt;br /&gt;
  &amp;lt;=    less than or equal&lt;br /&gt;
  &amp;amp;&amp;amp;    and&lt;br /&gt;
  ||    or&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Temporal functions: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
td(A)                   Returns a list of time intervals of STDS A&lt;br /&gt;
&lt;br /&gt;
start_time()            Start time as HH::MM:SS&lt;br /&gt;
start_date()            Start date as yyyy-mm-DD&lt;br /&gt;
start_datetime()        Start datetime as yyyy-mm-DD HH:MM:SS&lt;br /&gt;
end_time()              End time as HH:MM:SS&lt;br /&gt;
end_date()              End date as yyyy-mm-DD&lt;br /&gt;
end_datetime()          End datetime as  yyyy-mm-DD HH:MM&lt;br /&gt;
&lt;br /&gt;
start_doy()             Day of year (doy) from the start time [1 - 366]&lt;br /&gt;
start_dow()             Day of week (dow) from the start time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
start_year()            The year of the start time [0 - 9999]&lt;br /&gt;
start_month()           The month of the start time [1 - 12]&lt;br /&gt;
start_week()            Week of year of the start time [1 - 54]&lt;br /&gt;
start_day()             Day of month from the start time [1 - 31]&lt;br /&gt;
start_hour()            The hour of the start time [0 - 23]&lt;br /&gt;
start_minute()          The minute of the start time [0 - 59]&lt;br /&gt;
start_second()          The second of the start time [0 - 59]&lt;br /&gt;
end_doy()               Day of year (doy) from the end time [1 - 366]&lt;br /&gt;
end_dow()               Day of week (dow) from the end time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
end_year()              The year of the end time [0 - 9999]&lt;br /&gt;
end_month()             The month of the end time [1 - 12]&lt;br /&gt;
end_week()              Week of year of the end time [1 - 54]&lt;br /&gt;
end_day()               Day of month from the start time [1 - 31]&lt;br /&gt;
end_hour()              The hour of the end time [0 - 23]&lt;br /&gt;
end_minute()            The minute of the end time [0 - 59]&lt;br /&gt;
end_second()            The second of the end time [0 - 59]            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the number of maps in intervals can be computed and &lt;br /&gt;
used in conditional statements. &amp;lt;br&amp;gt;&lt;br /&gt;
The operator to count the number of maps &lt;br /&gt;
is the hash &amp;lt;b&amp;gt;#&amp;lt;/b&amp;gt;. &lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
A{contains,#}B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
This expression computes the number of maps from space &lt;br /&gt;
time dataset B which are during the time intervals of maps from &lt;br /&gt;
space time dataset A.&amp;lt;br&amp;gt;&lt;br /&gt;
A list of integers (scalars) corresponding to the maps of A &lt;br /&gt;
that contain maps from B will be returned. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore the temporal algebra allows temporal buffering, shifting &lt;br /&gt;
and snapping with the functions buff_t(), tshift() and tsnap()&lt;br /&gt;
respectively.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
buff_t(A, size)         Buffer STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tshift(A, size)         Shift STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tsnap(A)                Snap time instances and intervals of STDS A&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Examples&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which have equal time stamps &lt;br /&gt;
with space time dataset B and C and are ealier that Jan. 1. 2005 and &lt;br /&gt;
store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(start_date() &amp;lt; &amp;quot;2005-01-01&amp;quot;, A : B : C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which contains more than three&lt;br /&gt;
maps of space time dataset B, else select maps from C with time&lt;br /&gt;
stamps that are not equal to A and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(A {contain, #} B &amp;gt; 3, A {contain, :} B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset B which are during the temporal &lt;br /&gt;
buffered space time dataset A with a map interval of three days, else&lt;br /&gt;
select maps from C and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(contain, td(buff_t(A, &amp;quot;1 days&amp;quot;)) == 3, B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || in progress&lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || in progress&lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || in progress&lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || in progress&lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 9 - 2012-07-26 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented functions for temporal operators into the temporal algebra.&lt;br /&gt;
* Finsihed the module t.select.&lt;br /&gt;
* Wrote the manual page for t.select.&lt;br /&gt;
* Started to implement vector operations into the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue documentation of the GRASS module t.select and the integration of the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 10 - 2012-08-02 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Fixed bugs in the temporal algebra.&lt;br /&gt;
* More testing of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the integration of the vector operations into the temporal vector algebra and write documentation and tests.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 11 - 2012-08-09 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Finished implementation of vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Integrated a new function to evaluate spatio-temporal operators with PLY.&lt;br /&gt;
* Worked on a lot minor fixes and tests.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Finish the the temporal vector algebra and write documentation. Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 12 - 2012-08-16 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Integrated buffer function into temporal vector algebra.&lt;br /&gt;
* Finished temporal vector algebra. &lt;br /&gt;
* Worked on documentation and examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write documentation and start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I travelled to Estonia for my PhD thesis, so I had limited time for my project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Week 13 - 2012-08-23 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Write tests and documentation for the temporal vector algebra.&lt;br /&gt;
* Fixed a lot of bugs in the temporal vector algebra.&lt;br /&gt;
* Worked on examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I was still busy with the temporal vector algebra this week. Some difficult and time intensive bugs prevent me from starting with the raster algebra.&lt;br /&gt;
&lt;br /&gt;
== Week 14 - 2012-08-30 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed some more bugs in the temporal vector algebra.&lt;br /&gt;
* Made some improvements to speed up the meta data analysis.&lt;br /&gt;
* Finished the temporal vector algebra.&lt;br /&gt;
* Started with the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occurred,&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19663</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19663"/>
		<updated>2013-08-30T14:38:07Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= t.select =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
t.select performs selection of maps that are registered in space time datasets using temporal algebra.&lt;br /&gt;
&lt;br /&gt;
== Program Use ==&lt;br /&gt;
The module expects an &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; as input parameter in the following form: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; &amp;quot;result = expression&amp;quot; &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The statement structure is similar to r.mapcalc.&lt;br /&gt;
Where &amp;lt;b&amp;gt;result&amp;lt;/b&amp;gt; represents the name of a space time dataset (STDS)that will &lt;br /&gt;
contain the result of the calculation that is given as &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; &lt;br /&gt;
on the right side of the equality sign. &lt;br /&gt;
These expression can be any valid or nested combination of temporal &lt;br /&gt;
operations and functions that are provided by the temporal algebra.  &amp;lt;br&amp;gt;&lt;br /&gt;
The temporal algebra works with space time datasets of any type (STRDS, STR3DS and STVDS). &lt;br /&gt;
The algebra provides methods for map selection from STDS based on their temporal relations. &lt;br /&gt;
It is also possible to temporally shift maps, to create temporal buffer and to snap time &lt;br /&gt;
instances to create a valid temporal topology. Furthermore expressions can be nested and &lt;br /&gt;
evaluated in conditional statements (if, else statements). Within if-statements the algebra &lt;br /&gt;
provides temporal variables like start time, end time, day of year, time differences or &lt;br /&gt;
number of maps per time interval to build up conditions. These operations can be assigned &lt;br /&gt;
to space time datasets or to the results of operations between space time datasets. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The type of the input space time datasets must be defined with the input &lt;br /&gt;
parameter &amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt;. Possible options are STRDS, STVDS or STR3DS. &lt;br /&gt;
The default is set to space time raster datasets (STRDS).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As default, topological relationships between space time datasets will be &lt;br /&gt;
evaluated only temporal. Use the &amp;lt;b&amp;gt;s&amp;lt;/b&amp;gt; flag to activate the &lt;br /&gt;
additionally spatial topology evaluation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The expression option must be passed as &amp;lt;b&amp;gt;quoted&amp;lt;/b&amp;gt; &lt;br /&gt;
expression, for example: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;t.select expression=&amp;quot;C = A : B&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
Where &amp;lt;b&amp;gt;C&amp;lt;/b&amp;gt; is the new space time raster dataset that will contain maps&lt;br /&gt;
from &amp;lt;b&amp;gt;A&amp;lt;/b&amp;gt; that are selected by equal temporal relationships &lt;br /&gt;
to the existing dataset &amp;lt;b&amp;gt;B&amp;lt;/b&amp;gt; in this case. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Temporal Algebra for t.select==&lt;br /&gt;
The temporal algebra provides a wide range of temporal operators and &lt;br /&gt;
functions that will be presented in the following section. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal relations&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several temporal topology relations between space &lt;br /&gt;
time datasets are supported: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
equals            A ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
during            A  ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
contains          A ------&lt;br /&gt;
                  B  ---- &lt;br /&gt;
&lt;br /&gt;
starts            A ----&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
started           A ------&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
finishs           A   ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
finished          A ------&lt;br /&gt;
                  B   ----&lt;br /&gt;
&lt;br /&gt;
precedes          A ----&lt;br /&gt;
                  B     ----&lt;br /&gt;
&lt;br /&gt;
follows           A     ----&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
overlapped        A   ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
overlaps          A ------&lt;br /&gt;
                  B   ------&lt;br /&gt;
&lt;br /&gt;
over              booth overlaps and overlapped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The relations must be read as: A is related to B, like - A equals B - A is &lt;br /&gt;
during B - A contains B &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Topological relations must be specified in {} parentheses. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal selection&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The temporal selection simply selects parts of a space time dataset without &lt;br /&gt;
processing raster or vector data.&lt;br /&gt;
&lt;br /&gt;
The algebra provides a selection operator &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt; that selects parts &lt;br /&gt;
of a space time dataset that are temporally equal to parts of a second one &lt;br /&gt;
by default. The following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: Select all parts of space time dataset A that are equal to B and store &lt;br /&gt;
it in space time dataset C. The parts are in this case time stamped maps. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In addition the inverse selection operator &amp;lt;b&amp;gt;!:&amp;lt;/b&amp;gt; is defined as the complement of &lt;br /&gt;
the selection operator, hence the following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: select all parts of space time time dataset A that are not equal to B &lt;br /&gt;
and store it in space time dataset (STDS) C. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To select parts of a STDS by different topological relations to other STDS, &lt;br /&gt;
the temporal topology selection operator can be used. The operator consists of &lt;br /&gt;
topological relations, that must be separated by the logical OR operator &lt;br /&gt;
&amp;lt;b&amp;gt;||&amp;lt;/b&amp;gt; and the temporal selection operator. Both parts are separated by &lt;br /&gt;
comma and surrounded by curly braces: &lt;br /&gt;
{&amp;quot;topological relations&amp;quot;, &amp;quot;temporal selection operator&amp;quot;}  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals,:} B&lt;br /&gt;
C = A {equals,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
We can now define arbitrary topological relations using logical OR operator &lt;br /&gt;
to connect them:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals||during||overlaps,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Select all parts of A that are equal to B, during B or overlaps B. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The selection operator is implicitly contained in the temporal topology &lt;br /&gt;
selection operator, so that the following statements are exactly the same:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
C = A {:} B&lt;br /&gt;
C = A {equal,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same for the complementary selection:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
C = A {!:} B&lt;br /&gt;
C = A {equal,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Conditional statements&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selection operations can be evaluated within conditional statements.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Note A and B can either be space time datasets or expressions.&lt;br /&gt;
&lt;br /&gt;
if statement                         decision option                        temporal relations&lt;br /&gt;
  if(if, then, else)&lt;br /&gt;
  if(conditions, A)                    A if conditions are True;              temporal topological relation between if and then is equal.&lt;br /&gt;
  if(conditions, A, B)                 A if conditions are True, B otherwise; temporal topological relation between if, then and else is equal.&lt;br /&gt;
  if(topologies, conditions, A)        A if conditions are True;              temporal topological relation between if and then is explicit specified by topologies.&lt;br /&gt;
  if(topologies, conditions, A, B)     A if conditions are True, B otherwise; temporal topological relation between if, then and else is explicit specified by topologies.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The conditions are comparison expressions that are used to evaluate &lt;br /&gt;
space time datasets. Specific values of temporal variables are &lt;br /&gt;
compared by logical operators and evaluated for each map of the STDS.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The supported logical operators:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Symbol  description&lt;br /&gt;
&lt;br /&gt;
  ==    equal&lt;br /&gt;
  !=    not equal&lt;br /&gt;
  &amp;gt;     greater than&lt;br /&gt;
  &amp;gt;=    greater than or equal&lt;br /&gt;
  &amp;lt;     less than&lt;br /&gt;
  &amp;lt;=    less than or equal&lt;br /&gt;
  &amp;amp;&amp;amp;    and&lt;br /&gt;
  ||    or&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Temporal functions: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
td(A)                   Returns a list of time intervals of STDS A&lt;br /&gt;
&lt;br /&gt;
start_time()            Start time as HH::MM:SS&lt;br /&gt;
start_date()            Start date as yyyy-mm-DD&lt;br /&gt;
start_datetime()        Start datetime as yyyy-mm-DD HH:MM:SS&lt;br /&gt;
end_time()              End time as HH:MM:SS&lt;br /&gt;
end_date()              End date as yyyy-mm-DD&lt;br /&gt;
end_datetime()          End datetime as  yyyy-mm-DD HH:MM&lt;br /&gt;
&lt;br /&gt;
start_doy()             Day of year (doy) from the start time [1 - 366]&lt;br /&gt;
start_dow()             Day of week (dow) from the start time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
start_year()            The year of the start time [0 - 9999]&lt;br /&gt;
start_month()           The month of the start time [1 - 12]&lt;br /&gt;
start_week()            Week of year of the start time [1 - 54]&lt;br /&gt;
start_day()             Day of month from the start time [1 - 31]&lt;br /&gt;
start_hour()            The hour of the start time [0 - 23]&lt;br /&gt;
start_minute()          The minute of the start time [0 - 59]&lt;br /&gt;
start_second()          The second of the start time [0 - 59]&lt;br /&gt;
end_doy()               Day of year (doy) from the end time [1 - 366]&lt;br /&gt;
end_dow()               Day of week (dow) from the end time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
end_year()              The year of the end time [0 - 9999]&lt;br /&gt;
end_month()             The month of the end time [1 - 12]&lt;br /&gt;
end_week()              Week of year of the end time [1 - 54]&lt;br /&gt;
end_day()               Day of month from the start time [1 - 31]&lt;br /&gt;
end_hour()              The hour of the end time [0 - 23]&lt;br /&gt;
end_minute()            The minute of the end time [0 - 59]&lt;br /&gt;
end_second()            The second of the end time [0 - 59]            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the number of maps in intervals can be computed and &lt;br /&gt;
used in conditional statements. &amp;lt;br&amp;gt;&lt;br /&gt;
The operator to count the number of maps &lt;br /&gt;
is the hash &amp;lt;b&amp;gt;#&amp;lt;/b&amp;gt;. &lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
A{contains,#}B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
This expression computes the number of maps from space &lt;br /&gt;
time dataset B which are during the time intervals of maps from &lt;br /&gt;
space time dataset A.&amp;lt;br&amp;gt;&lt;br /&gt;
A list of integers (scalars) corresponding to the maps of A &lt;br /&gt;
that contain maps from B will be returned. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore the temporal algebra allows temporal buffering, shifting &lt;br /&gt;
and snapping with the functions buff_t(), tshift() and tsnap()&lt;br /&gt;
respectively.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
buff_t(A, size)         Buffer STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tshift(A, size)         Shift STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tsnap(A)                Snap time instances and intervals of STDS A&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Examples&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which have equal time stamps &lt;br /&gt;
with space time dataset B and C and are ealier that Jan. 1. 2005 and &lt;br /&gt;
store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(start_date() &amp;lt; &amp;quot;2005-01-01&amp;quot;, A : B : C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which contains more than three&lt;br /&gt;
maps of space time dataset B, else select maps from C with time&lt;br /&gt;
stamps that are not equal to A and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(A {contain, #} B &amp;gt; 3, A {contain, :} B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset B which are during the temporal &lt;br /&gt;
buffered space time dataset A with a map interval of three days, else&lt;br /&gt;
select maps from C and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(contain, td(buff_t(A, &amp;quot;1 days&amp;quot;)) == 3, B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| in progress&lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 9 - 2012-07-26 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented functions for temporal operators into the temporal algebra.&lt;br /&gt;
* Finsihed the module t.select.&lt;br /&gt;
* Wrote the manual page for t.select.&lt;br /&gt;
* Started to implement vector operations into the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue documentation of the GRASS module t.select and the integration of the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 10 - 2012-08-02 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Fixed bugs in the temporal algebra.&lt;br /&gt;
* More testing of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the integration of the vector operations into the temporal vector algebra and write documentation and tests.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 11 - 2012-08-09 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Finished implementation of vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Integrated a new function to evaluate spatio-temporal operators with PLY.&lt;br /&gt;
* Worked on a lot minor fixes and tests.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Finish the the temporal vector algebra and write documentation. Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 12 - 2012-08-16 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Integrated buffer function into temporal vector algebra.&lt;br /&gt;
* Finished temporal vector algebra. &lt;br /&gt;
* Worked on documentation and examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write documentation and start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I travelled to Estonia for my PhD thesis, so I had limited time for my project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Week 13 - 2012-08-23 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Write tests and documentation for the temporal vector algebra.&lt;br /&gt;
* Fixed a lot of bugs in the temporal vector algebra.&lt;br /&gt;
* Worked on examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I was still busy with the temporal vector algebra this week. Some difficult and time intensive bugs prevent me from starting with the raster algebra.&lt;br /&gt;
&lt;br /&gt;
== Week 14 - 2012-08-30 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed some more bugs in the temporal vector algebra.&lt;br /&gt;
* Made some improvements to speed up the meta data analysis.&lt;br /&gt;
* Finished the temporal vector algebra.&lt;br /&gt;
* Started with the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occurred,&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19653</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19653"/>
		<updated>2013-08-23T17:08:06Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= t.select =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
t.select performs selection of maps that are registered in space time datasets using temporal algebra.&lt;br /&gt;
&lt;br /&gt;
== Program Use ==&lt;br /&gt;
The module expects an &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; as input parameter in the following form: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; &amp;quot;result = expression&amp;quot; &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The statement structure is similar to r.mapcalc.&lt;br /&gt;
Where &amp;lt;b&amp;gt;result&amp;lt;/b&amp;gt; represents the name of a space time dataset (STDS)that will &lt;br /&gt;
contain the result of the calculation that is given as &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; &lt;br /&gt;
on the right side of the equality sign. &lt;br /&gt;
These expression can be any valid or nested combination of temporal &lt;br /&gt;
operations and functions that are provided by the temporal algebra.  &amp;lt;br&amp;gt;&lt;br /&gt;
The temporal algebra works with space time datasets of any type (STRDS, STR3DS and STVDS). &lt;br /&gt;
The algebra provides methods for map selection from STDS based on their temporal relations. &lt;br /&gt;
It is also possible to temporally shift maps, to create temporal buffer and to snap time &lt;br /&gt;
instances to create a valid temporal topology. Furthermore expressions can be nested and &lt;br /&gt;
evaluated in conditional statements (if, else statements). Within if-statements the algebra &lt;br /&gt;
provides temporal variables like start time, end time, day of year, time differences or &lt;br /&gt;
number of maps per time interval to build up conditions. These operations can be assigned &lt;br /&gt;
to space time datasets or to the results of operations between space time datasets. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The type of the input space time datasets must be defined with the input &lt;br /&gt;
parameter &amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt;. Possible options are STRDS, STVDS or STR3DS. &lt;br /&gt;
The default is set to space time raster datasets (STRDS).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As default, topological relationships between space time datasets will be &lt;br /&gt;
evaluated only temporal. Use the &amp;lt;b&amp;gt;s&amp;lt;/b&amp;gt; flag to activate the &lt;br /&gt;
additionally spatial topology evaluation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The expression option must be passed as &amp;lt;b&amp;gt;quoted&amp;lt;/b&amp;gt; &lt;br /&gt;
expression, for example: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;t.select expression=&amp;quot;C = A : B&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
Where &amp;lt;b&amp;gt;C&amp;lt;/b&amp;gt; is the new space time raster dataset that will contain maps&lt;br /&gt;
from &amp;lt;b&amp;gt;A&amp;lt;/b&amp;gt; that are selected by equal temporal relationships &lt;br /&gt;
to the existing dataset &amp;lt;b&amp;gt;B&amp;lt;/b&amp;gt; in this case. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Temporal Algebra for t.select==&lt;br /&gt;
The temporal algebra provides a wide range of temporal operators and &lt;br /&gt;
functions that will be presented in the following section. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal relations&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several temporal topology relations between space &lt;br /&gt;
time datasets are supported: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
equals            A ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
during            A  ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
contains          A ------&lt;br /&gt;
                  B  ---- &lt;br /&gt;
&lt;br /&gt;
starts            A ----&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
started           A ------&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
finishs           A   ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
finished          A ------&lt;br /&gt;
                  B   ----&lt;br /&gt;
&lt;br /&gt;
precedes          A ----&lt;br /&gt;
                  B     ----&lt;br /&gt;
&lt;br /&gt;
follows           A     ----&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
overlapped        A   ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
overlaps          A ------&lt;br /&gt;
                  B   ------&lt;br /&gt;
&lt;br /&gt;
over              booth overlaps and overlapped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The relations must be read as: A is related to B, like - A equals B - A is &lt;br /&gt;
during B - A contains B &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Topological relations must be specified in {} parentheses. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal selection&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The temporal selection simply selects parts of a space time dataset without &lt;br /&gt;
processing raster or vector data.&lt;br /&gt;
&lt;br /&gt;
The algebra provides a selection operator &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt; that selects parts &lt;br /&gt;
of a space time dataset that are temporally equal to parts of a second one &lt;br /&gt;
by default. The following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: Select all parts of space time dataset A that are equal to B and store &lt;br /&gt;
it in space time dataset C. The parts are in this case time stamped maps. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In addition the inverse selection operator &amp;lt;b&amp;gt;!:&amp;lt;/b&amp;gt; is defined as the complement of &lt;br /&gt;
the selection operator, hence the following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: select all parts of space time time dataset A that are not equal to B &lt;br /&gt;
and store it in space time dataset (STDS) C. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To select parts of a STDS by different topological relations to other STDS, &lt;br /&gt;
the temporal topology selection operator can be used. The operator consists of &lt;br /&gt;
topological relations, that must be separated by the logical OR operator &lt;br /&gt;
&amp;lt;b&amp;gt;||&amp;lt;/b&amp;gt; and the temporal selection operator. Both parts are separated by &lt;br /&gt;
comma and surrounded by curly braces: &lt;br /&gt;
{&amp;quot;topological relations&amp;quot;, &amp;quot;temporal selection operator&amp;quot;}  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals,:} B&lt;br /&gt;
C = A {equals,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
We can now define arbitrary topological relations using logical OR operator &lt;br /&gt;
to connect them:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals||during||overlaps,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Select all parts of A that are equal to B, during B or overlaps B. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The selection operator is implicitly contained in the temporal topology &lt;br /&gt;
selection operator, so that the following statements are exactly the same:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
C = A {:} B&lt;br /&gt;
C = A {equal,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same for the complementary selection:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
C = A {!:} B&lt;br /&gt;
C = A {equal,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Conditional statements&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selection operations can be evaluated within conditional statements.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Note A and B can either be space time datasets or expressions.&lt;br /&gt;
&lt;br /&gt;
if statement                         decision option                        temporal relations&lt;br /&gt;
  if(if, then, else)&lt;br /&gt;
  if(conditions, A)                    A if conditions are True;              temporal topological relation between if and then is equal.&lt;br /&gt;
  if(conditions, A, B)                 A if conditions are True, B otherwise; temporal topological relation between if, then and else is equal.&lt;br /&gt;
  if(topologies, conditions, A)        A if conditions are True;              temporal topological relation between if and then is explicit specified by topologies.&lt;br /&gt;
  if(topologies, conditions, A, B)     A if conditions are True, B otherwise; temporal topological relation between if, then and else is explicit specified by topologies.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The conditions are comparison expressions that are used to evaluate &lt;br /&gt;
space time datasets. Specific values of temporal variables are &lt;br /&gt;
compared by logical operators and evaluated for each map of the STDS.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The supported logical operators:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Symbol  description&lt;br /&gt;
&lt;br /&gt;
  ==    equal&lt;br /&gt;
  !=    not equal&lt;br /&gt;
  &amp;gt;     greater than&lt;br /&gt;
  &amp;gt;=    greater than or equal&lt;br /&gt;
  &amp;lt;     less than&lt;br /&gt;
  &amp;lt;=    less than or equal&lt;br /&gt;
  &amp;amp;&amp;amp;    and&lt;br /&gt;
  ||    or&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Temporal functions: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
td(A)                   Returns a list of time intervals of STDS A&lt;br /&gt;
&lt;br /&gt;
start_time()            Start time as HH::MM:SS&lt;br /&gt;
start_date()            Start date as yyyy-mm-DD&lt;br /&gt;
start_datetime()        Start datetime as yyyy-mm-DD HH:MM:SS&lt;br /&gt;
end_time()              End time as HH:MM:SS&lt;br /&gt;
end_date()              End date as yyyy-mm-DD&lt;br /&gt;
end_datetime()          End datetime as  yyyy-mm-DD HH:MM&lt;br /&gt;
&lt;br /&gt;
start_doy()             Day of year (doy) from the start time [1 - 366]&lt;br /&gt;
start_dow()             Day of week (dow) from the start time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
start_year()            The year of the start time [0 - 9999]&lt;br /&gt;
start_month()           The month of the start time [1 - 12]&lt;br /&gt;
start_week()            Week of year of the start time [1 - 54]&lt;br /&gt;
start_day()             Day of month from the start time [1 - 31]&lt;br /&gt;
start_hour()            The hour of the start time [0 - 23]&lt;br /&gt;
start_minute()          The minute of the start time [0 - 59]&lt;br /&gt;
start_second()          The second of the start time [0 - 59]&lt;br /&gt;
end_doy()               Day of year (doy) from the end time [1 - 366]&lt;br /&gt;
end_dow()               Day of week (dow) from the end time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
end_year()              The year of the end time [0 - 9999]&lt;br /&gt;
end_month()             The month of the end time [1 - 12]&lt;br /&gt;
end_week()              Week of year of the end time [1 - 54]&lt;br /&gt;
end_day()               Day of month from the start time [1 - 31]&lt;br /&gt;
end_hour()              The hour of the end time [0 - 23]&lt;br /&gt;
end_minute()            The minute of the end time [0 - 59]&lt;br /&gt;
end_second()            The second of the end time [0 - 59]            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the number of maps in intervals can be computed and &lt;br /&gt;
used in conditional statements. &amp;lt;br&amp;gt;&lt;br /&gt;
The operator to count the number of maps &lt;br /&gt;
is the hash &amp;lt;b&amp;gt;#&amp;lt;/b&amp;gt;. &lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
A{contains,#}B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
This expression computes the number of maps from space &lt;br /&gt;
time dataset B which are during the time intervals of maps from &lt;br /&gt;
space time dataset A.&amp;lt;br&amp;gt;&lt;br /&gt;
A list of integers (scalars) corresponding to the maps of A &lt;br /&gt;
that contain maps from B will be returned. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore the temporal algebra allows temporal buffering, shifting &lt;br /&gt;
and snapping with the functions buff_t(), tshift() and tsnap()&lt;br /&gt;
respectively.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
buff_t(A, size)         Buffer STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tshift(A, size)         Shift STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tsnap(A)                Snap time instances and intervals of STDS A&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Examples&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which have equal time stamps &lt;br /&gt;
with space time dataset B and C and are ealier that Jan. 1. 2005 and &lt;br /&gt;
store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(start_date() &amp;lt; &amp;quot;2005-01-01&amp;quot;, A : B : C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which contains more than three&lt;br /&gt;
maps of space time dataset B, else select maps from C with time&lt;br /&gt;
stamps that are not equal to A and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(A {contain, #} B &amp;gt; 3, A {contain, :} B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset B which are during the temporal &lt;br /&gt;
buffered space time dataset A with a map interval of three days, else&lt;br /&gt;
select maps from C and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(contain, td(buff_t(A, &amp;quot;1 days&amp;quot;)) == 3, B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| in progress&lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 9 - 2012-07-26 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented functions for temporal operators into the temporal algebra.&lt;br /&gt;
* Finsihed the module t.select.&lt;br /&gt;
* Wrote the manual page for t.select.&lt;br /&gt;
* Started to implement vector operations into the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue documentation of the GRASS module t.select and the integration of the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 10 - 2012-08-02 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Fixed bugs in the temporal algebra.&lt;br /&gt;
* More testing of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the integration of the vector operations into the temporal vector algebra and write documentation and tests.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 11 - 2012-08-09 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Finished implementation of vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Integrated a new function to evaluate spatio-temporal operators with PLY.&lt;br /&gt;
* Worked on a lot minor fixes and tests.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Finish the the temporal vector algebra and write documentation. Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 12 - 2012-08-16 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Integrated buffer function into temporal vector algebra.&lt;br /&gt;
* Finished temporal vector algebra. &lt;br /&gt;
* Worked on documentation and examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write documentation and start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I travelled to Estonia for my PhD thesis, so I had limited time for my project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Week 13 - 2012-08-23 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Write tests and documentation for the temporal vector algebra.&lt;br /&gt;
* Fixed a lot of bugs in the temporal vector algebra.&lt;br /&gt;
* Worked on examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I was still busy with the temporal vector algebra this week. Some difficult and time intensive bugs prevent me from starting with the raster algebra.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19651</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19651"/>
		<updated>2013-08-20T07:01:16Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= t.select =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
t.select performs selection of maps that are registered in space time datasets using temporal algebra.&lt;br /&gt;
&lt;br /&gt;
== Program Use ==&lt;br /&gt;
The module expects an &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; as input parameter in the following form: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; &amp;quot;result = expression&amp;quot; &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The statement structure is similar to r.mapcalc.&lt;br /&gt;
Where &amp;lt;b&amp;gt;result&amp;lt;/b&amp;gt; represents the name of a space time dataset (STDS)that will &lt;br /&gt;
contain the result of the calculation that is given as &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; &lt;br /&gt;
on the right side of the equality sign. &lt;br /&gt;
These expression can be any valid or nested combination of temporal &lt;br /&gt;
operations and functions that are provided by the temporal algebra.  &amp;lt;br&amp;gt;&lt;br /&gt;
The temporal algebra works with space time datasets of any type (STRDS, STR3DS and STVDS). &lt;br /&gt;
The algebra provides methods for map selection from STDS based on their temporal relations. &lt;br /&gt;
It is also possible to temporally shift maps, to create temporal buffer and to snap time &lt;br /&gt;
instances to create a valid temporal topology. Furthermore expressions can be nested and &lt;br /&gt;
evaluated in conditional statements (if, else statements). Within if-statements the algebra &lt;br /&gt;
provides temporal variables like start time, end time, day of year, time differences or &lt;br /&gt;
number of maps per time interval to build up conditions. These operations can be assigned &lt;br /&gt;
to space time datasets or to the results of operations between space time datasets. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The type of the input space time datasets must be defined with the input &lt;br /&gt;
parameter &amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt;. Possible options are STRDS, STVDS or STR3DS. &lt;br /&gt;
The default is set to space time raster datasets (STRDS).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As default, topological relationships between space time datasets will be &lt;br /&gt;
evaluated only temporal. Use the &amp;lt;b&amp;gt;s&amp;lt;/b&amp;gt; flag to activate the &lt;br /&gt;
additionally spatial topology evaluation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The expression option must be passed as &amp;lt;b&amp;gt;quoted&amp;lt;/b&amp;gt; &lt;br /&gt;
expression, for example: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;t.select expression=&amp;quot;C = A : B&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
Where &amp;lt;b&amp;gt;C&amp;lt;/b&amp;gt; is the new space time raster dataset that will contain maps&lt;br /&gt;
from &amp;lt;b&amp;gt;A&amp;lt;/b&amp;gt; that are selected by equal temporal relationships &lt;br /&gt;
to the existing dataset &amp;lt;b&amp;gt;B&amp;lt;/b&amp;gt; in this case. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Temporal Algebra for t.select==&lt;br /&gt;
The temporal algebra provides a wide range of temporal operators and &lt;br /&gt;
functions that will be presented in the following section. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal relations&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several temporal topology relations between space &lt;br /&gt;
time datasets are supported: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
equals            A ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
during            A  ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
contains          A ------&lt;br /&gt;
                  B  ---- &lt;br /&gt;
&lt;br /&gt;
starts            A ----&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
started           A ------&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
finishs           A   ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
finished          A ------&lt;br /&gt;
                  B   ----&lt;br /&gt;
&lt;br /&gt;
precedes          A ----&lt;br /&gt;
                  B     ----&lt;br /&gt;
&lt;br /&gt;
follows           A     ----&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
overlapped        A   ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
overlaps          A ------&lt;br /&gt;
                  B   ------&lt;br /&gt;
&lt;br /&gt;
over              booth overlaps and overlapped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The relations must be read as: A is related to B, like - A equals B - A is &lt;br /&gt;
during B - A contains B &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Topological relations must be specified in {} parentheses. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal selection&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The temporal selection simply selects parts of a space time dataset without &lt;br /&gt;
processing raster or vector data.&lt;br /&gt;
&lt;br /&gt;
The algebra provides a selection operator &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt; that selects parts &lt;br /&gt;
of a space time dataset that are temporally equal to parts of a second one &lt;br /&gt;
by default. The following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: Select all parts of space time dataset A that are equal to B and store &lt;br /&gt;
it in space time dataset C. The parts are in this case time stamped maps. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In addition the inverse selection operator &amp;lt;b&amp;gt;!:&amp;lt;/b&amp;gt; is defined as the complement of &lt;br /&gt;
the selection operator, hence the following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: select all parts of space time time dataset A that are not equal to B &lt;br /&gt;
and store it in space time dataset (STDS) C. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To select parts of a STDS by different topological relations to other STDS, &lt;br /&gt;
the temporal topology selection operator can be used. The operator consists of &lt;br /&gt;
topological relations, that must be separated by the logical OR operator &lt;br /&gt;
&amp;lt;b&amp;gt;||&amp;lt;/b&amp;gt; and the temporal selection operator. Both parts are separated by &lt;br /&gt;
comma and surrounded by curly braces: &lt;br /&gt;
{&amp;quot;topological relations&amp;quot;, &amp;quot;temporal selection operator&amp;quot;}  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals,:} B&lt;br /&gt;
C = A {equals,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
We can now define arbitrary topological relations using logical OR operator &lt;br /&gt;
to connect them:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals||during||overlaps,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Select all parts of A that are equal to B, during B or overlaps B. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The selection operator is implicitly contained in the temporal topology &lt;br /&gt;
selection operator, so that the following statements are exactly the same:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
C = A {:} B&lt;br /&gt;
C = A {equal,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same for the complementary selection:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
C = A {!:} B&lt;br /&gt;
C = A {equal,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Conditional statements&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selection operations can be evaluated within conditional statements.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Note A and B can either be space time datasets or expressions.&lt;br /&gt;
&lt;br /&gt;
if statement                         decision option                        temporal relations&lt;br /&gt;
  if(if, then, else)&lt;br /&gt;
  if(conditions, A)                    A if conditions are True;              temporal topological relation between if and then is equal.&lt;br /&gt;
  if(conditions, A, B)                 A if conditions are True, B otherwise; temporal topological relation between if, then and else is equal.&lt;br /&gt;
  if(topologies, conditions, A)        A if conditions are True;              temporal topological relation between if and then is explicit specified by topologies.&lt;br /&gt;
  if(topologies, conditions, A, B)     A if conditions are True, B otherwise; temporal topological relation between if, then and else is explicit specified by topologies.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The conditions are comparison expressions that are used to evaluate &lt;br /&gt;
space time datasets. Specific values of temporal variables are &lt;br /&gt;
compared by logical operators and evaluated for each map of the STDS.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The supported logical operators:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Symbol  description&lt;br /&gt;
&lt;br /&gt;
  ==    equal&lt;br /&gt;
  !=    not equal&lt;br /&gt;
  &amp;gt;     greater than&lt;br /&gt;
  &amp;gt;=    greater than or equal&lt;br /&gt;
  &amp;lt;     less than&lt;br /&gt;
  &amp;lt;=    less than or equal&lt;br /&gt;
  &amp;amp;&amp;amp;    and&lt;br /&gt;
  ||    or&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Temporal functions: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
td(A)                   Returns a list of time intervals of STDS A&lt;br /&gt;
&lt;br /&gt;
start_time()            Start time as HH::MM:SS&lt;br /&gt;
start_date()            Start date as yyyy-mm-DD&lt;br /&gt;
start_datetime()        Start datetime as yyyy-mm-DD HH:MM:SS&lt;br /&gt;
end_time()              End time as HH:MM:SS&lt;br /&gt;
end_date()              End date as yyyy-mm-DD&lt;br /&gt;
end_datetime()          End datetime as  yyyy-mm-DD HH:MM&lt;br /&gt;
&lt;br /&gt;
start_doy()             Day of year (doy) from the start time [1 - 366]&lt;br /&gt;
start_dow()             Day of week (dow) from the start time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
start_year()            The year of the start time [0 - 9999]&lt;br /&gt;
start_month()           The month of the start time [1 - 12]&lt;br /&gt;
start_week()            Week of year of the start time [1 - 54]&lt;br /&gt;
start_day()             Day of month from the start time [1 - 31]&lt;br /&gt;
start_hour()            The hour of the start time [0 - 23]&lt;br /&gt;
start_minute()          The minute of the start time [0 - 59]&lt;br /&gt;
start_second()          The second of the start time [0 - 59]&lt;br /&gt;
end_doy()               Day of year (doy) from the end time [1 - 366]&lt;br /&gt;
end_dow()               Day of week (dow) from the end time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
end_year()              The year of the end time [0 - 9999]&lt;br /&gt;
end_month()             The month of the end time [1 - 12]&lt;br /&gt;
end_week()              Week of year of the end time [1 - 54]&lt;br /&gt;
end_day()               Day of month from the start time [1 - 31]&lt;br /&gt;
end_hour()              The hour of the end time [0 - 23]&lt;br /&gt;
end_minute()            The minute of the end time [0 - 59]&lt;br /&gt;
end_second()            The second of the end time [0 - 59]            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the number of maps in intervals can be computed and &lt;br /&gt;
used in conditional statements. &amp;lt;br&amp;gt;&lt;br /&gt;
The operator to count the number of maps &lt;br /&gt;
is the hash &amp;lt;b&amp;gt;#&amp;lt;/b&amp;gt;. &lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
A{contains,#}B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
This expression computes the number of maps from space &lt;br /&gt;
time dataset B which are during the time intervals of maps from &lt;br /&gt;
space time dataset A.&amp;lt;br&amp;gt;&lt;br /&gt;
A list of integers (scalars) corresponding to the maps of A &lt;br /&gt;
that contain maps from B will be returned. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore the temporal algebra allows temporal buffering, shifting &lt;br /&gt;
and snapping with the functions buff_t(), tshift() and tsnap()&lt;br /&gt;
respectively.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
buff_t(A, size)         Buffer STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tshift(A, size)         Shift STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tsnap(A)                Snap time instances and intervals of STDS A&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Examples&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which have equal time stamps &lt;br /&gt;
with space time dataset B and C and are ealier that Jan. 1. 2005 and &lt;br /&gt;
store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(start_date() &amp;lt; &amp;quot;2005-01-01&amp;quot;, A : B : C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which contains more than three&lt;br /&gt;
maps of space time dataset B, else select maps from C with time&lt;br /&gt;
stamps that are not equal to A and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(A {contain, #} B &amp;gt; 3, A {contain, :} B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset B which are during the temporal &lt;br /&gt;
buffered space time dataset A with a map interval of three days, else&lt;br /&gt;
select maps from C and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(contain, td(buff_t(A, &amp;quot;1 days&amp;quot;)) == 3, B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| in progress&lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 9 - 2012-07-26 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented functions for temporal operators into the temporal algebra.&lt;br /&gt;
* Finsihed the module t.select.&lt;br /&gt;
* Wrote the manual page for t.select.&lt;br /&gt;
* Started to implement vector operations into the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue documentation of the GRASS module t.select and the integration of the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 10 - 2012-08-02 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Fixed bugs in the temporal algebra.&lt;br /&gt;
* More testing of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the integration of the vector operations into the temporal vector algebra and write documentation and tests.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 11 - 2012-08-09 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Finished implementation of vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Integrated a new function to evaluate spatio-temporal operators with PLY.&lt;br /&gt;
* Worked on a lot minor fixes and tests.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Finish the the temporal vector algebra and write documentation. Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 12 - 2012-08-16 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Integrated buffer function into temporal vector algebra.&lt;br /&gt;
* Finished temporal vector algebra. &lt;br /&gt;
* Worked on documentation and examples for the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write documentation and start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I travelled to Estonia for my PhD thesis, so I had limited time for my project.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19646</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19646"/>
		<updated>2013-08-12T15:25:48Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Project plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= t.select =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
t.select performs selection of maps that are registered in space time datasets using temporal algebra.&lt;br /&gt;
&lt;br /&gt;
== Program Use ==&lt;br /&gt;
The module expects an &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; as input parameter in the following form: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; &amp;quot;result = expression&amp;quot; &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The statement structure is similar to r.mapcalc.&lt;br /&gt;
Where &amp;lt;b&amp;gt;result&amp;lt;/b&amp;gt; represents the name of a space time dataset (STDS)that will &lt;br /&gt;
contain the result of the calculation that is given as &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; &lt;br /&gt;
on the right side of the equality sign. &lt;br /&gt;
These expression can be any valid or nested combination of temporal &lt;br /&gt;
operations and functions that are provided by the temporal algebra.  &amp;lt;br&amp;gt;&lt;br /&gt;
The temporal algebra works with space time datasets of any type (STRDS, STR3DS and STVDS). &lt;br /&gt;
The algebra provides methods for map selection from STDS based on their temporal relations. &lt;br /&gt;
It is also possible to temporally shift maps, to create temporal buffer and to snap time &lt;br /&gt;
instances to create a valid temporal topology. Furthermore expressions can be nested and &lt;br /&gt;
evaluated in conditional statements (if, else statements). Within if-statements the algebra &lt;br /&gt;
provides temporal variables like start time, end time, day of year, time differences or &lt;br /&gt;
number of maps per time interval to build up conditions. These operations can be assigned &lt;br /&gt;
to space time datasets or to the results of operations between space time datasets. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The type of the input space time datasets must be defined with the input &lt;br /&gt;
parameter &amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt;. Possible options are STRDS, STVDS or STR3DS. &lt;br /&gt;
The default is set to space time raster datasets (STRDS).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As default, topological relationships between space time datasets will be &lt;br /&gt;
evaluated only temporal. Use the &amp;lt;b&amp;gt;s&amp;lt;/b&amp;gt; flag to activate the &lt;br /&gt;
additionally spatial topology evaluation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The expression option must be passed as &amp;lt;b&amp;gt;quoted&amp;lt;/b&amp;gt; &lt;br /&gt;
expression, for example: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;t.select expression=&amp;quot;C = A : B&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
Where &amp;lt;b&amp;gt;C&amp;lt;/b&amp;gt; is the new space time raster dataset that will contain maps&lt;br /&gt;
from &amp;lt;b&amp;gt;A&amp;lt;/b&amp;gt; that are selected by equal temporal relationships &lt;br /&gt;
to the existing dataset &amp;lt;b&amp;gt;B&amp;lt;/b&amp;gt; in this case. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Temporal Algebra for t.select==&lt;br /&gt;
The temporal algebra provides a wide range of temporal operators and &lt;br /&gt;
functions that will be presented in the following section. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal relations&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several temporal topology relations between space &lt;br /&gt;
time datasets are supported: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
equals            A ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
during            A  ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
contains          A ------&lt;br /&gt;
                  B  ---- &lt;br /&gt;
&lt;br /&gt;
starts            A ----&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
started           A ------&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
finishs           A   ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
finished          A ------&lt;br /&gt;
                  B   ----&lt;br /&gt;
&lt;br /&gt;
precedes          A ----&lt;br /&gt;
                  B     ----&lt;br /&gt;
&lt;br /&gt;
follows           A     ----&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
overlapped        A   ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
overlaps          A ------&lt;br /&gt;
                  B   ------&lt;br /&gt;
&lt;br /&gt;
over              booth overlaps and overlapped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The relations must be read as: A is related to B, like - A equals B - A is &lt;br /&gt;
during B - A contains B &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Topological relations must be specified in {} parentheses. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal selection&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The temporal selection simply selects parts of a space time dataset without &lt;br /&gt;
processing raster or vector data.&lt;br /&gt;
&lt;br /&gt;
The algebra provides a selection operator &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt; that selects parts &lt;br /&gt;
of a space time dataset that are temporally equal to parts of a second one &lt;br /&gt;
by default. The following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: Select all parts of space time dataset A that are equal to B and store &lt;br /&gt;
it in space time dataset C. The parts are in this case time stamped maps. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In addition the inverse selection operator &amp;lt;b&amp;gt;!:&amp;lt;/b&amp;gt; is defined as the complement of &lt;br /&gt;
the selection operator, hence the following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: select all parts of space time time dataset A that are not equal to B &lt;br /&gt;
and store it in space time dataset (STDS) C. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To select parts of a STDS by different topological relations to other STDS, &lt;br /&gt;
the temporal topology selection operator can be used. The operator consists of &lt;br /&gt;
topological relations, that must be separated by the logical OR operator &lt;br /&gt;
&amp;lt;b&amp;gt;||&amp;lt;/b&amp;gt; and the temporal selection operator. Both parts are separated by &lt;br /&gt;
comma and surrounded by curly braces: &lt;br /&gt;
{&amp;quot;topological relations&amp;quot;, &amp;quot;temporal selection operator&amp;quot;}  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals,:} B&lt;br /&gt;
C = A {equals,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
We can now define arbitrary topological relations using logical OR operator &lt;br /&gt;
to connect them:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals||during||overlaps,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Select all parts of A that are equal to B, during B or overlaps B. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The selection operator is implicitly contained in the temporal topology &lt;br /&gt;
selection operator, so that the following statements are exactly the same:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
C = A {:} B&lt;br /&gt;
C = A {equal,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same for the complementary selection:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
C = A {!:} B&lt;br /&gt;
C = A {equal,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Conditional statements&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selection operations can be evaluated within conditional statements.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Note A and B can either be space time datasets or expressions.&lt;br /&gt;
&lt;br /&gt;
if statement                         decision option                        temporal relations&lt;br /&gt;
  if(if, then, else)&lt;br /&gt;
  if(conditions, A)                    A if conditions are True;              temporal topological relation between if and then is equal.&lt;br /&gt;
  if(conditions, A, B)                 A if conditions are True, B otherwise; temporal topological relation between if, then and else is equal.&lt;br /&gt;
  if(topologies, conditions, A)        A if conditions are True;              temporal topological relation between if and then is explicit specified by topologies.&lt;br /&gt;
  if(topologies, conditions, A, B)     A if conditions are True, B otherwise; temporal topological relation between if, then and else is explicit specified by topologies.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The conditions are comparison expressions that are used to evaluate &lt;br /&gt;
space time datasets. Specific values of temporal variables are &lt;br /&gt;
compared by logical operators and evaluated for each map of the STDS.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The supported logical operators:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Symbol  description&lt;br /&gt;
&lt;br /&gt;
  ==    equal&lt;br /&gt;
  !=    not equal&lt;br /&gt;
  &amp;gt;     greater than&lt;br /&gt;
  &amp;gt;=    greater than or equal&lt;br /&gt;
  &amp;lt;     less than&lt;br /&gt;
  &amp;lt;=    less than or equal&lt;br /&gt;
  &amp;amp;&amp;amp;    and&lt;br /&gt;
  ||    or&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Temporal functions: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
td(A)                   Returns a list of time intervals of STDS A&lt;br /&gt;
&lt;br /&gt;
start_time()            Start time as HH::MM:SS&lt;br /&gt;
start_date()            Start date as yyyy-mm-DD&lt;br /&gt;
start_datetime()        Start datetime as yyyy-mm-DD HH:MM:SS&lt;br /&gt;
end_time()              End time as HH:MM:SS&lt;br /&gt;
end_date()              End date as yyyy-mm-DD&lt;br /&gt;
end_datetime()          End datetime as  yyyy-mm-DD HH:MM&lt;br /&gt;
&lt;br /&gt;
start_doy()             Day of year (doy) from the start time [1 - 366]&lt;br /&gt;
start_dow()             Day of week (dow) from the start time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
start_year()            The year of the start time [0 - 9999]&lt;br /&gt;
start_month()           The month of the start time [1 - 12]&lt;br /&gt;
start_week()            Week of year of the start time [1 - 54]&lt;br /&gt;
start_day()             Day of month from the start time [1 - 31]&lt;br /&gt;
start_hour()            The hour of the start time [0 - 23]&lt;br /&gt;
start_minute()          The minute of the start time [0 - 59]&lt;br /&gt;
start_second()          The second of the start time [0 - 59]&lt;br /&gt;
end_doy()               Day of year (doy) from the end time [1 - 366]&lt;br /&gt;
end_dow()               Day of week (dow) from the end time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
end_year()              The year of the end time [0 - 9999]&lt;br /&gt;
end_month()             The month of the end time [1 - 12]&lt;br /&gt;
end_week()              Week of year of the end time [1 - 54]&lt;br /&gt;
end_day()               Day of month from the start time [1 - 31]&lt;br /&gt;
end_hour()              The hour of the end time [0 - 23]&lt;br /&gt;
end_minute()            The minute of the end time [0 - 59]&lt;br /&gt;
end_second()            The second of the end time [0 - 59]            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the number of maps in intervals can be computed and &lt;br /&gt;
used in conditional statements. &amp;lt;br&amp;gt;&lt;br /&gt;
The operator to count the number of maps &lt;br /&gt;
is the hash &amp;lt;b&amp;gt;#&amp;lt;/b&amp;gt;. &lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
A{contains,#}B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
This expression computes the number of maps from space &lt;br /&gt;
time dataset B which are during the time intervals of maps from &lt;br /&gt;
space time dataset A.&amp;lt;br&amp;gt;&lt;br /&gt;
A list of integers (scalars) corresponding to the maps of A &lt;br /&gt;
that contain maps from B will be returned. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore the temporal algebra allows temporal buffering, shifting &lt;br /&gt;
and snapping with the functions buff_t(), tshift() and tsnap()&lt;br /&gt;
respectively.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
buff_t(A, size)         Buffer STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tshift(A, size)         Shift STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tsnap(A)                Snap time instances and intervals of STDS A&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Examples&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which have equal time stamps &lt;br /&gt;
with space time dataset B and C and are ealier that Jan. 1. 2005 and &lt;br /&gt;
store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(start_date() &amp;lt; &amp;quot;2005-01-01&amp;quot;, A : B : C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which contains more than three&lt;br /&gt;
maps of space time dataset B, else select maps from C with time&lt;br /&gt;
stamps that are not equal to A and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(A {contain, #} B &amp;gt; 3, A {contain, :} B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset B which are during the temporal &lt;br /&gt;
buffered space time dataset A with a map interval of three days, else&lt;br /&gt;
select maps from C and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(contain, td(buff_t(A, &amp;quot;1 days&amp;quot;)) == 3, B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| in progress&lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 9 - 2012-07-26 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented functions for temporal operators into the temporal algebra.&lt;br /&gt;
* Finsihed the module t.select.&lt;br /&gt;
* Wrote the manual page for t.select.&lt;br /&gt;
* Started to implement vector operations into the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue documentation of the GRASS module t.select and the integration of the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 10 - 2012-08-02 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Fixed bugs in the temporal algebra.&lt;br /&gt;
* More testing of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the integration of the vector operations into the temporal vector algebra and write documentation and tests.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 11 - 2012-08-09 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Finished implementation of vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Integrated a new function to evaluate spatio-temporal operators with PLY.&lt;br /&gt;
* Worked on a lot minor fixes and tests.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Finish the the temporal vector algebra and write documentation. Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19645</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19645"/>
		<updated>2013-08-12T15:24:27Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= t.select =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
t.select performs selection of maps that are registered in space time datasets using temporal algebra.&lt;br /&gt;
&lt;br /&gt;
== Program Use ==&lt;br /&gt;
The module expects an &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; as input parameter in the following form: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; &amp;quot;result = expression&amp;quot; &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The statement structure is similar to r.mapcalc.&lt;br /&gt;
Where &amp;lt;b&amp;gt;result&amp;lt;/b&amp;gt; represents the name of a space time dataset (STDS)that will &lt;br /&gt;
contain the result of the calculation that is given as &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; &lt;br /&gt;
on the right side of the equality sign. &lt;br /&gt;
These expression can be any valid or nested combination of temporal &lt;br /&gt;
operations and functions that are provided by the temporal algebra.  &amp;lt;br&amp;gt;&lt;br /&gt;
The temporal algebra works with space time datasets of any type (STRDS, STR3DS and STVDS). &lt;br /&gt;
The algebra provides methods for map selection from STDS based on their temporal relations. &lt;br /&gt;
It is also possible to temporally shift maps, to create temporal buffer and to snap time &lt;br /&gt;
instances to create a valid temporal topology. Furthermore expressions can be nested and &lt;br /&gt;
evaluated in conditional statements (if, else statements). Within if-statements the algebra &lt;br /&gt;
provides temporal variables like start time, end time, day of year, time differences or &lt;br /&gt;
number of maps per time interval to build up conditions. These operations can be assigned &lt;br /&gt;
to space time datasets or to the results of operations between space time datasets. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The type of the input space time datasets must be defined with the input &lt;br /&gt;
parameter &amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt;. Possible options are STRDS, STVDS or STR3DS. &lt;br /&gt;
The default is set to space time raster datasets (STRDS).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As default, topological relationships between space time datasets will be &lt;br /&gt;
evaluated only temporal. Use the &amp;lt;b&amp;gt;s&amp;lt;/b&amp;gt; flag to activate the &lt;br /&gt;
additionally spatial topology evaluation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The expression option must be passed as &amp;lt;b&amp;gt;quoted&amp;lt;/b&amp;gt; &lt;br /&gt;
expression, for example: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;t.select expression=&amp;quot;C = A : B&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
Where &amp;lt;b&amp;gt;C&amp;lt;/b&amp;gt; is the new space time raster dataset that will contain maps&lt;br /&gt;
from &amp;lt;b&amp;gt;A&amp;lt;/b&amp;gt; that are selected by equal temporal relationships &lt;br /&gt;
to the existing dataset &amp;lt;b&amp;gt;B&amp;lt;/b&amp;gt; in this case. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Temporal Algebra for t.select==&lt;br /&gt;
The temporal algebra provides a wide range of temporal operators and &lt;br /&gt;
functions that will be presented in the following section. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal relations&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several temporal topology relations between space &lt;br /&gt;
time datasets are supported: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
equals            A ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
during            A  ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
contains          A ------&lt;br /&gt;
                  B  ---- &lt;br /&gt;
&lt;br /&gt;
starts            A ----&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
started           A ------&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
finishs           A   ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
finished          A ------&lt;br /&gt;
                  B   ----&lt;br /&gt;
&lt;br /&gt;
precedes          A ----&lt;br /&gt;
                  B     ----&lt;br /&gt;
&lt;br /&gt;
follows           A     ----&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
overlapped        A   ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
overlaps          A ------&lt;br /&gt;
                  B   ------&lt;br /&gt;
&lt;br /&gt;
over              booth overlaps and overlapped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The relations must be read as: A is related to B, like - A equals B - A is &lt;br /&gt;
during B - A contains B &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Topological relations must be specified in {} parentheses. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal selection&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The temporal selection simply selects parts of a space time dataset without &lt;br /&gt;
processing raster or vector data.&lt;br /&gt;
&lt;br /&gt;
The algebra provides a selection operator &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt; that selects parts &lt;br /&gt;
of a space time dataset that are temporally equal to parts of a second one &lt;br /&gt;
by default. The following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: Select all parts of space time dataset A that are equal to B and store &lt;br /&gt;
it in space time dataset C. The parts are in this case time stamped maps. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In addition the inverse selection operator &amp;lt;b&amp;gt;!:&amp;lt;/b&amp;gt; is defined as the complement of &lt;br /&gt;
the selection operator, hence the following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: select all parts of space time time dataset A that are not equal to B &lt;br /&gt;
and store it in space time dataset (STDS) C. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To select parts of a STDS by different topological relations to other STDS, &lt;br /&gt;
the temporal topology selection operator can be used. The operator consists of &lt;br /&gt;
topological relations, that must be separated by the logical OR operator &lt;br /&gt;
&amp;lt;b&amp;gt;||&amp;lt;/b&amp;gt; and the temporal selection operator. Both parts are separated by &lt;br /&gt;
comma and surrounded by curly braces: &lt;br /&gt;
{&amp;quot;topological relations&amp;quot;, &amp;quot;temporal selection operator&amp;quot;}  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals,:} B&lt;br /&gt;
C = A {equals,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
We can now define arbitrary topological relations using logical OR operator &lt;br /&gt;
to connect them:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals||during||overlaps,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Select all parts of A that are equal to B, during B or overlaps B. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The selection operator is implicitly contained in the temporal topology &lt;br /&gt;
selection operator, so that the following statements are exactly the same:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
C = A {:} B&lt;br /&gt;
C = A {equal,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same for the complementary selection:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
C = A {!:} B&lt;br /&gt;
C = A {equal,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Conditional statements&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selection operations can be evaluated within conditional statements.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Note A and B can either be space time datasets or expressions.&lt;br /&gt;
&lt;br /&gt;
if statement                         decision option                        temporal relations&lt;br /&gt;
  if(if, then, else)&lt;br /&gt;
  if(conditions, A)                    A if conditions are True;              temporal topological relation between if and then is equal.&lt;br /&gt;
  if(conditions, A, B)                 A if conditions are True, B otherwise; temporal topological relation between if, then and else is equal.&lt;br /&gt;
  if(topologies, conditions, A)        A if conditions are True;              temporal topological relation between if and then is explicit specified by topologies.&lt;br /&gt;
  if(topologies, conditions, A, B)     A if conditions are True, B otherwise; temporal topological relation between if, then and else is explicit specified by topologies.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The conditions are comparison expressions that are used to evaluate &lt;br /&gt;
space time datasets. Specific values of temporal variables are &lt;br /&gt;
compared by logical operators and evaluated for each map of the STDS.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The supported logical operators:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Symbol  description&lt;br /&gt;
&lt;br /&gt;
  ==    equal&lt;br /&gt;
  !=    not equal&lt;br /&gt;
  &amp;gt;     greater than&lt;br /&gt;
  &amp;gt;=    greater than or equal&lt;br /&gt;
  &amp;lt;     less than&lt;br /&gt;
  &amp;lt;=    less than or equal&lt;br /&gt;
  &amp;amp;&amp;amp;    and&lt;br /&gt;
  ||    or&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Temporal functions: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
td(A)                   Returns a list of time intervals of STDS A&lt;br /&gt;
&lt;br /&gt;
start_time()            Start time as HH::MM:SS&lt;br /&gt;
start_date()            Start date as yyyy-mm-DD&lt;br /&gt;
start_datetime()        Start datetime as yyyy-mm-DD HH:MM:SS&lt;br /&gt;
end_time()              End time as HH:MM:SS&lt;br /&gt;
end_date()              End date as yyyy-mm-DD&lt;br /&gt;
end_datetime()          End datetime as  yyyy-mm-DD HH:MM&lt;br /&gt;
&lt;br /&gt;
start_doy()             Day of year (doy) from the start time [1 - 366]&lt;br /&gt;
start_dow()             Day of week (dow) from the start time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
start_year()            The year of the start time [0 - 9999]&lt;br /&gt;
start_month()           The month of the start time [1 - 12]&lt;br /&gt;
start_week()            Week of year of the start time [1 - 54]&lt;br /&gt;
start_day()             Day of month from the start time [1 - 31]&lt;br /&gt;
start_hour()            The hour of the start time [0 - 23]&lt;br /&gt;
start_minute()          The minute of the start time [0 - 59]&lt;br /&gt;
start_second()          The second of the start time [0 - 59]&lt;br /&gt;
end_doy()               Day of year (doy) from the end time [1 - 366]&lt;br /&gt;
end_dow()               Day of week (dow) from the end time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
end_year()              The year of the end time [0 - 9999]&lt;br /&gt;
end_month()             The month of the end time [1 - 12]&lt;br /&gt;
end_week()              Week of year of the end time [1 - 54]&lt;br /&gt;
end_day()               Day of month from the start time [1 - 31]&lt;br /&gt;
end_hour()              The hour of the end time [0 - 23]&lt;br /&gt;
end_minute()            The minute of the end time [0 - 59]&lt;br /&gt;
end_second()            The second of the end time [0 - 59]            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the number of maps in intervals can be computed and &lt;br /&gt;
used in conditional statements. &amp;lt;br&amp;gt;&lt;br /&gt;
The operator to count the number of maps &lt;br /&gt;
is the hash &amp;lt;b&amp;gt;#&amp;lt;/b&amp;gt;. &lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
A{contains,#}B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
This expression computes the number of maps from space &lt;br /&gt;
time dataset B which are during the time intervals of maps from &lt;br /&gt;
space time dataset A.&amp;lt;br&amp;gt;&lt;br /&gt;
A list of integers (scalars) corresponding to the maps of A &lt;br /&gt;
that contain maps from B will be returned. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore the temporal algebra allows temporal buffering, shifting &lt;br /&gt;
and snapping with the functions buff_t(), tshift() and tsnap()&lt;br /&gt;
respectively.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
buff_t(A, size)         Buffer STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tshift(A, size)         Shift STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tsnap(A)                Snap time instances and intervals of STDS A&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Examples&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which have equal time stamps &lt;br /&gt;
with space time dataset B and C and are ealier that Jan. 1. 2005 and &lt;br /&gt;
store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(start_date() &amp;lt; &amp;quot;2005-01-01&amp;quot;, A : B : C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which contains more than three&lt;br /&gt;
maps of space time dataset B, else select maps from C with time&lt;br /&gt;
stamps that are not equal to A and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(A {contain, #} B &amp;gt; 3, A {contain, :} B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset B which are during the temporal &lt;br /&gt;
buffered space time dataset A with a map interval of three days, else&lt;br /&gt;
select maps from C and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(contain, td(buff_t(A, &amp;quot;1 days&amp;quot;)) == 3, B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || in progress&lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 9 - 2012-07-26 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented functions for temporal operators into the temporal algebra.&lt;br /&gt;
* Finsihed the module t.select.&lt;br /&gt;
* Wrote the manual page for t.select.&lt;br /&gt;
* Started to implement vector operations into the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue documentation of the GRASS module t.select and the integration of the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 10 - 2012-08-02 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Fixed bugs in the temporal algebra.&lt;br /&gt;
* More testing of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the integration of the vector operations into the temporal vector algebra and write documentation and tests.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 11 - 2012-08-09 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Finished implementation of vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Integrated a new function to evaluate spatio-temporal operators with PLY.&lt;br /&gt;
* Worked on a lot minor fixes and tests.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Finish the the temporal vector algebra and write documentation. Start implementing the temporal raster algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19546</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19546"/>
		<updated>2013-08-02T16:16:41Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= t.select =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
t.select performs selection of maps that are registered in space time datasets using temporal algebra.&lt;br /&gt;
&lt;br /&gt;
== Program Use ==&lt;br /&gt;
The module expects an &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; as input parameter in the following form: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; &amp;quot;result = expression&amp;quot; &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The statement structure is similar to r.mapcalc.&lt;br /&gt;
Where &amp;lt;b&amp;gt;result&amp;lt;/b&amp;gt; represents the name of a space time dataset (STDS)that will &lt;br /&gt;
contain the result of the calculation that is given as &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; &lt;br /&gt;
on the right side of the equality sign. &lt;br /&gt;
These expression can be any valid or nested combination of temporal &lt;br /&gt;
operations and functions that are provided by the temporal algebra.  &amp;lt;br&amp;gt;&lt;br /&gt;
The temporal algebra works with space time datasets of any type (STRDS, STR3DS and STVDS). &lt;br /&gt;
The algebra provides methods for map selection from STDS based on their temporal relations. &lt;br /&gt;
It is also possible to temporally shift maps, to create temporal buffer and to snap time &lt;br /&gt;
instances to create a valid temporal topology. Furthermore expressions can be nested and &lt;br /&gt;
evaluated in conditional statements (if, else statements). Within if-statements the algebra &lt;br /&gt;
provides temporal variables like start time, end time, day of year, time differences or &lt;br /&gt;
number of maps per time interval to build up conditions. These operations can be assigned &lt;br /&gt;
to space time datasets or to the results of operations between space time datasets. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The type of the input space time datasets must be defined with the input &lt;br /&gt;
parameter &amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt;. Possible options are STRDS, STVDS or STR3DS. &lt;br /&gt;
The default is set to space time raster datasets (STRDS).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As default, topological relationships between space time datasets will be &lt;br /&gt;
evaluated only temporal. Use the &amp;lt;b&amp;gt;s&amp;lt;/b&amp;gt; flag to activate the &lt;br /&gt;
additionally spatial topology evaluation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The expression option must be passed as &amp;lt;b&amp;gt;quoted&amp;lt;/b&amp;gt; &lt;br /&gt;
expression, for example: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;t.select expression=&amp;quot;C = A : B&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
Where &amp;lt;b&amp;gt;C&amp;lt;/b&amp;gt; is the new space time raster dataset that will contain maps&lt;br /&gt;
from &amp;lt;b&amp;gt;A&amp;lt;/b&amp;gt; that are selected by equal temporal relationships &lt;br /&gt;
to the existing dataset &amp;lt;b&amp;gt;B&amp;lt;/b&amp;gt; in this case. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Temporal Algebra for t.select==&lt;br /&gt;
The temporal algebra provides a wide range of temporal operators and &lt;br /&gt;
functions that will be presented in the following section. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal relations&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several temporal topology relations between space &lt;br /&gt;
time datasets are supported: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
equals            A ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
during            A  ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
contains          A ------&lt;br /&gt;
                  B  ---- &lt;br /&gt;
&lt;br /&gt;
starts            A ----&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
started           A ------&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
finishs           A   ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
finished          A ------&lt;br /&gt;
                  B   ----&lt;br /&gt;
&lt;br /&gt;
precedes          A ----&lt;br /&gt;
                  B     ----&lt;br /&gt;
&lt;br /&gt;
follows           A     ----&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
overlapped        A   ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
overlaps          A ------&lt;br /&gt;
                  B   ------&lt;br /&gt;
&lt;br /&gt;
over              booth overlaps and overlapped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The relations must be read as: A is related to B, like - A equals B - A is &lt;br /&gt;
during B - A contains B &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Topological relations must be specified in {} parentheses. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal selection&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The temporal selection simply selects parts of a space time dataset without &lt;br /&gt;
processing raster or vector data.&lt;br /&gt;
&lt;br /&gt;
The algebra provides a selection operator &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt; that selects parts &lt;br /&gt;
of a space time dataset that are temporally equal to parts of a second one &lt;br /&gt;
by default. The following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: Select all parts of space time dataset A that are equal to B and store &lt;br /&gt;
it in space time dataset C. The parts are in this case time stamped maps. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In addition the inverse selection operator &amp;lt;b&amp;gt;!:&amp;lt;/b&amp;gt; is defined as the complement of &lt;br /&gt;
the selection operator, hence the following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: select all parts of space time time dataset A that are not equal to B &lt;br /&gt;
and store it in space time dataset (STDS) C. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To select parts of a STDS by different topological relations to other STDS, &lt;br /&gt;
the temporal topology selection operator can be used. The operator consists of &lt;br /&gt;
topological relations, that must be separated by the logical OR operator &lt;br /&gt;
&amp;lt;b&amp;gt;||&amp;lt;/b&amp;gt; and the temporal selection operator. Both parts are separated by &lt;br /&gt;
comma and surrounded by curly braces: &lt;br /&gt;
{&amp;quot;topological relations&amp;quot;, &amp;quot;temporal selection operator&amp;quot;}  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals,:} B&lt;br /&gt;
C = A {equals,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
We can now define arbitrary topological relations using logical OR operator &lt;br /&gt;
to connect them:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals||during||overlaps,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Select all parts of A that are equal to B, during B or overlaps B. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The selection operator is implicitly contained in the temporal topology &lt;br /&gt;
selection operator, so that the following statements are exactly the same:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
C = A {:} B&lt;br /&gt;
C = A {equal,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same for the complementary selection:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
C = A {!:} B&lt;br /&gt;
C = A {equal,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Conditional statements&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selection operations can be evaluated within conditional statements.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Note A and B can either be space time datasets or expressions.&lt;br /&gt;
&lt;br /&gt;
if statement                         decision option                        temporal relations&lt;br /&gt;
  if(if, then, else)&lt;br /&gt;
  if(conditions, A)                    A if conditions are True;              temporal topological relation between if and then is equal.&lt;br /&gt;
  if(conditions, A, B)                 A if conditions are True, B otherwise; temporal topological relation between if, then and else is equal.&lt;br /&gt;
  if(topologies, conditions, A)        A if conditions are True;              temporal topological relation between if and then is explicit specified by topologies.&lt;br /&gt;
  if(topologies, conditions, A, B)     A if conditions are True, B otherwise; temporal topological relation between if, then and else is explicit specified by topologies.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The conditions are comparison expressions that are used to evaluate &lt;br /&gt;
space time datasets. Specific values of temporal variables are &lt;br /&gt;
compared by logical operators and evaluated for each map of the STDS.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The supported logical operators:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Symbol  description&lt;br /&gt;
&lt;br /&gt;
  ==    equal&lt;br /&gt;
  !=    not equal&lt;br /&gt;
  &amp;gt;     greater than&lt;br /&gt;
  &amp;gt;=    greater than or equal&lt;br /&gt;
  &amp;lt;     less than&lt;br /&gt;
  &amp;lt;=    less than or equal&lt;br /&gt;
  &amp;amp;&amp;amp;    and&lt;br /&gt;
  ||    or&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Temporal functions: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
td(A)                   Returns a list of time intervals of STDS A&lt;br /&gt;
&lt;br /&gt;
start_time()            Start time as HH::MM:SS&lt;br /&gt;
start_date()            Start date as yyyy-mm-DD&lt;br /&gt;
start_datetime()        Start datetime as yyyy-mm-DD HH:MM:SS&lt;br /&gt;
end_time()              End time as HH:MM:SS&lt;br /&gt;
end_date()              End date as yyyy-mm-DD&lt;br /&gt;
end_datetime()          End datetime as  yyyy-mm-DD HH:MM&lt;br /&gt;
&lt;br /&gt;
start_doy()             Day of year (doy) from the start time [1 - 366]&lt;br /&gt;
start_dow()             Day of week (dow) from the start time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
start_year()            The year of the start time [0 - 9999]&lt;br /&gt;
start_month()           The month of the start time [1 - 12]&lt;br /&gt;
start_week()            Week of year of the start time [1 - 54]&lt;br /&gt;
start_day()             Day of month from the start time [1 - 31]&lt;br /&gt;
start_hour()            The hour of the start time [0 - 23]&lt;br /&gt;
start_minute()          The minute of the start time [0 - 59]&lt;br /&gt;
start_second()          The second of the start time [0 - 59]&lt;br /&gt;
end_doy()               Day of year (doy) from the end time [1 - 366]&lt;br /&gt;
end_dow()               Day of week (dow) from the end time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
end_year()              The year of the end time [0 - 9999]&lt;br /&gt;
end_month()             The month of the end time [1 - 12]&lt;br /&gt;
end_week()              Week of year of the end time [1 - 54]&lt;br /&gt;
end_day()               Day of month from the start time [1 - 31]&lt;br /&gt;
end_hour()              The hour of the end time [0 - 23]&lt;br /&gt;
end_minute()            The minute of the end time [0 - 59]&lt;br /&gt;
end_second()            The second of the end time [0 - 59]            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the number of maps in intervals can be computed and &lt;br /&gt;
used in conditional statements. &amp;lt;br&amp;gt;&lt;br /&gt;
The operator to count the number of maps &lt;br /&gt;
is the hash &amp;lt;b&amp;gt;#&amp;lt;/b&amp;gt;. &lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
A{contains,#}B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
This expression computes the number of maps from space &lt;br /&gt;
time dataset B which are during the time intervals of maps from &lt;br /&gt;
space time dataset A.&amp;lt;br&amp;gt;&lt;br /&gt;
A list of integers (scalars) corresponding to the maps of A &lt;br /&gt;
that contain maps from B will be returned. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore the temporal algebra allows temporal buffering, shifting &lt;br /&gt;
and snapping with the functions buff_t(), tshift() and tsnap()&lt;br /&gt;
respectively.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
buff_t(A, size)         Buffer STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tshift(A, size)         Shift STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tsnap(A)                Snap time instances and intervals of STDS A&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Examples&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which have equal time stamps &lt;br /&gt;
with space time dataset B and C and are ealier that Jan. 1. 2005 and &lt;br /&gt;
store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(start_date() &amp;lt; &amp;quot;2005-01-01&amp;quot;, A : B : C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which contains more than three&lt;br /&gt;
maps of space time dataset B, else select maps from C with time&lt;br /&gt;
stamps that are not equal to A and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(A {contain, #} B &amp;gt; 3, A {contain, :} B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset B which are during the temporal &lt;br /&gt;
buffered space time dataset A with a map interval of three days, else&lt;br /&gt;
select maps from C and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(contain, td(buff_t(A, &amp;quot;1 days&amp;quot;)) == 3, B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || in progress&lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 9 - 2012-07-26 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented functions for temporal operators into the temporal algebra.&lt;br /&gt;
* Finsihed the module t.select.&lt;br /&gt;
* Wrote the manual page for t.select.&lt;br /&gt;
* Started to implement vector operations into the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue documentation of the GRASS module t.select and the integration of the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
== Week 10 - 2012-08-02 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented vector operations for the vector overlay function like (intersection, union, disjoint union, exclusive union and the complement).&lt;br /&gt;
* Fixed bugs in the temporal algebra.&lt;br /&gt;
* More testing of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the integration of the vector operations into the temporal vector algebra and write documentation and tests.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19393</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19393"/>
		<updated>2013-07-26T16:13:35Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Temporal Algebra for t.select */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= t.select =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
t.select performs selection of maps that are registered in space time datasets using temporal algebra.&lt;br /&gt;
&lt;br /&gt;
== Program Use ==&lt;br /&gt;
The module expects an &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; as input parameter in the following form: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; &amp;quot;result = expression&amp;quot; &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The statement structure is similar to r.mapcalc.&lt;br /&gt;
Where &amp;lt;b&amp;gt;result&amp;lt;/b&amp;gt; represents the name of a space time dataset (STDS)that will &lt;br /&gt;
contain the result of the calculation that is given as &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; &lt;br /&gt;
on the right side of the equality sign. &lt;br /&gt;
These expression can be any valid or nested combination of temporal &lt;br /&gt;
operations and functions that are provided by the temporal algebra.  &amp;lt;br&amp;gt;&lt;br /&gt;
The temporal algebra works with space time datasets of any type (STRDS, STR3DS and STVDS). &lt;br /&gt;
The algebra provides methods for map selection from STDS based on their temporal relations. &lt;br /&gt;
It is also possible to temporally shift maps, to create temporal buffer and to snap time &lt;br /&gt;
instances to create a valid temporal topology. Furthermore expressions can be nested and &lt;br /&gt;
evaluated in conditional statements (if, else statements). Within if-statements the algebra &lt;br /&gt;
provides temporal variables like start time, end time, day of year, time differences or &lt;br /&gt;
number of maps per time interval to build up conditions. These operations can be assigned &lt;br /&gt;
to space time datasets or to the results of operations between space time datasets. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The type of the input space time datasets must be defined with the input &lt;br /&gt;
parameter &amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt;. Possible options are STRDS, STVDS or STR3DS. &lt;br /&gt;
The default is set to space time raster datasets (STRDS).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As default, topological relationships between space time datasets will be &lt;br /&gt;
evaluated only temporal. Use the &amp;lt;b&amp;gt;s&amp;lt;/b&amp;gt; flag to activate the &lt;br /&gt;
additionally spatial topology evaluation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The expression option must be passed as &amp;lt;b&amp;gt;quoted&amp;lt;/b&amp;gt; &lt;br /&gt;
expression, for example: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;t.select expression=&amp;quot;C = A : B&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
Where &amp;lt;b&amp;gt;C&amp;lt;/b&amp;gt; is the new space time raster dataset that will contain maps&lt;br /&gt;
from &amp;lt;b&amp;gt;A&amp;lt;/b&amp;gt; that are selected by equal temporal relationships &lt;br /&gt;
to the existing dataset &amp;lt;b&amp;gt;B&amp;lt;/b&amp;gt; in this case. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Temporal Algebra for t.select==&lt;br /&gt;
The temporal algebra provides a wide range of temporal operators and &lt;br /&gt;
functions that will be presented in the following section. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal relations&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several temporal topology relations between space &lt;br /&gt;
time datasets are supported: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
equals            A ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
during            A  ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
contains          A ------&lt;br /&gt;
                  B  ---- &lt;br /&gt;
&lt;br /&gt;
starts            A ----&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
started           A ------&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
finishs           A   ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
finished          A ------&lt;br /&gt;
                  B   ----&lt;br /&gt;
&lt;br /&gt;
precedes          A ----&lt;br /&gt;
                  B     ----&lt;br /&gt;
&lt;br /&gt;
follows           A     ----&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
overlapped        A   ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
overlaps          A ------&lt;br /&gt;
                  B   ------&lt;br /&gt;
&lt;br /&gt;
over              booth overlaps and overlapped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The relations must be read as: A is related to B, like - A equals B - A is &lt;br /&gt;
during B - A contains B &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Topological relations must be specified in {} parentheses. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal selection&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The temporal selection simply selects parts of a space time dataset without &lt;br /&gt;
processing raster or vector data.&lt;br /&gt;
&lt;br /&gt;
The algebra provides a selection operator &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt; that selects parts &lt;br /&gt;
of a space time dataset that are temporally equal to parts of a second one &lt;br /&gt;
by default. The following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: Select all parts of space time dataset A that are equal to B and store &lt;br /&gt;
it in space time dataset C. The parts are in this case time stamped maps. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In addition the inverse selection operator &amp;lt;b&amp;gt;!:&amp;lt;/b&amp;gt; is defined as the complement of &lt;br /&gt;
the selection operator, hence the following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: select all parts of space time time dataset A that are not equal to B &lt;br /&gt;
and store it in space time dataset (STDS) C. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To select parts of a STDS by different topological relations to other STDS, &lt;br /&gt;
the temporal topology selection operator can be used. The operator consists of &lt;br /&gt;
topological relations, that must be separated by the logical OR operator &lt;br /&gt;
&amp;lt;b&amp;gt;||&amp;lt;/b&amp;gt; and the temporal selection operator. Both parts are separated by &lt;br /&gt;
comma and surrounded by curly braces: &lt;br /&gt;
{&amp;quot;topological relations&amp;quot;, &amp;quot;temporal selection operator&amp;quot;}  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals,:} B&lt;br /&gt;
C = A {equals,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
We can now define arbitrary topological relations using logical OR operator &lt;br /&gt;
to connect them:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals||during||overlaps,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Select all parts of A that are equal to B, during B or overlaps B. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The selection operator is implicitly contained in the temporal topology &lt;br /&gt;
selection operator, so that the following statements are exactly the same:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
C = A {:} B&lt;br /&gt;
C = A {equal,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same for the complementary selection:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
C = A {!:} B&lt;br /&gt;
C = A {equal,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Conditional statements&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selection operations can be evaluated within conditional statements.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Note A and B can either be space time datasets or expressions.&lt;br /&gt;
&lt;br /&gt;
if statement                         decision option                        temporal relations&lt;br /&gt;
  if(if, then, else)&lt;br /&gt;
  if(conditions, A)                    A if conditions are True;              temporal topological relation between if and then is equal.&lt;br /&gt;
  if(conditions, A, B)                 A if conditions are True, B otherwise; temporal topological relation between if, then and else is equal.&lt;br /&gt;
  if(topologies, conditions, A)        A if conditions are True;              temporal topological relation between if and then is explicit specified by topologies.&lt;br /&gt;
  if(topologies, conditions, A, B)     A if conditions are True, B otherwise; temporal topological relation between if, then and else is explicit specified by topologies.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The conditions are comparison expressions that are used to evaluate &lt;br /&gt;
space time datasets. Specific values of temporal variables are &lt;br /&gt;
compared by logical operators and evaluated for each map of the STDS.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The supported logical operators:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Symbol  description&lt;br /&gt;
&lt;br /&gt;
  ==    equal&lt;br /&gt;
  !=    not equal&lt;br /&gt;
  &amp;gt;     greater than&lt;br /&gt;
  &amp;gt;=    greater than or equal&lt;br /&gt;
  &amp;lt;     less than&lt;br /&gt;
  &amp;lt;=    less than or equal&lt;br /&gt;
  &amp;amp;&amp;amp;    and&lt;br /&gt;
  ||    or&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Temporal functions: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
td(A)                   Returns a list of time intervals of STDS A&lt;br /&gt;
&lt;br /&gt;
start_time()            Start time as HH::MM:SS&lt;br /&gt;
start_date()            Start date as yyyy-mm-DD&lt;br /&gt;
start_datetime()        Start datetime as yyyy-mm-DD HH:MM:SS&lt;br /&gt;
end_time()              End time as HH:MM:SS&lt;br /&gt;
end_date()              End date as yyyy-mm-DD&lt;br /&gt;
end_datetime()          End datetime as  yyyy-mm-DD HH:MM&lt;br /&gt;
&lt;br /&gt;
start_doy()             Day of year (doy) from the start time [1 - 366]&lt;br /&gt;
start_dow()             Day of week (dow) from the start time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
start_year()            The year of the start time [0 - 9999]&lt;br /&gt;
start_month()           The month of the start time [1 - 12]&lt;br /&gt;
start_week()            Week of year of the start time [1 - 54]&lt;br /&gt;
start_day()             Day of month from the start time [1 - 31]&lt;br /&gt;
start_hour()            The hour of the start time [0 - 23]&lt;br /&gt;
start_minute()          The minute of the start time [0 - 59]&lt;br /&gt;
start_second()          The second of the start time [0 - 59]&lt;br /&gt;
end_doy()               Day of year (doy) from the end time [1 - 366]&lt;br /&gt;
end_dow()               Day of week (dow) from the end time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
end_year()              The year of the end time [0 - 9999]&lt;br /&gt;
end_month()             The month of the end time [1 - 12]&lt;br /&gt;
end_week()              Week of year of the end time [1 - 54]&lt;br /&gt;
end_day()               Day of month from the start time [1 - 31]&lt;br /&gt;
end_hour()              The hour of the end time [0 - 23]&lt;br /&gt;
end_minute()            The minute of the end time [0 - 59]&lt;br /&gt;
end_second()            The second of the end time [0 - 59]            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the number of maps in intervals can be computed and &lt;br /&gt;
used in conditional statements. &amp;lt;br&amp;gt;&lt;br /&gt;
The operator to count the number of maps &lt;br /&gt;
is the hash &amp;lt;b&amp;gt;#&amp;lt;/b&amp;gt;. &lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
A{contains,#}B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
This expression computes the number of maps from space &lt;br /&gt;
time dataset B which are during the time intervals of maps from &lt;br /&gt;
space time dataset A.&amp;lt;br&amp;gt;&lt;br /&gt;
A list of integers (scalars) corresponding to the maps of A &lt;br /&gt;
that contain maps from B will be returned. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore the temporal algebra allows temporal buffering, shifting &lt;br /&gt;
and snapping with the functions buff_t(), tshift() and tsnap()&lt;br /&gt;
respectively.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
buff_t(A, size)         Buffer STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tshift(A, size)         Shift STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tsnap(A)                Snap time instances and intervals of STDS A&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Examples&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which have equal time stamps &lt;br /&gt;
with space time dataset B and C and are ealier that Jan. 1. 2005 and &lt;br /&gt;
store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(start_date() &amp;lt; &amp;quot;2005-01-01&amp;quot;, A : B : C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which contains more than three&lt;br /&gt;
maps of space time dataset B, else select maps from C with time&lt;br /&gt;
stamps that are not equal to A and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(A {contain, #} B &amp;gt; 3, A {contain, :} B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset B which are during the temporal &lt;br /&gt;
buffered space time dataset A with a map interval of three days, else&lt;br /&gt;
select maps from C and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(contain, td(buff_t(A, &amp;quot;1 days&amp;quot;)) == 3, B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || in progress&lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 9 - 2012-07-26 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented functions for temporal operators into the temporal algebra.&lt;br /&gt;
* Finsihed the module t.select.&lt;br /&gt;
* Wrote the manual page for t.select.&lt;br /&gt;
* Started to implement vector operations into the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue documentation of the GRASS module t.select and the integration of the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19392</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19392"/>
		<updated>2013-07-26T16:12:13Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= t.select =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
t.select performs selection of maps that are registered in space time datasets using temporal algebra.&lt;br /&gt;
&lt;br /&gt;
== Program Use ==&lt;br /&gt;
The module expects an &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; as input parameter in the following form: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; &amp;quot;result = expression&amp;quot; &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The statement structure is similar to r.mapcalc.&lt;br /&gt;
Where &amp;lt;b&amp;gt;result&amp;lt;/b&amp;gt; represents the name of a space time dataset (STDS)that will &lt;br /&gt;
contain the result of the calculation that is given as &amp;lt;b&amp;gt;expression&amp;lt;/b&amp;gt; &lt;br /&gt;
on the right side of the equality sign. &lt;br /&gt;
These expression can be any valid or nested combination of temporal &lt;br /&gt;
operations and functions that are provided by the temporal algebra.  &amp;lt;br&amp;gt;&lt;br /&gt;
The temporal algebra works with space time datasets of any type (STRDS, STR3DS and STVDS). &lt;br /&gt;
The algebra provides methods for map selection from STDS based on their temporal relations. &lt;br /&gt;
It is also possible to temporally shift maps, to create temporal buffer and to snap time &lt;br /&gt;
instances to create a valid temporal topology. Furthermore expressions can be nested and &lt;br /&gt;
evaluated in conditional statements (if, else statements). Within if-statements the algebra &lt;br /&gt;
provides temporal variables like start time, end time, day of year, time differences or &lt;br /&gt;
number of maps per time interval to build up conditions. These operations can be assigned &lt;br /&gt;
to space time datasets or to the results of operations between space time datasets. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The type of the input space time datasets must be defined with the input &lt;br /&gt;
parameter &amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt;. Possible options are STRDS, STVDS or STR3DS. &lt;br /&gt;
The default is set to space time raster datasets (STRDS).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As default, topological relationships between space time datasets will be &lt;br /&gt;
evaluated only temporal. Use the &amp;lt;b&amp;gt;s&amp;lt;/b&amp;gt; flag to activate the &lt;br /&gt;
additionally spatial topology evaluation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The expression option must be passed as &amp;lt;b&amp;gt;quoted&amp;lt;/b&amp;gt; &lt;br /&gt;
expression, for example: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;t.select expression=&amp;quot;C = A : B&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
Where &amp;lt;b&amp;gt;C&amp;lt;/b&amp;gt; is the new space time raster dataset that will contain maps&lt;br /&gt;
from &amp;lt;b&amp;gt;A&amp;lt;/b&amp;gt; that are selected by equal temporal relationships &lt;br /&gt;
to the existing dataset &amp;lt;b&amp;gt;B&amp;lt;/b&amp;gt; in this case. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Temporal Algebra for t.select==&lt;br /&gt;
The temporal algebra provides a wide range of temporal operators and &lt;br /&gt;
functions that will be presented in the following section. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal relations&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several temporal topology relations between space &lt;br /&gt;
time datasets are supported: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
equals            A ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
during            A  ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
contains          A ------&lt;br /&gt;
                  B  ---- &lt;br /&gt;
&lt;br /&gt;
starts            A ----&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
started           A ------&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
finishs           A   ---- &lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
finished          A ------&lt;br /&gt;
                  B   ----&lt;br /&gt;
&lt;br /&gt;
precedes          A ----&lt;br /&gt;
                  B     ----&lt;br /&gt;
&lt;br /&gt;
follows           A     ----&lt;br /&gt;
                  B ----&lt;br /&gt;
&lt;br /&gt;
overlapped        A   ------&lt;br /&gt;
                  B ------&lt;br /&gt;
&lt;br /&gt;
overlaps          A ------&lt;br /&gt;
                  B   ------&lt;br /&gt;
&lt;br /&gt;
over              booth overlaps and overlapped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The relations must be read as: A is related to B, like - A equals B - A is &lt;br /&gt;
during B - A contains B &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Topological relations must be specified in {} parentheses. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Temporal selection&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The temporal selection simply selects parts of a space time dataset without &lt;br /&gt;
processing raster or vector data.&lt;br /&gt;
&lt;br /&gt;
The algebra provides a selection operator &amp;lt;b&amp;gt;:&amp;lt;/b&amp;gt; that selects parts &lt;br /&gt;
of a space time dataset that are temporally equal to parts of a second one &lt;br /&gt;
by default. The following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: Select all parts of space time dataset A that are equal to B and store &lt;br /&gt;
it in space time dataset C. The parts are in this case time stamped maps. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In addition the inverse selection operator &amp;lt;b&amp;gt;!:&amp;lt;/b&amp;gt; is defined as the complement of &lt;br /&gt;
the selection operator, hence the following expression&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
means: select all parts of space time time dataset A that are not equal to B &lt;br /&gt;
and store it in space time dataset (STDS) C. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To select parts of a STDS by different topological relations to other STDS, &lt;br /&gt;
the temporal topology selection operator can be used. The operator consists of &lt;br /&gt;
topological relations, that must be separated by the logical OR operator &lt;br /&gt;
&amp;lt;b&amp;gt;||&amp;lt;/b&amp;gt; and the temporal selection operator. Both parts are separated by &lt;br /&gt;
comma and surrounded by curly braces: &lt;br /&gt;
{&amp;quot;topological relations&amp;quot;, &amp;quot;temporal selection operator&amp;quot;}  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals,:} B&lt;br /&gt;
C = A {equals,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
We can now define arbitrary topological relations using logical OR operator &lt;br /&gt;
to connect them:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A {equals||during||overlaps,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Select all parts of A that are equal to B, during B or overlaps B. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The selection operator is implicitly contained in the temporal topology &lt;br /&gt;
selection operator, so that the following statements are exactly the same:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A : B&lt;br /&gt;
C = A {:} B&lt;br /&gt;
C = A {equal,:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same for the complementary selection:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
C = A !: B&lt;br /&gt;
C = A {!:} B&lt;br /&gt;
C = A {equal,!:} B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Conditional statements&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selection operations can be evaluated within conditional statements.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Note A and B can either be space time datasets or expressions.&lt;br /&gt;
&lt;br /&gt;
if statement                         decision option                        temporal relations&lt;br /&gt;
  if(if, then, else)&lt;br /&gt;
  if(conditions, A)                    A if conditions are True;              temporal topological relation between if and then is equal.&lt;br /&gt;
  if(conditions, A, B)                 A if conditions are True, B otherwise; temporal topological relation between if, then and else is equal.&lt;br /&gt;
  if(topologies, conditions, A)        A if conditions are True;              temporal topological relation between if and then is explicit specified by topologies.&lt;br /&gt;
  if(topologies, conditions, A, B)     A if conditions are True, B otherwise; temporal topological relation between if, then and else is explicit specified by topologies.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The conditions are comparison expressions that are used to evaluate &lt;br /&gt;
space time datasets. Specific values of temporal variables are &lt;br /&gt;
compared by logical operators and evaluated for each map of the STDS.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The supported logical operators:&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Symbol  description&lt;br /&gt;
&lt;br /&gt;
  ==    equal&lt;br /&gt;
  !=    not equal&lt;br /&gt;
  &amp;gt;     greater than&lt;br /&gt;
  &amp;gt;=    greater than or equal&lt;br /&gt;
  &amp;lt;     less than&lt;br /&gt;
  &amp;lt;=    less than or equal&lt;br /&gt;
  &amp;amp;&amp;amp;    and&lt;br /&gt;
  ||    or&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Temporal functions: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
td(A)                   Returns a list of time intervals of STDS A&lt;br /&gt;
&lt;br /&gt;
start_time()            Start time as HH::MM:SS&lt;br /&gt;
start_date()            Start date as yyyy-mm-DD&lt;br /&gt;
start_datetime()        Start datetime as yyyy-mm-DD HH:MM:SS&lt;br /&gt;
end_time()              End time as HH:MM:SS&lt;br /&gt;
end_date()              End date as yyyy-mm-DD&lt;br /&gt;
end_datetime()          End datetime as  yyyy-mm-DD HH:MM&lt;br /&gt;
&lt;br /&gt;
start_doy()             Day of year (doy) from the start time [1 - 366]&lt;br /&gt;
start_dow()             Day of week (dow) from the start time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
start_year()            The year of the start time [0 - 9999]&lt;br /&gt;
start_month()           The month of the start time [1 - 12]&lt;br /&gt;
start_week()            Week of year of the start time [1 - 54]&lt;br /&gt;
start_day()             Day of month from the start time [1 - 31]&lt;br /&gt;
start_hour()            The hour of the start time [0 - 23]&lt;br /&gt;
start_minute()          The minute of the start time [0 - 59]&lt;br /&gt;
start_second()          The second of the start time [0 - 59]&lt;br /&gt;
end_doy()               Day of year (doy) from the end time [1 - 366]&lt;br /&gt;
end_dow()               Day of week (dow) from the end time [1 - 7], the start of the week is Monday == 1&lt;br /&gt;
end_year()              The year of the end time [0 - 9999]&lt;br /&gt;
end_month()             The month of the end time [1 - 12]&lt;br /&gt;
end_week()              Week of year of the end time [1 - 54]&lt;br /&gt;
end_day()               Day of month from the start time [1 - 31]&lt;br /&gt;
end_hour()              The hour of the end time [0 - 23]&lt;br /&gt;
end_minute()            The minute of the end time [0 - 59]&lt;br /&gt;
end_second()            The second of the end time [0 - 59]            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the number of maps in intervals can be computed and &lt;br /&gt;
used in conditional statements. &amp;lt;br&amp;gt;&lt;br /&gt;
The operator to count the number of maps &lt;br /&gt;
is the hash &amp;lt;b&amp;gt;#&amp;lt;/b&amp;gt;. &lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
A{contains,#}B&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
This expression computes the number of maps from space &lt;br /&gt;
time dataset B which are during the time intervals of maps from &lt;br /&gt;
space time dataset A.&amp;lt;br&amp;gt;&lt;br /&gt;
A list of integers (scalars) corresponding to the maps of A &lt;br /&gt;
that contain maps from B will be returned. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore the temporal algebra allows temporal buffering, shifting &lt;br /&gt;
and snapping with the functions buff_t(), tshift() and tsnap()&lt;br /&gt;
respectively.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
buff_t(A, size)         Buffer STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tshift(A, size)         Shift STDS A with granule (&amp;quot;1 month&amp;quot; or 5)&lt;br /&gt;
tsnap(A)                Snap time instances and intervals of STDS A&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Examples: &amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which have equal time stamps &lt;br /&gt;
with space time dataset B and C and are ealier that Jan. 1. 2005 and &lt;br /&gt;
store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(start_date() &amp;lt; &amp;quot;2005-01-01&amp;quot;, A : B : C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset A which contains more than three&lt;br /&gt;
maps of space time dataset B, else select maps from C with time&lt;br /&gt;
stamps that are not equal to A and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(A {contain, #} B &amp;gt; 3, A {contain, :} B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select all maps from space time dataset B which are during the temporal &lt;br /&gt;
buffered space time dataset A with a map interval of three days, else&lt;br /&gt;
select maps from C and store them in space time dataset D.&lt;br /&gt;
&amp;lt;div class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
D = if(contain, td(buff_t(A, &amp;quot;1 days&amp;quot;)) == 3, B, C)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || in progress&lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 9 - 2012-07-26 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented functions for temporal operators into the temporal algebra.&lt;br /&gt;
* Finsihed the module t.select.&lt;br /&gt;
* Wrote the manual page for t.select.&lt;br /&gt;
* Started to implement vector operations into the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue documentation of the GRASS module t.select and the integration of the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19390</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19390"/>
		<updated>2013-07-26T15:58:15Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || in progress&lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
== Week 9 - 2012-07-26 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implemented functions for temporal operators into the temporal algebra.&lt;br /&gt;
* Finsihed the module t.select.&lt;br /&gt;
* Wrote the manual page for t.select.&lt;br /&gt;
* Started to implement vector operations into the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue documentation of the GRASS module t.select and the integration of the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems occured.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19389</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19389"/>
		<updated>2013-07-26T15:52:40Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Project plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || in progress&lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19240</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19240"/>
		<updated>2013-07-19T14:00:56Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* What did I do this week? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19239</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19239"/>
		<updated>2013-07-19T13:55:13Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* What will I be working on next week? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Added several temporal functions like start_date(), end_time(), start_datetime().&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select. Start to integrate the vector operations into the temporal vector algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19238</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19238"/>
		<updated>2013-07-19T13:53:50Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
== Week 8 - 2012-07-19 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Participation in the GRASS community sprint in Prague.&lt;br /&gt;
* Discussing and working intensively on the temporal algebra.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Added several temporal functions like start_date(), end_time(), start_datetime().&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting in conditional statements.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Testing and documentation of the GRASS module t.select.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Due to direct contact to GRASS developers at the meeting in Prague all problems could be solved.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Talk:GRASS_Community_Sprint_Prague_2013&amp;diff=19216</id>
		<title>Talk:GRASS Community Sprint Prague 2013</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Talk:GRASS_Community_Sprint_Prague_2013&amp;diff=19216"/>
		<updated>2013-07-17T17:05:37Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Thomas Leppelt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Participant comments and plans ==&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
=== Joint efforts ===&lt;br /&gt;
&lt;br /&gt;
(see [[GRASS_Community_Sprint_Prague_2013#In_person|here]] for participants' names)&lt;br /&gt;
&lt;br /&gt;
* Creating 3D vector test data (for 3D interpolation) - ES, SG, MN&lt;br /&gt;
* Added [[Image_processing#General_introduction|General introduction]] (based on manual of G7/i.vi by Yann Chemin) - MN, MN, YC&lt;br /&gt;
* Discussions on Bundle Block Adjustments - YC, ST&lt;br /&gt;
* wxGUI refactoring - AP, VP&lt;br /&gt;
* Presentation of state of image processing in GRASS 7 - YC, MN&lt;br /&gt;
* Presentation of state of Temporal GIS Algebra in GRASS 7 - SG, TL&lt;br /&gt;
* ISIS-GRASS bridge port to GRASS7 - YC, VP, ML, MN&lt;br /&gt;
* Discussions on potential integration of Rasdaman software as raster data backend - SG, YC, and Jachym (virtually)&lt;br /&gt;
* Presentation on vector conflation - TF with discussion&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
=== Individual Reports ===&lt;br /&gt;
&lt;br /&gt;
Here the (very incomplete) list of individual efforts:&lt;br /&gt;
&lt;br /&gt;
==== Martin Landa ====&lt;br /&gt;
&lt;br /&gt;
* Community Sprint organization&lt;br /&gt;
* OSGeo4W GRASS 6.4.3RC4 package published&lt;br /&gt;
* Fix {{cmd|v.pack|version=70}} on MS Windows, {{rev|57117}}&lt;br /&gt;
* Fix {{cmd|v.unpack|version=70}} on MS Windows, {{rev|57121}}&lt;br /&gt;
* Working on updated version of `msys` and `msys-dev` osgeo4w package&lt;br /&gt;
&lt;br /&gt;
==== Markus Neteler ====&lt;br /&gt;
&lt;br /&gt;
* Community Sprint Budget management (available on request)&lt;br /&gt;
* r.wf Addon fixed: {{rev|57075}} and {{rev|57076}}&lt;br /&gt;
* r.ipso Addon fixed: {{rev|57077}}&lt;br /&gt;
* Draft Doxygen'iation of the CDHC [http://grass.osgeo.org/programming7/cdhclib.html library for testing normality &amp;amp; exponentiality]&lt;br /&gt;
* Added [[Image_processing#General_introduction|General introduction]] to the image processing wiki/manual page (based on manual of G7/i.vi by Yann Chemin) - MN, MN, YC&lt;br /&gt;
* Backport of i.latlong to GRASS 6 (Addon) in {{rev|57191}}.&lt;br /&gt;
* screenshots for example in new module v.surf.mass (see Markus Metz entry)&lt;br /&gt;
&lt;br /&gt;
==== Yann Chemin ====&lt;br /&gt;
&lt;br /&gt;
* ISIS-GRASS bridge port to GRASS7 (with Vaclav, Martin and MarkusN)&lt;br /&gt;
  If ISIS (http://isis.astrogeology.usgs.gov) is installed, &lt;br /&gt;
  GRASS will load it in the background,&lt;br /&gt;
  the banner and prompt will change to ISIS-GRASS.&lt;br /&gt;
  Both ISIS and GRASS commands are available at the ISIS-GRASS prompt.&lt;br /&gt;
&lt;br /&gt;
* g.isis3mt exports a ISIS3 template from current location, ported into GRASS 7&lt;br /&gt;
&lt;br /&gt;
* Tested direct access of ISIS3 data into G7, r.in.gdal and r.external both work (tested Mars MOLA and Dawn test_datasets)&lt;br /&gt;
&lt;br /&gt;
* Discussed with Soeren, Vaclav and Jachym about Rasdaman, Voxel lib and Raster handling in Grass 8, we agreed on investigating handling, interfaces and performances.&lt;br /&gt;
&lt;br /&gt;
* Went through the Bundle Block Adjustment files with Stepan&lt;br /&gt;
&lt;br /&gt;
* Landsat 7 chain processing using pyGRASS goes in testing mode with MarkusN and Soeren&lt;br /&gt;
&lt;br /&gt;
* Worked more on r.crater&lt;br /&gt;
&lt;br /&gt;
==== Margherita Di Leo ====&lt;br /&gt;
&lt;br /&gt;
* r.basin ported to G7 {{rev|57091}}, {{rev|57096}}&lt;br /&gt;
* r.basin html fixed {{rev|57110}}&lt;br /&gt;
&lt;br /&gt;
==== Markus Metz ====&lt;br /&gt;
&lt;br /&gt;
* r.stream.* modules: clean up before moving from addons to trunk {{rev|57151}}, {{rev|57152}}&lt;br /&gt;
* GRASS wiki image processing update (MM, MN, YC)&lt;br /&gt;
* standardizing options for v.db.* and db.* modules, updating respective manuals&lt;br /&gt;
* new module [[AddOns/GRASS7/vector#v.surf.mass|v.surf.mass]] for Tobler's pycnophylactic area interpolation {{rev|57172}} ([http://svn.osgeo.org/grass/grass-addons/grass7/vector/v.surf.mass/v.surf.mass.html manual page])&lt;br /&gt;
&lt;br /&gt;
==== Anne Ghisla aka aghisla ====&lt;br /&gt;
&lt;br /&gt;
* Google Summer of Code live discussions&lt;br /&gt;
* v.krige fixed in G7 {{rev|57146}} and following&lt;br /&gt;
&lt;br /&gt;
==== Sören Gebbert aka huhabla ====&lt;br /&gt;
&lt;br /&gt;
* Google Summer of Code Temporal Algebra presentation and implementation support&lt;br /&gt;
* Discussion of RASDAMAN GRASS integration&lt;br /&gt;
* Discussion and implementation of the new temporal module t.rast.accumulate and the use of a modified version of r.gdd (implemented by Markus Metz) instead of r.mapcalc&lt;br /&gt;
* Writing and updating of many temporal modules manual pages&lt;br /&gt;
* Implementing a prototype that uses Python multiprocessing and a new display C-library function derived from g.pnmcomp to speedup the image composition in the wx GUI&lt;br /&gt;
&lt;br /&gt;
==== Stepan Turek ====&lt;br /&gt;
&lt;br /&gt;
* Working on Google Summer of Code project &lt;br /&gt;
* Went through the Bundle Block Adjustment files with Yann&lt;br /&gt;
* Released source code of scatter plot backend  to baclend {{rev|57180}} and turns backend {{rev|57179}}&lt;br /&gt;
* Discussed GSoC with Martin and Soren&lt;br /&gt;
&lt;br /&gt;
==== Thomas Leppelt ====&lt;br /&gt;
&lt;br /&gt;
* Working on GSoC Project: Temporal Algebra&lt;br /&gt;
* Discussing the algebra concept.&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Added several temporal functions like start_date(), end_time(), start_datetime().&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Added topological relations for comparison operators in conditional statements.&lt;br /&gt;
* Finished to implement the hash-operator (#) for map counting.&lt;br /&gt;
* New module t.select alpha version in repository ready for testing. [http://grasswiki.osgeo.org/wiki/GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS GSOC-wiki]&lt;br /&gt;
&lt;br /&gt;
==== Milena Nowotarska ====&lt;br /&gt;
&lt;br /&gt;
* GUI translation to Polish {{rev|57166}}&lt;br /&gt;
* i18n fixes&lt;br /&gt;
* winGRASS testing&lt;br /&gt;
&lt;br /&gt;
==== Anna Petrasova ====&lt;br /&gt;
&lt;br /&gt;
* attempts to compile wxPython with wxGTK3/Broadway (HTML5) backend, so far not successfull, see [http://wxpython-users.1045709.n5.nabble.com/wxPython-with-wxGTK3-Broadway-HTML5-based-backend-td5718030.html discussion]&lt;br /&gt;
* wxGUI refactoring&lt;br /&gt;
* wxGUI design&lt;br /&gt;
* toolboxes: discussion, adding &amp;lt;addons&amp;gt; tag&lt;br /&gt;
&lt;br /&gt;
==== Vaclav Petras ====&lt;br /&gt;
&lt;br /&gt;
* compiling wxPython with wxGTK3/Broadway with Anna&lt;br /&gt;
* discussion of Rasdaman GRASS integration&lt;br /&gt;
* wxGUI refactoring&lt;br /&gt;
* wxGUI design&lt;br /&gt;
* toolboxes: discussion&lt;br /&gt;
* ISIS-GRASS bridge port to GRASS7 with Yann&lt;br /&gt;
* discussing wxGUI programming with Stepan&lt;br /&gt;
* tests for toolboxes&lt;br /&gt;
&lt;br /&gt;
==== Eva Stopková ====&lt;br /&gt;
* debugged plotting variogram output in module v.kriging (not published yet)&lt;br /&gt;
* improved and debugged other functions of module v.kriging&lt;br /&gt;
&lt;br /&gt;
* discussion about kriging methods in GRASS GIS with Anne G.&lt;br /&gt;
* discussion about optimalization and testing modules (not published yet) v.kriging (2D/3D kriging) and v.nna (2D/3D Nearest Neighbour Analysis) with Marcus N. and Soeren G.&lt;br /&gt;
* discussion about 3D kriging, 3D Nearest Neighbour Analysis and possibilieties of future work on the modules with Helena M.&lt;br /&gt;
&lt;br /&gt;
* numerical testing of v.kriging: &lt;br /&gt;
** prepared inputs&lt;br /&gt;
** fixing the bugs&lt;br /&gt;
&lt;br /&gt;
==== Tereza Fiedlerová ====&lt;br /&gt;
* learning something about GRASS GIS vector modules &lt;br /&gt;
* discussion about own QGIS plugin and C++ library for vector conflation and its possible implementation to GRASS&lt;br /&gt;
* beginning to write C API for vector conflation library (needed for GRASS implementation)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Video-conferencing options ==&lt;br /&gt;
&lt;br /&gt;
Q: is Google Hangouts smartphones only?&lt;br /&gt;
: ''not sure, but I'm pretty sure you can get a web browser plugin for all major desktop OSs''&lt;br /&gt;
&lt;br /&gt;
Q: do you have to be signed up with a Google+ social media account?&lt;br /&gt;
: ''in theory no, but in practice they strongly funnel you that way''&lt;br /&gt;
&lt;br /&gt;
Q:  is Jitsi on a desktop computer compatible with G+?&lt;br /&gt;
: ''at the text chat level, yes. video and voice via Google Talk, reported to work with Voice, not sure about video''&lt;br /&gt;
&lt;br /&gt;
; [http://www.jitsi.org Jitsi]&lt;br /&gt;
: ''It is compatible with GoogleTalk instant messaging (and most other instant messaging including the XMPP RFC like Facebook; Skype is the notable one that it doesn't work with), not sure about GoogleTalk's voice calls, I'd give that a 80% chance of working.&lt;br /&gt;
: An interesting side-project Jisti offers its own work-alike free multi-person video chat for XMPP(Jabber compatibles) which is not limited to 10 people: [https://jitsi.org/Projects/JitsiVideobridge VideoBridge]. Given enough bandwidth and a modern desktop CPU acting as the bridge server, you can have someone in a G+ hangout share their desktop to pass through the other members of the video hangout.&lt;br /&gt;
: Also there's a functional alpha-release Android client.&lt;br /&gt;
: For Jitsi &amp;lt;-&amp;gt; Jitsi video you may need a valid XMPP account. Many (federated in a single grid) providers for that, so it doesn't matter much who. Jitsi run a simple registry at  http://jit.si&lt;br /&gt;
: All quite interesting possiblies and the development is quite active -- but is it there yet? I'm not sure, probably a not far away &amp;quot;almost&amp;quot;; if so, perhaps we could run the bridge on Adhoc for a few days (can run as an unprivilidged user, needs Java 6, chat &amp;quot;host&amp;quot; user needs shell access to set magic pass word and get the assigned port numbers to plug into their client), or perhaps host it at fsv.cvut.cz? (i.e. locate it at the shortest hop to max number of participants using it) --HB''&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Talk:GRASS_Community_Sprint_Prague_2013&amp;diff=19207</id>
		<title>Talk:GRASS Community Sprint Prague 2013</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Talk:GRASS_Community_Sprint_Prague_2013&amp;diff=19207"/>
		<updated>2013-07-17T10:15:02Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Thomas Leppelt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Participant comments and plans ==&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
=== Joint efforts ===&lt;br /&gt;
&lt;br /&gt;
(see [[GRASS_Community_Sprint_Prague_2013#In_person|here]] for participants' names)&lt;br /&gt;
&lt;br /&gt;
* Creating 3D vector test data (for 3D interpolation) - ES, SG, MN&lt;br /&gt;
* Added [[Image_processing#General_introduction|General introduction]] (based on manual of G7/i.vi by Yann Chemin) - MN, MN, YC&lt;br /&gt;
* Discussions on Bundle Block Adjustments - YC, ST&lt;br /&gt;
* wxGUI refactoring - AP, VP&lt;br /&gt;
* Presentation of state of image processing in GRASS 7 - YC, MN&lt;br /&gt;
* Presentation of state of Temporal GIS Algebra in GRASS 7 - SG, TL&lt;br /&gt;
* ISIS-GRASS bridge port to GRASS7 - YC, VP, ML, MN&lt;br /&gt;
* Discussions on potential integration of Rasdaman software as raster data backend - SG, YC, and Jachym (virtually)&lt;br /&gt;
* Presentation on vector conflation - TF with discussion&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
=== Individual Reports ===&lt;br /&gt;
&lt;br /&gt;
Here the (very incomplete) list of individual efforts:&lt;br /&gt;
&lt;br /&gt;
==== Martin Landa ====&lt;br /&gt;
&lt;br /&gt;
* Community Sprint organization&lt;br /&gt;
* OSGeo4W GRASS 6.4.3RC4 package published&lt;br /&gt;
* Fix {{cmd|v.pack|version=70}} on MS Windows, {{rev|57117}}&lt;br /&gt;
* Fix {{cmd|v.unpack|version=70}} on MS Windows, {{rev|57121}}&lt;br /&gt;
&lt;br /&gt;
==== Markus Neteler ====&lt;br /&gt;
&lt;br /&gt;
* Community Sprint Budget management (available on request)&lt;br /&gt;
* r.wf Addon fixed: {{rev|57075}} and {{rev|57076}}&lt;br /&gt;
* r.ipso Addon fixed: {{rev|57077}}&lt;br /&gt;
* Draft Doxygen'iation of the CDHC [http://grass.osgeo.org/programming7/cdhclib.html library for testing normality &amp;amp; exponentiality]&lt;br /&gt;
* Added [[Image_processing#General_introduction|General introduction]] to the image processing wiki/manual page (based on manual of G7/i.vi by Yann Chemin) - MN, MN, YC&lt;br /&gt;
&lt;br /&gt;
==== Yann Chemin ====&lt;br /&gt;
&lt;br /&gt;
* ISIS-GRASS bridge port to GRASS7 (with Vaclav, Martin and MarkusN)&lt;br /&gt;
  If ISIS (http://isis.astrogeology.usgs.gov) is installed, &lt;br /&gt;
  GRASS will load it in the background,&lt;br /&gt;
  the banner and prompt will change to ISIS-GRASS.&lt;br /&gt;
  Both ISIS and GRASS commands are available at the ISIS-GRASS prompt.&lt;br /&gt;
&lt;br /&gt;
* g.isis3mt exports a ISIS3 template from current location, ported into GRASS 7&lt;br /&gt;
&lt;br /&gt;
* Tested direct access of ISIS3 data into G7, r.in.gdal and r.external both work (tested Mars MOLA and Dawn test_datasets)&lt;br /&gt;
&lt;br /&gt;
* Discussed with Soeren, Vaclav and Jachym about Rasdaman, Voxel lib and Raster handling in Grass 8, we agreed on investigating handling, interfaces and performances.&lt;br /&gt;
&lt;br /&gt;
* Went through the Bundle Block Adjustment files with Stepan&lt;br /&gt;
&lt;br /&gt;
* Landsat 7 chain processing using pyGRASS goes in testing mode with MarkusN and Soeren&lt;br /&gt;
&lt;br /&gt;
* Worked more on r.crater&lt;br /&gt;
&lt;br /&gt;
==== Margherita Di Leo ====&lt;br /&gt;
&lt;br /&gt;
* r.basin ported to G7 {{rev|57091}}, {{rev|57096}}&lt;br /&gt;
* r.basin html fixed {{rev|57110}}&lt;br /&gt;
&lt;br /&gt;
==== Markus Metz ====&lt;br /&gt;
&lt;br /&gt;
* r.stream.* modules: clean up before moving from addons to trunk {{rev|57151}}, {{rev|57152}}&lt;br /&gt;
* GRASS wiki image processing update (MM, MN, YC)&lt;br /&gt;
* standardizing options for v.db.* and db.* modules, updating respective manuals&lt;br /&gt;
* pycnophylactic area interpolation {{rev|57172}}&lt;br /&gt;
&lt;br /&gt;
==== Anne Ghisla aka aghisla ====&lt;br /&gt;
&lt;br /&gt;
* Google Summer of Code live discussions&lt;br /&gt;
* v.krige fixed in G7 {{rev|57146}} and following&lt;br /&gt;
&lt;br /&gt;
==== Sören Gebbert aka huhabla ====&lt;br /&gt;
&lt;br /&gt;
* Google Summer of Code Temporal Algebra presentation and implementation support&lt;br /&gt;
* Discussion of RASDAMAN GRASS integration&lt;br /&gt;
* Discussion and implementation of the new temporal module t.rast.accumulate and the use of a modified version of r.gdd (implemented by Markus Metz) instead of r.mapcalc&lt;br /&gt;
* Writing and updating of many temporal modules manual pages&lt;br /&gt;
* Implementing a prototype that uses Python multiprocessing and a new display C-library function derived from g.pnmcomp to speedup the image composition in the wx GUI&lt;br /&gt;
&lt;br /&gt;
==== Stepan Turek ====&lt;br /&gt;
&lt;br /&gt;
* Working on Google Summer of Code project &lt;br /&gt;
* Went through the Bundle Block Adjustment files with Yann&lt;br /&gt;
* Released source code of scatter plot backend  to baclend {{rev|57180}} and turns backend {{rev|57179}}&lt;br /&gt;
* Discussed GSoC with Martin and Soren&lt;br /&gt;
&lt;br /&gt;
==== Thomas Leppelt ====&lt;br /&gt;
&lt;br /&gt;
* Working on GSoC Project: Temporal Algebra&lt;br /&gt;
* Discussing the algebra concept.&lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Added several temporal functions like start_date(), end_time(), start_datetime().&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Added topological relations for comparison operators in conditional statements.&lt;br /&gt;
* Started to implement the hash-operator (#) for map counting.&lt;br /&gt;
* New module t.select almost finished.&lt;br /&gt;
&lt;br /&gt;
==== Milena Nowotarska ====&lt;br /&gt;
&lt;br /&gt;
* GUI translation to Polish {{rev|57166}}&lt;br /&gt;
* i18n fixes&lt;br /&gt;
* winGRASS testing&lt;br /&gt;
&lt;br /&gt;
==== Anna Petrasova ====&lt;br /&gt;
&lt;br /&gt;
* attempts to compile wxPython with wxGTK3/Broadway (HTML5) backend, so far not successfull, see [http://wxpython-users.1045709.n5.nabble.com/wxPython-with-wxGTK3-Broadway-HTML5-based-backend-td5718030.html discussion]&lt;br /&gt;
* wxGUI refactoring&lt;br /&gt;
* wxGUI design&lt;br /&gt;
* toolboxes: discussion, adding &amp;lt;addons&amp;gt; tag&lt;br /&gt;
&lt;br /&gt;
==== Vaclav Petras ====&lt;br /&gt;
&lt;br /&gt;
* compiling wxPython with wxGTK3/Broadway with Anna&lt;br /&gt;
* discussion of Rasdaman GRASS integration&lt;br /&gt;
* wxGUI refactoring&lt;br /&gt;
* wxGUI design&lt;br /&gt;
* toolboxes: discussion&lt;br /&gt;
* ISIS-GRASS bridge port to GRASS7 with Yann&lt;br /&gt;
* discussing wxGUI programming with Stepan&lt;br /&gt;
* tests for toolboxes&lt;br /&gt;
&lt;br /&gt;
==== Eva Stopková ====&lt;br /&gt;
* debug of plotting variogram output in module v.kriging (not published yet)&lt;br /&gt;
* discussion about kriging methods in GRASS GIS with Anne&lt;br /&gt;
* discussion about optimalization and testing modules (not published yet) v.kriging (2D/3D kriging) and v.nna (2D/3D Nearest Neighbour Analysis) with Marcus N. and Soeren G.&lt;br /&gt;
* improving and debugging other functions of module v.kriging&lt;br /&gt;
* numerical testing of v.kriging&lt;br /&gt;
&lt;br /&gt;
==== Tereza Fiedlerová ====&lt;br /&gt;
* learning something about GRASS GIS vector modules &lt;br /&gt;
* discussion about own QGIS plugin and C++ library for vector conflation and its possible implementation to GRASS&lt;br /&gt;
* beginning to write C API for vector conflation library (needed for GRASS implementation)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Video-conferencing options ==&lt;br /&gt;
&lt;br /&gt;
Q: is Google Hangouts smartphones only?&lt;br /&gt;
: ''not sure, but I'm pretty sure you can get a web browser plugin for all major desktop OSs''&lt;br /&gt;
&lt;br /&gt;
Q: do you have to be signed up with a Google+ social media account?&lt;br /&gt;
: ''in theory no, but in practice they strongly funnel you that way''&lt;br /&gt;
&lt;br /&gt;
Q:  is Jitsi on a desktop computer compatible with G+?&lt;br /&gt;
: ''at the text chat level, yes. video and voice via Google Talk, reported to work with Voice, not sure about video''&lt;br /&gt;
&lt;br /&gt;
; [http://www.jitsi.org Jitsi]&lt;br /&gt;
: ''It is compatible with GoogleTalk instant messaging (and most other instant messaging including the XMPP RFC like Facebook; Skype is the notable one that it doesn't work with), not sure about GoogleTalk's voice calls, I'd give that a 80% chance of working.&lt;br /&gt;
: An interesting side-project Jisti offers its own work-alike free multi-person video chat for XMPP(Jabber compatibles) which is not limited to 10 people: [https://jitsi.org/Projects/JitsiVideobridge VideoBridge]. Given enough bandwidth and a modern desktop CPU acting as the bridge server, you can have someone in a G+ hangout share their desktop to pass through the other members of the video hangout.&lt;br /&gt;
: Also there's a functional alpha-release Android client.&lt;br /&gt;
: For Jitsi &amp;lt;-&amp;gt; Jitsi video you may need a valid XMPP account. Many (federated in a single grid) providers for that, so it doesn't matter much who. Jitsi run a simple registry at  http://jit.si&lt;br /&gt;
: All quite interesting possiblies and the development is quite active -- but is it there yet? I'm not sure, probably a not far away &amp;quot;almost&amp;quot;; if so, perhaps we could run the bridge on Adhoc for a few days (can run as an unprivilidged user, needs Java 6, chat &amp;quot;host&amp;quot; user needs shell access to set magic pass word and get the assigned port numbers to plug into their client), or perhaps host it at fsv.cvut.cz? (i.e. locate it at the shortest hop to max number of participants using it) --HB''&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Talk:GRASS_Community_Sprint_Prague_2013&amp;diff=19206</id>
		<title>Talk:GRASS Community Sprint Prague 2013</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Talk:GRASS_Community_Sprint_Prague_2013&amp;diff=19206"/>
		<updated>2013-07-17T10:14:00Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Thomas Leppelt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Participant comments and plans ==&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
=== Joint efforts ===&lt;br /&gt;
&lt;br /&gt;
(see [[GRASS_Community_Sprint_Prague_2013#In_person|here]] for participants' names)&lt;br /&gt;
&lt;br /&gt;
* Creating 3D vector test data (for 3D interpolation) - ES, SG, MN&lt;br /&gt;
* Added [[Image_processing#General_introduction|General introduction]] (based on manual of G7/i.vi by Yann Chemin) - MN, MN, YC&lt;br /&gt;
* Discussions on Bundle Block Adjustments - YC, ST&lt;br /&gt;
* wxGUI refactoring - AP, VP&lt;br /&gt;
* Presentation of state of image processing in GRASS 7 - YC, MN&lt;br /&gt;
* Presentation of state of Temporal GIS Algebra in GRASS 7 - SG, TL&lt;br /&gt;
* ISIS-GRASS bridge port to GRASS7 - YC, VP, ML, MN&lt;br /&gt;
* Discussions on potential integration of Rasdaman software as raster data backend - SG, YC, and Jachym (virtually)&lt;br /&gt;
* Presentation on vector conflation - TF with discussion&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
=== Individual Reports ===&lt;br /&gt;
&lt;br /&gt;
Here the (very incomplete) list of individual efforts:&lt;br /&gt;
&lt;br /&gt;
==== Martin Landa ====&lt;br /&gt;
&lt;br /&gt;
* Community Sprint organization&lt;br /&gt;
* OSGeo4W GRASS 6.4.3RC4 package published&lt;br /&gt;
* Fix {{cmd|v.pack|version=70}} on MS Windows, {{rev|57117}}&lt;br /&gt;
* Fix {{cmd|v.unpack|version=70}} on MS Windows, {{rev|57121}}&lt;br /&gt;
&lt;br /&gt;
==== Markus Neteler ====&lt;br /&gt;
&lt;br /&gt;
* Community Sprint Budget management (available on request)&lt;br /&gt;
* r.wf Addon fixed: {{rev|57075}} and {{rev|57076}}&lt;br /&gt;
* r.ipso Addon fixed: {{rev|57077}}&lt;br /&gt;
* Draft Doxygen'iation of the CDHC [http://grass.osgeo.org/programming7/cdhclib.html library for testing normality &amp;amp; exponentiality]&lt;br /&gt;
* Added [[Image_processing#General_introduction|General introduction]] to the image processing wiki/manual page (based on manual of G7/i.vi by Yann Chemin) - MN, MN, YC&lt;br /&gt;
&lt;br /&gt;
==== Yann Chemin ====&lt;br /&gt;
&lt;br /&gt;
* ISIS-GRASS bridge port to GRASS7 (with Vaclav, Martin and MarkusN)&lt;br /&gt;
  If ISIS (http://isis.astrogeology.usgs.gov) is installed, &lt;br /&gt;
  GRASS will load it in the background,&lt;br /&gt;
  the banner and prompt will change to ISIS-GRASS.&lt;br /&gt;
  Both ISIS and GRASS commands are available at the ISIS-GRASS prompt.&lt;br /&gt;
&lt;br /&gt;
* g.isis3mt exports a ISIS3 template from current location, ported into GRASS 7&lt;br /&gt;
&lt;br /&gt;
* Tested direct access of ISIS3 data into G7, r.in.gdal and r.external both work (tested Mars MOLA and Dawn test_datasets)&lt;br /&gt;
&lt;br /&gt;
* Discussed with Soeren, Vaclav and Jachym about Rasdaman, Voxel lib and Raster handling in Grass 8, we agreed on investigating handling, interfaces and performances.&lt;br /&gt;
&lt;br /&gt;
* Went through the Bundle Block Adjustment files with Stepan&lt;br /&gt;
&lt;br /&gt;
* Landsat 7 chain processing using pyGRASS goes in testing mode with MarkusN and Soeren&lt;br /&gt;
&lt;br /&gt;
* Worked more on r.crater&lt;br /&gt;
&lt;br /&gt;
==== Margherita Di Leo ====&lt;br /&gt;
&lt;br /&gt;
* r.basin ported to G7 {{rev|57091}}, {{rev|57096}}&lt;br /&gt;
* r.basin html fixed {{rev|57110}}&lt;br /&gt;
&lt;br /&gt;
==== Markus Metz ====&lt;br /&gt;
&lt;br /&gt;
* r.stream.* modules: clean up before moving from addons to trunk {{rev|57151}}, {{rev|57152}}&lt;br /&gt;
* GRASS wiki image processing update (MM, MN, YC)&lt;br /&gt;
* standardizing options for v.db.* and db.* modules, updating respective manuals&lt;br /&gt;
* pycnophylactic area interpolation {{rev|57172}}&lt;br /&gt;
&lt;br /&gt;
==== Anne Ghisla aka aghisla ====&lt;br /&gt;
&lt;br /&gt;
* Google Summer of Code live discussions&lt;br /&gt;
* v.krige fixed in G7 {{rev|57146}} and following&lt;br /&gt;
&lt;br /&gt;
==== Sören Gebbert aka huhabla ====&lt;br /&gt;
&lt;br /&gt;
* Google Summer of Code Temporal Algebra presentation and implementation support&lt;br /&gt;
* Discussion of RASDAMAN GRASS integration&lt;br /&gt;
* Discussion and implementation of the new temporal module t.rast.accumulate and the use of a modified version of r.gdd (implemented by Markus Metz) instead of r.mapcalc&lt;br /&gt;
* Writing and updating of many temporal modules manual pages&lt;br /&gt;
* Implementing a prototype that uses Python multiprocessing and a new display C-library function derived from g.pnmcomp to speedup the image composition in the wx GUI&lt;br /&gt;
&lt;br /&gt;
==== Stepan Turek ====&lt;br /&gt;
&lt;br /&gt;
* Working on Google Summer of Code project &lt;br /&gt;
* Went through the Bundle Block Adjustment files with Yann&lt;br /&gt;
* Released source code of scatter plot backend  to baclend {{rev|57180}} and turns backend {{rev|57179}}&lt;br /&gt;
* Discussed GSoC with Martin and Soren&lt;br /&gt;
&lt;br /&gt;
==== Thomas Leppelt ====&lt;br /&gt;
&lt;br /&gt;
* Working on GSoC Project: Temporal Algebra &lt;br /&gt;
* Implemented functions for if-statements in the temporal algebra.&lt;br /&gt;
* Added several temporal functions like start_date(), end_time(), start_datetime().&lt;br /&gt;
* Implemented topological relationships for if-statements.&lt;br /&gt;
* Added topological relations for comparison operators in conditional statements.&lt;br /&gt;
* Started to implement the hash-operator (#) for map counting.&lt;br /&gt;
* New module t.select almost finished.&lt;br /&gt;
&lt;br /&gt;
==== Milena Nowotarska ====&lt;br /&gt;
&lt;br /&gt;
* GUI translation to Polish {{rev|57166}}&lt;br /&gt;
* i18n fixes&lt;br /&gt;
* winGRASS testing&lt;br /&gt;
&lt;br /&gt;
==== Anna Petrasova ====&lt;br /&gt;
&lt;br /&gt;
* attempts to compile wxPython with wxGTK3/Broadway (HTML5) backend, so far not successfull, see [http://wxpython-users.1045709.n5.nabble.com/wxPython-with-wxGTK3-Broadway-HTML5-based-backend-td5718030.html discussion]&lt;br /&gt;
* wxGUI refactoring&lt;br /&gt;
* wxGUI design&lt;br /&gt;
* toolboxes: discussion, adding &amp;lt;addons&amp;gt; tag&lt;br /&gt;
&lt;br /&gt;
==== Vaclav Petras ====&lt;br /&gt;
&lt;br /&gt;
* compiling wxPython with wxGTK3/Broadway with Anna&lt;br /&gt;
* discussion of Rasdaman GRASS integration&lt;br /&gt;
* wxGUI refactoring&lt;br /&gt;
* wxGUI design&lt;br /&gt;
* toolboxes: discussion&lt;br /&gt;
* ISIS-GRASS bridge port to GRASS7 with Yann&lt;br /&gt;
* discussing wxGUI programming with Stepan&lt;br /&gt;
* tests for toolboxes&lt;br /&gt;
&lt;br /&gt;
==== Eva Stopková ====&lt;br /&gt;
* debug of plotting variogram output in module v.kriging (not published yet)&lt;br /&gt;
* discussion about kriging methods in GRASS GIS with Anne&lt;br /&gt;
* discussion about optimalization and testing modules (not published yet) v.kriging (2D/3D kriging) and v.nna (2D/3D Nearest Neighbour Analysis) with Marcus N. and Soeren G.&lt;br /&gt;
* improving and debugging other functions of module v.kriging&lt;br /&gt;
* numerical testing of v.kriging&lt;br /&gt;
&lt;br /&gt;
==== Tereza Fiedlerová ====&lt;br /&gt;
* learning something about GRASS GIS vector modules &lt;br /&gt;
* discussion about own QGIS plugin and C++ library for vector conflation and its possible implementation to GRASS&lt;br /&gt;
* beginning to write C API for vector conflation library (needed for GRASS implementation)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Video-conferencing options ==&lt;br /&gt;
&lt;br /&gt;
Q: is Google Hangouts smartphones only?&lt;br /&gt;
: ''not sure, but I'm pretty sure you can get a web browser plugin for all major desktop OSs''&lt;br /&gt;
&lt;br /&gt;
Q: do you have to be signed up with a Google+ social media account?&lt;br /&gt;
: ''in theory no, but in practice they strongly funnel you that way''&lt;br /&gt;
&lt;br /&gt;
Q:  is Jitsi on a desktop computer compatible with G+?&lt;br /&gt;
: ''at the text chat level, yes. video and voice via Google Talk, reported to work with Voice, not sure about video''&lt;br /&gt;
&lt;br /&gt;
; [http://www.jitsi.org Jitsi]&lt;br /&gt;
: ''It is compatible with GoogleTalk instant messaging (and most other instant messaging including the XMPP RFC like Facebook; Skype is the notable one that it doesn't work with), not sure about GoogleTalk's voice calls, I'd give that a 80% chance of working.&lt;br /&gt;
: An interesting side-project Jisti offers its own work-alike free multi-person video chat for XMPP(Jabber compatibles) which is not limited to 10 people: [https://jitsi.org/Projects/JitsiVideobridge VideoBridge]. Given enough bandwidth and a modern desktop CPU acting as the bridge server, you can have someone in a G+ hangout share their desktop to pass through the other members of the video hangout.&lt;br /&gt;
: Also there's a functional alpha-release Android client.&lt;br /&gt;
: For Jitsi &amp;lt;-&amp;gt; Jitsi video you may need a valid XMPP account. Many (federated in a single grid) providers for that, so it doesn't matter much who. Jitsi run a simple registry at  http://jit.si&lt;br /&gt;
: All quite interesting possiblies and the development is quite active -- but is it there yet? I'm not sure, probably a not far away &amp;quot;almost&amp;quot;; if so, perhaps we could run the bridge on Adhoc for a few days (can run as an unprivilidged user, needs Java 6, chat &amp;quot;host&amp;quot; user needs shell access to set magic pass word and get the assigned port numbers to plug into their client), or perhaps host it at fsv.cvut.cz? (i.e. locate it at the shortest hop to max number of participants using it) --HB''&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Talk:GRASS_Community_Sprint_Prague_2013&amp;diff=19180</id>
		<title>Talk:GRASS Community Sprint Prague 2013</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Talk:GRASS_Community_Sprint_Prague_2013&amp;diff=19180"/>
		<updated>2013-07-15T17:18:49Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Individual Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Participant comments and plans ==&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
=== Joint efforts ===&lt;br /&gt;
&lt;br /&gt;
(see [[GRASS_Community_Sprint_Prague_2013#In_person|here]] for participants' names)&lt;br /&gt;
&lt;br /&gt;
* Creating 3D vector test data (for 3D interpolation) - ES, SG, MN&lt;br /&gt;
* Added [[Image_processing#General_introduction|General introduction]] (based on manual of G7/i.vi by Yann Chemin) - MN, MN, YC&lt;br /&gt;
* Discussions on Bundle Block Adjustments - YC, ST&lt;br /&gt;
* wxGUI refactoring - AP, VP&lt;br /&gt;
* Presentation of state of image processing in GRASS 7 - YC, MN&lt;br /&gt;
* Presentation of state of Temporal GIS Algebra in GRASS 7 - SG, TL&lt;br /&gt;
* ISIS-GRASS bridge port to GRASS7 - YC, VP, ML, MN&lt;br /&gt;
* Discussions on potential integration of Rasdaman software as raster data backend - SG, YC, and Jachym (virtually)&lt;br /&gt;
* Presentation on vector conflation - TF with discussion&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
=== Individual Reports ===&lt;br /&gt;
&lt;br /&gt;
Here the (very incomplete) list of individual efforts:&lt;br /&gt;
&lt;br /&gt;
==== Martin Landa ====&lt;br /&gt;
&lt;br /&gt;
* Community Sprint organization&lt;br /&gt;
* OSGeo4W GRASS 6.4.3RC4 package published&lt;br /&gt;
* Fix {{cmd|v.pack|version=70}} on MS Windows, {{rev|57117}}&lt;br /&gt;
* Fix {{cmd|v.unpack|version=70}} on MS Windows, {{rev|57121}}&lt;br /&gt;
&lt;br /&gt;
==== Markus Neteler ====&lt;br /&gt;
&lt;br /&gt;
* Community Sprint Budget management (available on request)&lt;br /&gt;
* r.wf Addon fixed: {{rev|57075}} and {{rev|57076}}&lt;br /&gt;
* r.ipso Addon fixed: {{rev|57077}}&lt;br /&gt;
* Draft Doxygen'iation of the CDHC [http://grass.osgeo.org/programming7/cdhclib.html library for testing normality &amp;amp; exponentiality]&lt;br /&gt;
* Added [[Image_processing#General_introduction|General introduction]] (based on manual of G7/i.vi by Yann Chemin) - MN, MN, YC&lt;br /&gt;
&lt;br /&gt;
==== Yann Chemin ====&lt;br /&gt;
&lt;br /&gt;
* ISIS-GRASS bridge port to GRASS7 (with Vaclav, Martin and MarkusN)&lt;br /&gt;
  If ISIS (http://isis.astrogeology.usgs.gov) is installed, &lt;br /&gt;
  GRASS will load it in the background,&lt;br /&gt;
  the banner and prompt will change to ISIS-GRASS.&lt;br /&gt;
  Both ISIS and GRASS commands are available at the ISIS-GRASS prompt.&lt;br /&gt;
&lt;br /&gt;
* g.isis3mt exports a ISIS3 template from current location, ported into GRASS 7&lt;br /&gt;
&lt;br /&gt;
* Tested direct access of ISIS3 data into G7, r.in.gdal and r.external both work (tested Mars MOLA and Dawn test_datasets)&lt;br /&gt;
&lt;br /&gt;
* Discussed with Soeren, Vaclav and Jachym about Rasdaman, Voxel lib and Raster handling in Grass 8, we agreed on investigating handling, interfaces and performances.&lt;br /&gt;
&lt;br /&gt;
* Went through the Bundle Block Adjustment files with Stepan&lt;br /&gt;
&lt;br /&gt;
* Landsat 7 chain processing using pyGRASS goes in testing mode with MarkusN and Soeren&lt;br /&gt;
&lt;br /&gt;
* Worked more on r.crater&lt;br /&gt;
&lt;br /&gt;
==== Margherita Di Leo ====&lt;br /&gt;
&lt;br /&gt;
* r.basin ported to G7 {{rev|57091}}, {{rev|57096}}&lt;br /&gt;
* r.basin html fixed {{rev|57110}}&lt;br /&gt;
&lt;br /&gt;
==== Markus Metz ====&lt;br /&gt;
&lt;br /&gt;
* r.stream.* modules: clean up before moving from addons to trunk {{rev|57151}}, {{rev|57152}}&lt;br /&gt;
* GRASS wiki image processing update (MM, MN, YC)&lt;br /&gt;
&lt;br /&gt;
==== Anne Ghisla aka aghisla ====&lt;br /&gt;
&lt;br /&gt;
* Google Summer of Code live discussions&lt;br /&gt;
* v.krige fixed in G7 {{rev|57146}} and following&lt;br /&gt;
&lt;br /&gt;
==== Sören Gebbert aka huhabla ====&lt;br /&gt;
&lt;br /&gt;
* Google Summer of Code Temporal Algebra presentation and implementation support&lt;br /&gt;
* Discussion of RASDAMAN GRASS integration&lt;br /&gt;
* Discussion and implementation of the new temporal module t.rast.accumulate and the use of a modified version of r.gdd (implemented by Markus Metz) instead of r.mapcalc&lt;br /&gt;
* Writing and updating of many temporal modules manual pages&lt;br /&gt;
&lt;br /&gt;
==== Stepan Turek ====&lt;br /&gt;
&lt;br /&gt;
* Working on Google Summer of Code project &lt;br /&gt;
* Went through the Bundle Block Adjustment files with Yann&lt;br /&gt;
&lt;br /&gt;
==== Thomas Leppelt ====&lt;br /&gt;
&lt;br /&gt;
* Working on GSoC Project: Temporal Algebra &lt;br /&gt;
* Implementing functions for if-statements in the temporal algebra&lt;br /&gt;
&lt;br /&gt;
== Video-conferencing options ==&lt;br /&gt;
&lt;br /&gt;
Q: is Google Hangouts smartphones only?&lt;br /&gt;
: ''not sure, but I'm pretty sure you can get a web browser plugin for all major desktop OSs''&lt;br /&gt;
&lt;br /&gt;
Q: do you have to be signed up with a Google+ social media account?&lt;br /&gt;
: ''in theory no, but in practice they strongly funnel you that way''&lt;br /&gt;
&lt;br /&gt;
Q:  is Jitsi on a desktop computer compatible with G+?&lt;br /&gt;
: ''at the text chat level, yes. video and voice via Google Talk, reported to work with Voice, not sure about video''&lt;br /&gt;
&lt;br /&gt;
; [http://www.jitsi.org Jitsi]&lt;br /&gt;
: ''It is compatible with GoogleTalk instant messaging (and most other instant messaging including the XMPP RFC like Facebook; Skype is the notable one that it doesn't work with), not sure about GoogleTalk's voice calls, I'd give that a 80% chance of working.&lt;br /&gt;
: An interesting side-project Jisti offers its own work-alike free multi-person video chat for XMPP(Jabber compatibles) which is not limited to 10 people: [https://jitsi.org/Projects/JitsiVideobridge VideoBridge]. Given enough bandwidth and a modern desktop CPU acting as the bridge server, you can have someone in a G+ hangout share their desktop to pass through the other members of the video hangout.&lt;br /&gt;
: Also there's a functional alpha-release Android client.&lt;br /&gt;
: For Jitsi &amp;lt;-&amp;gt; Jitsi video you may need a valid XMPP account. Many (federated in a single grid) providers for that, so it doesn't matter much who. Jitsi run a simple registry at  http://jit.si&lt;br /&gt;
: All quite interesting possiblies and the development is quite active -- but is it there yet? I'm not sure, probably a not far away &amp;quot;almost&amp;quot;; if so, perhaps we could run the bridge on Adhoc for a few days (can run as an unprivilidged user, needs Java 6, chat &amp;quot;host&amp;quot; user needs shell access to set magic pass word and get the assigned port numbers to plug into their client), or perhaps host it at fsv.cvut.cz? (i.e. locate it at the shortest hop to max number of participants using it) --HB''&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19128</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19128"/>
		<updated>2013-07-13T08:10:46Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Project plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19126</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19126"/>
		<updated>2013-07-13T08:00:54Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* What will I be working on next week? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensively on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19125</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19125"/>
		<updated>2013-07-13T07:47:39Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
== Week 7 - 2012-07-12 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions for temporal buffering, snapping and shifting.&lt;br /&gt;
* Add global temporal variables into the algebra (td(), start_time, end_time, ...)&lt;br /&gt;
* Started to integrate conditional statements into the algebra.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
This week I participate in the GRASS community sprint in Prague. Discussing and working intensivly on the temporal algebra for the next six days.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
Only minor problems.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19089</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19089"/>
		<updated>2013-07-05T19:49:03Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
== Week 6 - 2012-07-05 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Implement functions to compare space time datasets by their topology and to perform temporal selection on raster and vector datasets.&lt;br /&gt;
* Create Module t.select for temporal selection.&lt;br /&gt;
* Changed some functionalities in the temporal algebra concept.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra functions like temporal buffering, snapping and shifting.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
No big Problems this week&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19058</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19058"/>
		<updated>2013-06-28T10:05:43Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* What did I do this week? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions.&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19057</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19057"/>
		<updated>2013-06-28T10:05:28Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* What did I do this week? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.&lt;br /&gt;
* Utilize TGIS methods to evaluate temporal selection expressions .&lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19056</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19056"/>
		<updated>2013-06-28T09:58:34Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.  &lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
The code for this project can be found in a svn repository at code.google: [https://code.google.com/p/grass-gis-temporal-algebra/ grass-gis-temporal-algebra]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19055</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19055"/>
		<updated>2013-06-28T09:54:40Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Temporal Algebra concept */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
An overview of the Temporal GIS Algebra concept for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here].&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.  &lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19054</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19054"/>
		<updated>2013-06-28T09:52:49Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Project plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
The concept of the Temporal GIS Algebra for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here]&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || in progress&lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.  &lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19053</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=19053"/>
		<updated>2013-06-28T09:51:57Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
The concept of the Temporal GIS Algebra for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here]&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API ||&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || &lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;br /&gt;
&lt;br /&gt;
== Week 5 - 2012-06-28 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Using PLY for lexical analysis of temporal expressions.  &lt;br /&gt;
* Start to implement an intern map list structure to store generated map lists, derived from temporal expressions, independently from input type (Vector, Raster).&lt;br /&gt;
* Writing the structure for the temporal algebra and started to fill in the required methods.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Continue the implementation of the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
I try to keep track of the temporal algebra. Sometimes it gets very complex.&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=File:Vmapcalc_example2.png&amp;diff=19000</id>
		<title>File:Vmapcalc example2.png</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=File:Vmapcalc_example2.png&amp;diff=19000"/>
		<updated>2013-06-23T05:01:36Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: Mastho uploaded a new version of &amp;amp;quot;File:Vmapcalc example2.png&amp;amp;quot;: Example for v.mapcalc&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Example for v.mapcalc&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=File:Vmapcalc_example1.png&amp;diff=18999</id>
		<title>File:Vmapcalc example1.png</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=File:Vmapcalc_example1.png&amp;diff=18999"/>
		<updated>2013-06-23T05:01:07Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: Mastho uploaded a new version of &amp;amp;quot;File:Vmapcalc example1.png&amp;amp;quot;: Example for v.mapcalc&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Example for v.mapcalc&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=18998</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=18998"/>
		<updated>2013-06-22T07:17:01Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example1.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Vmapcalc example2.png]]&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
The concept of the Temporal GIS Algebra for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here]&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API ||&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || &lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=File:Vmapcalc_example2.png&amp;diff=18997</id>
		<title>File:Vmapcalc example2.png</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=File:Vmapcalc_example2.png&amp;diff=18997"/>
		<updated>2013-06-22T07:14:09Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: Example for v.mapcalc&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Example for v.mapcalc&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=File:Vmapcalc_example1.png&amp;diff=18996</id>
		<title>File:Vmapcalc example1.png</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=File:Vmapcalc_example1.png&amp;diff=18996"/>
		<updated>2013-06-22T07:13:40Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: Example for v.mapcalc&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Example for v.mapcalc&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=18995</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=18995"/>
		<updated>2013-06-22T07:06:18Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= v.mapcalc =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
v.mapcalc performs overlay and buffer functions on vector map layers. New vector map layers can be created which are expressions of existing vector map layers, boolean vector operations and buffer functions.&lt;br /&gt;
&lt;br /&gt;
== Program use ==&lt;br /&gt;
&lt;br /&gt;
The module expects its input as expression in the following form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  result = expression  &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This structure is similar to r.mapcalc, see r.mapcalc. Where result is the name of a vector map layer that will contain the result of the calculation and expression is any valid combination of boolean and buffer operations for existing vector map layers. &lt;br /&gt;
The input is given by using the first module option expression= . This option passes a quoted expression on the command line, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc expression=&amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where A is the new vector map layer that will be equal to the existing vector map layer B in this case. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc &amp;quot;A = B&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the same result.&lt;br /&gt;
&lt;br /&gt;
== Operators and functions ==&lt;br /&gt;
The module supports the following boolean vector operations: &lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
!Boolean Name !! Operator !! Meaning       !!  Precedence !!  Correspondent function &lt;br /&gt;
|- &lt;br /&gt;
|AND          ||  &amp;amp;   ||   Intersection         || 1   ||   (v.overlay operator=and) &lt;br /&gt;
|- &lt;br /&gt;
|OR           ||  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  || Union  || 1   ||   (v.overlay operator=or)  &lt;br /&gt;
|- &lt;br /&gt;
|DISJOINT OR  ||  +   ||   Disjoint union       || 1   ||   (v.patch)              &lt;br /&gt;
|- &lt;br /&gt;
|XOR          ||  ^   ||   Symmetric difference || 1   ||   (v.overlay operator=xor) &lt;br /&gt;
|- &lt;br /&gt;
|NOT          ||  ~   ||   Complement           || 1   ||   (v.overlay operator=not) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And vector functions:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|- &lt;br /&gt;
! Function name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| buff_p(A, size) || Buffer the points of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_l(A, size) || Buffer the lines of vector map layer A with size&lt;br /&gt;
|-&lt;br /&gt;
| buff_a(A, size) || Buffer the areas of vector map layer A with size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
As shown in the operator table above, the boolean vector operators do not have different precedence. In default setting the expression will be left associatively evaluated. To define specific precedence use parentheses around these expressions, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; B | C&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Here the first intermediate result is the intersection of vector map layers A &amp;amp; B. This intermediate vector map layer is taken to create the union with vector map C to get the final result D. It represents the default behaviour of left associativity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;  &lt;br /&gt;
v.mapcalc expression=&amp;quot;D = A &amp;amp; (B | C)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here the first intermediate result is taken from the parenthesized union of vector map layers B | C. Afterwards the intersection of the intermediate vector map layer and A will be evaluated to get the final result vector map layer D. &lt;br /&gt;
 &lt;br /&gt;
It should be noticed, that the order in which the operations are performed does matter. Different order of operations can lead to a different result.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
This example needed specific region setting. It should work in UTM and LL test locations. &lt;br /&gt;
First set the regions extent and create two vector maps with one random points, respectively: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3&lt;br /&gt;
&lt;br /&gt;
v.random --o -z output=point_1 n=1 seed=1 &lt;br /&gt;
v.info point_1&lt;br /&gt;
v.random --o -z output=point_2 n=1 seed=2 &lt;br /&gt;
v.info point_2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the vector algebra is used to create buffers around those points, cut out a subset and apply different boolean operation on the subsets in one statement: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_and = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) &amp;amp; (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_or  = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) | (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_xor = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ^ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
v.mapcalc --o expr=&amp;quot;buff_not = (buff_p(point_1, 30.0) ~ buff_p(point_1, 20.0)) ~ (buff_p(point_2, 35) ~ buff_p(point_2, 25))&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
The concept of the Temporal GIS Algebra for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here]&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API ||&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || &lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=18994</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=18994"/>
		<updated>2013-06-21T16:42:37Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= Temporal Algebra concept=&lt;br /&gt;
The concept of the Temporal GIS Algebra for Raster and Vector Data is open for discussion and can be found [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra here]&lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API ||&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || &lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ | google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=18993</id>
		<title>GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS&amp;diff=18993"/>
		<updated>2013-06-21T16:36:27Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: Created page with &amp;quot;{{GSoC}} {{wxGUI}} ''(See also other GRASS GSoC 2013 projects)'' {| {{table}} |Student Name: || Thomas Leppelt, [http://www.ti.bund.de/...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSoC}}&lt;br /&gt;
{{wxGUI}}&lt;br /&gt;
''(See also other [[GRASS_SoC_Ideas_2013#Accepted_Ideas|GRASS GSoC 2013 projects]])''&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|Student Name: || Thomas Leppelt, [http://www.ti.bund.de/en/ Thünen Institute Braunschweig Germany]&lt;br /&gt;
|-&lt;br /&gt;
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]&lt;br /&gt;
|-&lt;br /&gt;
| Mentor Name: || Mentor: Soeren Gebbert Backup mentor: Helena Mitasova &amp;amp; Michael Barton &lt;br /&gt;
|-&lt;br /&gt;
| Title: || '''Temporal GIS Algebra for raster and vector data in GRASS '''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Abstract=&lt;br /&gt;
Using the TGRASS GIS API to create spatio-temporal vector and raster algebra to process massive vector and raster datasets based on their spatio-temporal relationships.&lt;br /&gt;
&lt;br /&gt;
= Background =&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
= The idea =&lt;br /&gt;
&lt;br /&gt;
I would like to develop a temporal GIS algebra for raster and vector data in GRASS7. The idea is also posted on the GRASS SoC ideas page for 2013 (http://grasswiki.osgeo.org/wiki/GRASS_SoC_Ideas_2013).&lt;br /&gt;
&lt;br /&gt;
The temporal modules in GRASS are capable of managing, analysing, processing and visualizing large spatio-temporal datasets. Additionally various temporal framework properties were implemented to describe the temporal and spatial relationships for datasets. Our aim is to develop modules, that can be used to process massive vector and raster datasets based on their spatio-temporal relationships. Therefore a spatio-temporal vector and raster algebra is needed and has to be implemented into GRASS7.&lt;br /&gt;
&lt;br /&gt;
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:&lt;br /&gt;
&lt;br /&gt;
'''v.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
According to r.mapcalc for raster datasets, v.mapcalc will provide the functionalities of GRASS modules like v.overlay (and, or, xor, not), v.buffer (buff_point, buff_line, buff_area) and v.patch (patch) as algebraic expression for vector map operations. The implementation will be realised with PLY (http://www.dabeaz.com/ply/) and PyGRASS and will work as a standalone module. In the next step we will develop the temporal algebra that provides temporal variables (day of year, weekday, datum, time, ...) and spatio-temporal topology relations (predecessor, successor, follows, equals, in, meet, …) to perform analyses based on dataset spatio-temporal topologies. The TGRASS GIS API delivers the required functionalities to set up the spatio-temporal relationships for raster and vector datasets. This is the base to create GRASS modules for spatio-temporal vector and raster map calculations:&lt;br /&gt;
&lt;br /&gt;
'''t.vect.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal vector map calculation module will be derived by combining the new implemented module v.mapcalc with the spatio-temporal algebra into a new module named t.vect.mapcalc. This module will provide all vector calculation options from v.mapcalc with additional spatio-temporal algebra. The implementation of a class structure will ensure that the new class is based on the classes for vector and spatio-temporal algebra and inherits all their functionalities.&lt;br /&gt;
&lt;br /&gt;
'''t.rast.mapcalc'''&lt;br /&gt;
&lt;br /&gt;
The spatio-temporal raster map calculation module will be derived by combining the existing module r.mapcalc with the new implemented spatio-temporal algebra. In result the arithmetic operation from r.mapcalc will be extended by spatio-temporal algebra. This module will be based on the same class for spatio-temporal algebra as t.vect.mapcalc to avoid redundancy. &lt;br /&gt;
&lt;br /&gt;
= Project plan =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
|-&lt;br /&gt;
!Period !! Task !! Status / Notes&lt;br /&gt;
|-&lt;br /&gt;
|May 31 || Getting familiar with PLY and PyGRASS, read documentations ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 7 || Implement v.mapcalc  || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 14 || Working with TGIS API framework ||  {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 21 || Create temporal algebra draft, writing example programs || {{done}}&lt;br /&gt;
|-&lt;br /&gt;
|June 28 || Creating spatio-temporal algebra by using TGIS API ||&lt;br /&gt;
|-&lt;br /&gt;
|July 5 || Implementation of temporal algebra in PLY || &lt;br /&gt;
|-&lt;br /&gt;
|July 12 || Continue testing and implementation of temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 19 || Writing documentation for temporal algebra || &lt;br /&gt;
|-&lt;br /&gt;
|July 26 || Implementation of t.vect.mapcalc with documentation and tests || &lt;br /&gt;
|-&lt;br /&gt;
|'''August 2''' || Mid-term evaluations deadline || &lt;br /&gt;
|-&lt;br /&gt;
|August 9  || Write documentation and tests for t.vect.mapcalc|| &lt;br /&gt;
|-&lt;br /&gt;
|August 16 || Implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 23 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|August 30 || Continue implementation of t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|September 6 || Write documentation and tests for t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 16''' || Suggested 'pencils down' date || &lt;br /&gt;
|-&lt;br /&gt;
|September 20 || Write tutorials for t.vect/t.rast.mapcalc || &lt;br /&gt;
|-&lt;br /&gt;
|'''September 27''' || Final evaluation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
&lt;br /&gt;
== Week 1 - 2012-05-31 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Studying [http://www.dabeaz.com/ply/ Python-Lex-Yacc] parsing tool.&lt;br /&gt;
* Getting familiar with PyGRASS.&lt;br /&gt;
* Working with the [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form Backus Naur form] of context free grammar.&lt;br /&gt;
* Create example programs for the vector algebra in PLY.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Implement the vector algebra GRASS module '''v.mapcalc''' with PLY and PyGRASS.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
&lt;br /&gt;
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.&lt;br /&gt;
&lt;br /&gt;
== Week 2 - 2012-06-7 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Develop a first implementation of vector algebra in PLY.&lt;br /&gt;
* Create a new website on [https://code.google.com/p/grass-gis-temporal-algebra/ | google code].&lt;br /&gt;
* Upload v.mapcalc module into the new repository.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Getting familiar with the GRASS GIS Temporal Framework API.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
Some problems with the vector algebra lexer class for boolean operations.&lt;br /&gt;
&lt;br /&gt;
== Week 3 - 2012-06-14 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Fixed bugs and worked on comments for the v.mapcalc module.&lt;br /&gt;
* Reading the documentation for the [http://grass.osgeo.org/programming7/pythontemporallib.html GRASS GIS Temporal Framework API].&lt;br /&gt;
* Building up a concept for the temporal algebra together with my mentor.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Write example programs for the temporal algebra&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
The concept get considerably large and it was hard to design it clearly arranged and intuitive.&lt;br /&gt;
&lt;br /&gt;
== Week 4 - 2012-06-21 ==&lt;br /&gt;
&lt;br /&gt;
=== What did I do this week? ===&lt;br /&gt;
&lt;br /&gt;
* Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).&lt;br /&gt;
* Create a developer wiki page for the temporal algebra [http://trac.osgeo.org/grass/wiki/Grass7/TemporalGISAlgebra concept].&lt;br /&gt;
* Working on the concept.&lt;br /&gt;
* Writing first example programs, experience with the TGIS framework.&lt;br /&gt;
&lt;br /&gt;
=== What will I be working on next week? ===&lt;br /&gt;
&lt;br /&gt;
Start implementing the temporal algebra.&lt;br /&gt;
&lt;br /&gt;
=== Did I meet with any stumbling blocks? ===&lt;br /&gt;
No major problem this week.&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_Community_Sprint_Prague_2013&amp;diff=18798</id>
		<title>GRASS Community Sprint Prague 2013</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_Community_Sprint_Prague_2013&amp;diff=18798"/>
		<updated>2013-05-31T11:32:45Z</updated>

		<summary type="html">&lt;p&gt;⚠️Mastho: /* In person */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toc|right}}&lt;br /&gt;
The GRASS GIS [[team]] will organize the '''4th GRASS Developer and Power User Meeting, aka 'GRASS GIS Community Sprint'''' from '''July 12 to July 18, 2013'''. The sprint is following the [http://geoinformatics.fsv.cvut.cz/gwiki/Geoinformatics_FCE_CTU_2013 Geoinformatics conference], 11-12 July 2013, Czech Technical University in {{wikipedia|Prague}}, {{wikipedia|Czech Republic}}.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[Image:community_sprint_prague2012.png|center|640px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
Our logo &amp;amp;mdash; Let's call the dog [http://books.google.com/books?id=sfQuAAAAIAAJ Dashenka]&lt;br /&gt;
&lt;br /&gt;
'''[http://grass.osgeo.org/announces/community_sprint_prague2012.html Press release]'''&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Important dates:'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;11 (Thusday) - 12 (Friday) July 2013: [http://geoinformatics.fsv.cvut.cz/gwiki/Geoinformatics_FCE_CTU_2013 Geoinformatics conference]&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''12 (Friday) - 18 (Thusday) July 2013: GRASS GIS Community Sprint''' @ [http://www.fsv.cvut.cz/ FCE CTU]&lt;br /&gt;
&lt;br /&gt;
== Purpose ==&lt;br /&gt;
&lt;br /&gt;
This fourth edition of the GRASS GIS Community Sprint 2013 is a great occasion for folks to support the development by actively contributing to the source code, manuals or likewise. The '''community''' sprint is a get-together for GRASS project members and supporters and related [http://www.osgeo.org OSGeo] projects to make decisions and tackle larger problems. For this meeting, we welcome people committed to improving the GRASS GIS project and the interfaces to [[QGIS GRASS Cookbook|QGIS]], [[GDAL]], [[PostGIS]], [[R statistics]], [[GRASS and Sextante|Sextante, gvSIG]], OGC Services (esp. [[WPS]]) and more. This includes developers, documenters, bug reporters, translators and others.&lt;br /&gt;
&lt;br /&gt;
For this meeting, we welcome people committed to improving the GRASS GIS and related projects. This includes developers, document writers, wish and bug reporters, translators etc.&lt;br /&gt;
&lt;br /&gt;
== Sponsors ==&lt;br /&gt;
&lt;br /&gt;
We welcome '''financial contributions''' to support the meeting and we are looking for sponsors to cover costs such as meals or to help reducing travelling and accommodation expenses for GRASS developers with far arrival If you are interested to sponsor the GRASS Community Sprint, please read about&lt;br /&gt;
&lt;br /&gt;
:::'''sponsoring the GRASS project at [http://grass.osgeo.org/donations http://grass.osgeo.org/donations]'''&lt;br /&gt;
&lt;br /&gt;
For questions, please contact [[User:Neteler|Markus Neteler]] &amp;lt;tt&amp;gt;&amp;lt;neteler at osgeo.org&amp;gt;&amp;lt;/tt&amp;gt;. Any surplus at the end of the event will be turned over to the GRASS GIS project.&lt;br /&gt;
&lt;br /&gt;
This fourth GRASS Community Sprint is a great occasion for you to support the development of GRASS. With your contribution you'll enable more developers to meet. The community sprint is an important opportunity for the GRASS developers to discuss and collaboratively resolve bugs, plan the direction for the project and work on new features. Please see below for the more detailed agenda. The developers and contributors are donating their valuable time, so it would be great if in-kind funding can be made available from within the community to cover out-of-pocket expenses. All of the work that takes place at the community sprint will be directly contributed back into the GRASS project to the benefit of everyone who uses it.&lt;br /&gt;
&lt;br /&gt;
=== Thanks to our sponsors ===&lt;br /&gt;
&lt;br /&gt;
We are grateful for the support which we have received to organize this GRASS Community Sprint:&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* remainder from the 2012 edition of the Community Sprint and small donations (via [http://www.gfoss.it/ GFOSS.it], the Italian OSGeo chapter) - 1400 Euro &lt;br /&gt;
* [http://www.osgeo.org/ Open Source Geospatial Foundation] (OSGeo) - 1000 Euro&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Timing  ==&lt;br /&gt;
&lt;br /&gt;
'''When''': 12-18 July, 2013&lt;br /&gt;
&lt;br /&gt;
Of course you are invited to join or leave the community sprint whenever you want.&lt;br /&gt;
&lt;br /&gt;
'''Duration''': tbd&lt;br /&gt;
&lt;br /&gt;
* Friday (12. July) is day of arrival&lt;br /&gt;
** First meeting in the afternoon (after the [http://geoinformatics.fsv.cvut.cz/gwiki/Geoinformatics_FCE_CTU_2013 Geoinformatics conference]) to define the agenda&lt;br /&gt;
* Saturday to Wednesday&lt;br /&gt;
** Full days&lt;br /&gt;
* Thursday (18. July) is day of departure&lt;br /&gt;
** Probably hacking for people with a flight later in the evening&lt;br /&gt;
&lt;br /&gt;
== Venue ==&lt;br /&gt;
[[Image:logo_cvut.jpg|130px|left]]&lt;br /&gt;
Department of Mapping and Cartography&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.fsv.cvut.cz Faculty of Civil Engineering]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.cvut.cz Czech Technical University in Prague], {{wikipedia|Czech Republic}}&amp;lt;br&amp;gt;&lt;br /&gt;
[http://geoinformatics.fsv.cvut.cz/gwiki/Room_B367 Room B367] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''[http://geoinformatics.fsv.cvut.cz/gwiki/Where_you_can_find_us Location &amp;amp; Transportations]'''&lt;br /&gt;
&lt;br /&gt;
Prague has an international [http://www.prg.aero/en/ airport] and is also reachable by train, bus or car.&lt;br /&gt;
&lt;br /&gt;
== Accommodation and Costs ==&lt;br /&gt;
&lt;br /&gt;
Participants should plan for the following costs:&lt;br /&gt;
&lt;br /&gt;
* The participation is free of charge&lt;br /&gt;
* Travel to Prague, variable depending on where you come from&lt;br /&gt;
* Accommodation and meals (with the donated sponsorship money we will try to cover some expenses of the participants)&lt;br /&gt;
'''Please note''': The currency in Czech Republic is {{wikipedia|Czech crown}} (CZK, koruna, Kč). 100 Czech crowns are about 4 Euros (see [http://www.cnb.cz/en/financial_markets/foreign_exchange_market/exchange_rate_fixing/daily.jsp current rates]).&lt;br /&gt;
&lt;br /&gt;
'''[http://geoinformatics.fsv.cvut.cz/gwiki/Accommodation_in_Prague Accommodation in Prague]'''&lt;br /&gt;
&lt;br /&gt;
:* [http://geoinformatics.fsv.cvut.cz/gwiki/Accommodation_in_Prague#Masarykova_Kolej_Hotel Masarykova Kolej Hotel]&lt;br /&gt;
:* [http://geoinformatics.fsv.cvut.cz/gwiki/Accommodation_in_Prague#Hotel_DAP Hotel DAP]&lt;br /&gt;
:* [http://geoinformatics.fsv.cvut.cz/gwiki/Accommodation_in_Prague#Hotel_Krystal Hotel Krystal]&lt;br /&gt;
:* [http://geoinformatics.fsv.cvut.cz/gwiki/Accommodation_in_Prague#Pension_Hanspaulka Pension Hanspaulka]&lt;br /&gt;
:* [http://geoinformatics.fsv.cvut.cz/gwiki/Accommodation_in_Prague#Hotel_Silenzio Hotel Silenzio]&lt;br /&gt;
:* [http://geoinformatics.fsv.cvut.cz/gwiki/Accommodation_in_Prague#Student_hostels_.28CTU.29 Student hostels (CTU)]&lt;br /&gt;
:* Special offer: ''sleeping for free in the kindergarten'' (30min by city urban mass transportation from the university campus, sleeping bag required, kitchen and WC available, no showers, in working days available only from 8 p.m. to 8 a.m.), contact [[User:Landa|Martin Landa]] for details&lt;br /&gt;
:* See also http://www.hotel.cz/praha-6/accommodation/&lt;br /&gt;
&lt;br /&gt;
Please let us know your time of arrival and leaving, so we can book for the accommodations and organize the logistics.&lt;br /&gt;
&lt;br /&gt;
Financial support: (partial) travel grants can be payed upon request thanks to our sponsors!&lt;br /&gt;
&lt;br /&gt;
== Weather and Common Item Prices ==&lt;br /&gt;
&lt;br /&gt;
* In July the weather in Prague is usually warm ([http://www.prague-spot.com/climate 20 or more degrees by day])&lt;br /&gt;
* A espresso coffee is about 25 CZK (1 euro), a beer (half of liter) in a common pub is around 30 CZK (1 euro 20 cents), can be more in special pubs. In Prague you can have a full meal (see {{wikipedia|Czech cuisine}} for details) for 100 - 150 CZK (4 - 6 euros), but beware of tourist restaurants, the price can easily rise. It's quite easy to find in Prague also Italian or Chinese restaurants.&lt;br /&gt;
&lt;br /&gt;
== Agenda - What we plan to do ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The program is generally open for your ideas. Please write an email to the [http://lists.osgeo.org/mailman/listinfo/grass-dev GRASS developer list] to discuss your contribution.&lt;br /&gt;
&lt;br /&gt;
Further details about the action items you '''find [[Talk:GRASS Community Sprint Prague 2013|here]]''' and below. Topics cover non-technical, semi-technical, and technical issues.&lt;br /&gt;
&lt;br /&gt;
=== Timeline ===&lt;br /&gt;
&lt;br /&gt;
==== Friday, 12 July ====&lt;br /&gt;
* ''(time to be defined)'': Kick-off in the Faculty of Civil Engineering, building B, room 367 (3rd floor, [http://geoinformatics.fsv.cvut.cz/gwiki/Where_you_can_find_us map])&lt;br /&gt;
* Participants presentation&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* 20:00: Dinner at restaurant [http://www.budvarkadejvice.cz Budvarka] near the university, see the [http://www.openstreetmap.org/?mlat=50.09824&amp;amp;mlon=14.3962&amp;amp;zoom=15&amp;amp;layers=M map]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Saturday, 13 July ====&lt;br /&gt;
&lt;br /&gt;
* 9:00-evening&lt;br /&gt;
&amp;lt;!--* 20:00: Dinner at restaurant [http://www.restaurant-uglaubicu.cz/ U Glaubiců] in the city center, see the [http://www.openstreetmap.org/?mlat=50.0876&amp;amp;mlon=14.4035&amp;amp;zoom=16&amp;amp;layers=M map]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Sunday, 14 July ====&lt;br /&gt;
&lt;br /&gt;
* 9:00-evening&lt;br /&gt;
&amp;lt;!--* 20:00: Dinner at restaurant [http://www.hlucna-samota.cz/ Hlučná samota], see the [http://www.openstreetmap.org/?mlat=50.071600&amp;amp;mlon=14.436300&amp;amp;zoom=18&amp;amp;layers=M map]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Monday, 15 July ====&lt;br /&gt;
&lt;br /&gt;
* 9:00-evening&lt;br /&gt;
&amp;lt;!--* 20:00: Dinner at restaurant [http://www.restauraceztratynalezy.estranky.cz/ Ztráty a nálezy], see the [http://www.openstreetmap.org/?mlat=50.07836&amp;amp;mlon=14.43524&amp;amp;zoom=16&amp;amp;layers=M map]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tuesday, 16 July ====&lt;br /&gt;
&lt;br /&gt;
* 9:00-evening&lt;br /&gt;
&amp;lt;!--* 19:00: Dinner at restaurant [http://www.uveverky.com U Veverky], see the [http://www.openstreetmap.org/?mlat=50.09909&amp;amp;mlon=14.4022&amp;amp;zoom=16&amp;amp;layers=M map]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Wednesday, 17 July ====&lt;br /&gt;
&lt;br /&gt;
* 9:00-evening&lt;br /&gt;
* '''30 YEARS OF GRASS GIS''' party!!&lt;br /&gt;
&lt;br /&gt;
==== Thursday, 18 July ====&lt;br /&gt;
&lt;br /&gt;
* Last meeting&lt;br /&gt;
* Farewell and have a good trip home&lt;br /&gt;
&lt;br /&gt;
== Participation ==&lt;br /&gt;
&lt;br /&gt;
We are planning for an attendance of 20 people (i.e., coding places) but of course you are welcome to join us and bring new ideas with you: we'll make more places available. Please add your name here or contact [[User:Landa|Martin Landa]] &amp;lt;tt&amp;gt;&amp;lt;landa.martin at gmail.com&amp;gt;&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
=== In person ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot;   border=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot; rules=&amp;quot;all&amp;quot; style=&amp;quot;margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#edf9c7; font-size:95%; empty-cells:show;&amp;quot; &lt;br /&gt;
!width=50px|'''Number'''&lt;br /&gt;
!width=130px|'''Participant '''&lt;br /&gt;
!width=100px|'''Country'''&lt;br /&gt;
!width=100px|'''Arrival'''&lt;br /&gt;
!width=100px|'''Departure'''&lt;br /&gt;
!'''Topic'''&lt;br /&gt;
!width=75px|'''T-Shirt'''&lt;br /&gt;
!'''Notes'''&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|[[User:Landa|Martin Landa]]&lt;br /&gt;
|Czech Republic&lt;br /&gt;
| July 12&lt;br /&gt;
| July 18&lt;br /&gt;
| Toolbox concept, vector engine in GRASS 7, wxGUI, PostGIS Topology support, 3D topology&lt;br /&gt;
| L&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
| [[User:Neteler|Markus Neteler]]&lt;br /&gt;
| Italy&lt;br /&gt;
| July 12&lt;br /&gt;
| July 18&lt;br /&gt;
| Varia&lt;br /&gt;
| M&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
| [[User:Helena|Helena Mitasova]]&lt;br /&gt;
| USA&lt;br /&gt;
| July 16 pm&lt;br /&gt;
| July 18&lt;br /&gt;
| Data exchange, metadata, GRASS7 data sets, temporal data&lt;br /&gt;
| M&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
| [[User:benducke|Benjamin Ducke]]&lt;br /&gt;
| Germany&lt;br /&gt;
| July 15 (+/- 1)&lt;br /&gt;
| July 18 (+/- 1)&lt;br /&gt;
| 3D interpolation in GRASS 7 (GSoC), misc.&lt;br /&gt;
| M&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
| [[User:ychemin|Yann Chemin]]&lt;br /&gt;
| France&lt;br /&gt;
| July 11 (+/- 1)&lt;br /&gt;
| July 16 (pm)&lt;br /&gt;
| image processing, planetary integration&lt;br /&gt;
| XXL&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
| [[User:huhabla|Sören Gebbert]]&lt;br /&gt;
| Germany&lt;br /&gt;
| July 12&lt;br /&gt;
| July 16 (pm)&lt;br /&gt;
| GRASS GIS Temporal Framework, Temporal GIS Algebra, WPS, visualization and animation of spatio-temporal data&lt;br /&gt;
| XL&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
| [[User:annakrat|Anna Petrasova]]&lt;br /&gt;
| Czech Republic&lt;br /&gt;
| July 11&lt;br /&gt;
| July 18&lt;br /&gt;
| wxGUI (toolboxes, refactoring, wxNviz, animations)&lt;br /&gt;
| M&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
| [[User:wenzeslaus|Vaclav Petras]]&lt;br /&gt;
| Czech Republic&lt;br /&gt;
| July 11&lt;br /&gt;
| July 18&lt;br /&gt;
| wxGUI (toolboxes, refactoring), Programmer's manual Doxygen issues&lt;br /&gt;
| S&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
| [[User:turek|Štěpán Turek]]&lt;br /&gt;
| Czech Republic&lt;br /&gt;
| July 11&lt;br /&gt;
| July 18&lt;br /&gt;
| Scatter Plot, Bundle Adjustment&lt;br /&gt;
| L&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
| [[User:mmetz|Markus Metz]]&lt;br /&gt;
| Italy&lt;br /&gt;
| July 12&lt;br /&gt;
| July 18&lt;br /&gt;
| vector engine in GRASS 7, image processing, orthorectification&lt;br /&gt;
| L&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
| [[User:mastho|Thomas Leppelt]]&lt;br /&gt;
| Germany&lt;br /&gt;
| July 12&lt;br /&gt;
| July 16&lt;br /&gt;
| Temporal GIS Algebra&lt;br /&gt;
| M&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
| ''and you ...''&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Via IRC chat or hangout===&lt;br /&gt;
&lt;br /&gt;
: [irc://freenode/grass #grass] on Freenode&lt;br /&gt;
: [http://www.google.com/+/learnmore/hangouts/ G+ hangout]&lt;br /&gt;
:: (to be investigated; smartphones only? (''not sure, but I don't think so'')&lt;br /&gt;
:: do you have to be signed up with a Google+ social media account?&lt;br /&gt;
::  is Jitsi on a desktop computer compatible? --''not sure, but Jisti offers its own work-alike free multi-person video chat for XMPP(Jabber compatibles) which is not limited to 10 people: [https://jitsi.org/Projects/JitsiVideobridge VideoBridge]'')&lt;br /&gt;
&lt;br /&gt;
For details, see [[IRC]]&lt;br /&gt;
&lt;br /&gt;
Please add yourself here below (please add also your gmail account for G+ hangout):&lt;br /&gt;
&lt;br /&gt;
* [[User:Landa|Martin Landa]], [http://www.timeanddate.com/worldclock/city.html?n=204 timezone]. Gmail is &amp;lt;landa.martin@&amp;gt; expanded &lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
'''Timing of hangout meetings:'''&lt;br /&gt;
&lt;br /&gt;
* Date, time: [http://doodle.com/f2qfqixqeqkkmskh doodle-poll]&lt;br /&gt;
&lt;br /&gt;
=== Collaborative document scratching ===&lt;br /&gt;
&lt;br /&gt;
(Power) users from all over the world are kindly invited to assist with testing of new and existing functionality. To collect results and notes, we set up an interactive, collaborative editing tool which works in real-time:&lt;br /&gt;
&lt;br /&gt;
Please check http://titanpad.com/I51nq1SrNc&lt;br /&gt;
&lt;br /&gt;
== Individual Preparation ==&lt;br /&gt;
&lt;br /&gt;
* Bring your own computer&lt;br /&gt;
* Bring {{wikipedia|AC adapter|power connector adapter}} if needed (Czech Republic: 230V, 50Hz, {{wikipedia|File:Euro-Flachstecker_2.jpg|Type C Europlugs}} are common and also {{wikipedia|File:French_plug_and_socket.jpg|Type E}})&lt;br /&gt;
* Install subversion and the compiler tools, and come with a working GRASS development environment if possible.&lt;br /&gt;
&lt;br /&gt;
== Broadcast &amp;amp; Video ==&lt;br /&gt;
&lt;br /&gt;
During the event :)&lt;br /&gt;
&lt;br /&gt;
== Photos ==&lt;br /&gt;
&lt;br /&gt;
Also during the event :)&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
* '''How was it last time?'''&lt;br /&gt;
** Very nice, see [[GRASS Community Sprint Genova 2013]]!&lt;br /&gt;
* ''Is the GRASS Community Sprint just a coding event?''&lt;br /&gt;
** It is mainly a coding and documentation event. It is a working session for people who are already participants in the GRASS project and/or are committed to improving the GRASS project.&lt;br /&gt;
** On demand we can do some presentations of current working GRASS implementation and new upcoming features to spread the idea of Open Source GIS software&lt;br /&gt;
* ''Is the GRASS Community Sprint for developers only?''&lt;br /&gt;
** No: anybody can help, with testing, checking out bugs and fixes, documentation and more.&lt;br /&gt;
* ''Where can I get help and more information about the community sprint?''&lt;br /&gt;
** Contact [[User:Landa|Martin Landa]] &amp;lt;tt&amp;gt;&amp;lt;landa.martin at gmail.com&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Press Release ==&lt;br /&gt;
&lt;br /&gt;
''(to be done)''&lt;br /&gt;
&amp;lt;!--http://grass.osgeo.org/announces/community_sprint_prague2012.html--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Workshops]]&lt;/div&gt;</summary>
		<author><name>⚠️Mastho</name></author>
	</entry>
</feed>