GRASS GSoC 2013 Temporal GIS Algebra for raster and vector data in GRASS
(See also other GRASS GSoC 2013 projects)
Student Name: | Thomas Leppelt, Thünen Institute Braunschweig Germany |
Organization: | OSGeo - Open Source Geospatial Foundation |
Mentor Name: | Mentor: Soeren Gebbert Backup mentor: Helena Mitasova & Michael Barton |
Title: | Temporal GIS Algebra for raster and vector data in GRASS |
Abstract
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.
Background
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.
The idea
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).
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.
The project will have three new GRASS7 modules and additions to the GRASS GIS temporal library as outcome:
v.mapcalc
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:
t.vect.mapcalc
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.
t.rast.mapcalc
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.
Project plan
Period | Task | Status / Notes |
---|---|---|
May 31 | Getting familiar with PLY and PyGRASS, read documentations | √ |
June 7 | Implement v.mapcalc | √ |
June 14 | Working with TGIS API framework | √ |
June 21 | Create temporal algebra draft, writing example programs | √ |
June 28 | Creating spatio-temporal algebra by using TGIS API | |
July 5 | Implementation of temporal algebra in PLY | |
July 12 | Continue testing and implementation of temporal algebra | |
July 19 | Writing documentation for temporal algebra | |
July 26 | Implementation of t.vect.mapcalc with documentation and tests | |
August 2 | Mid-term evaluations deadline | |
August 9 | Write documentation and tests for t.vect.mapcalc | |
August 16 | Implementation of t.rast.mapcalc | |
August 23 | Continue implementation of t.rast.mapcalc | |
August 30 | Continue implementation of t.rast.mapcalc | |
September 6 | Write documentation and tests for t.rast.mapcalc | |
September 16 | Suggested 'pencils down' date | |
September 20 | Write tutorials for t.vect/t.rast.mapcalc | |
September 27 | Final evaluation |
Weekly Reports
Week 1 - 2012-05-31
What did I do this week?
- Studying Python-Lex-Yacc parsing tool.
- Getting familiar with PyGRASS.
- Working with the Backus Naur form of context free grammar.
- Create example programs for the vector algebra in PLY.
What will I be working on next week?
Implement the vector algebra GRASS module v.mapcalc with PLY and PyGRASS.
Did I meet with any stumbling blocks?
First I was a little bit confused about how PLY works. It took a while until I understood the principals and the functioning.
Week 2 - 2012-06-7
What did I do this week?
- Develop a first implementation of vector algebra in PLY.
- Create a new website on | google code.
- Upload v.mapcalc module into the new repository.
What will I be working on next week?
Getting familiar with the GRASS GIS Temporal Framework API.
Did I meet with any stumbling blocks?
Some problems with the vector algebra lexer class for boolean operations.
Week 3 - 2012-06-14
What did I do this week?
- Fixed bugs and worked on comments for the v.mapcalc module.
- Reading the documentation for the GRASS GIS Temporal Framework API.
- Building up a concept for the temporal algebra together with my mentor.
What will I be working on next week?
Write example programs for the temporal algebra
Did I meet with any stumbling blocks?
The concept get considerably large and it was hard to design it clearly arranged and intuitive.
Week 4 - 2012-06-21
What did I do this week?
- Extended the v.mapcalc module with a command list class (Important for later use in preprocessing steps of the temporal algebra).
- Create a developer wiki page for the temporal algebra concept.
- Working on the concept.
- Writing first example programs, experience with the TGIS framework.
What will I be working on next week?
Start implementing the temporal algebra.
Did I meet with any stumbling blocks?
No major problem this week.