PyGRASS is an object-oriented Python Application Programming Interface (API) for Geographic Resources Analysis Support System (GRASS) Geographic Information System (GIS), a powerful open source GIS widely used in academia, commercial settings and governmental agencies. We present the architecture of the PyGRASS library, covering interfaces to GRASS modules, vector and raster data, with a focus on the new capabilities that it provides to GRASS users and developers. Our design concept of the module interface allows the direct linking of inputs and outputs of GRASS modules to create process chains, including compatibility checks, process control and error handling. The module interface was designed to be easily extended to work with remote processing services (Web Processing Service (WPS), Web Service Definition Language (WSDL)/Simple Object Access Protocol (SOAP)). The new object-oriented Python programming API introduces an abstract layer that opens the possibility to use and access transparently the efficient raster and vector functions of GRASS that are implemented in C. The design goal was to provide an easy to use, but powerful, Python interface for users and developers who are not familiar with the programming language C and with the GRASS C-API. We demonstrate the capabilities, scalability and performance of PyGRASS with several dedicated tests and benchmarks. We compare and discuss the results of the benchmarks with dedicated C implementations.
10 April 2017 in International Journal of Geographical Information Science
The availability of continental and global-scale spatio-temporal geographical data sets and the requirement to efficiently process, analyse and manage them led to the development of the temporally enabled Geographic Resources Analysis Support System (GRASS GIS). We present the temporal framework that extends GRASS GIS with spatio-temporal capabilities. The framework provides comprehensive functionality to implement a full-featured temporal geographic information system (GIS) based on a combined field and object-based approach. A significantly improved snapshot approach is used to manage spatial fields of raster, three-dimensional raster and vector type in time. The resulting timestamped spatial fields are organised in spatio-temporal fields referred to as space-time data sets. Both types of fields are handled as objects in our framework. The spatio-temporal extent of the objects and related metadata is stored in relational databases, thus providing additional functionalities to perform SQL-based analysis. We present our combined field and object-based approach in detail and show the management, analysis and processing of spatio-temporal data sets with complex spatio-temporal topologies. A key feature is the hierarchical processing of spatio-temporal data ranging from topological analysis of spatio-temporal fields over boolean operations on spatio-temporal extents, to single pixel, voxel and vector feature access. The linear scalability of our approach is demonstrated by handling up to 1,000,000 raster layers in a single space-time data set. We provide several code examples to show the capabilities of the GRASS GIS Temporal Framework and present the spatio-temporal intersection of trajectory data which demonstrates the object-based ability of our framework.
Continental and global datasets based on earth observations or computational models challenge the existing map algebra approaches. The available datasets differ in their spatio-temporal extents and their spatio-temporal granularity, which makes it difficult to process them as time series data in map algebra expressions. To address this issue we introduce a new map algebra approach that is topology based. This topology based map algebra uses spatio-temporal topological operators (STTOP and STTCOP) to specify spatio-temporal operations between topological related map layers of different time-series data. We have implemented several topology based map algebra tools in the open source geoinformation system GRASS GIS and its open source cloud processing engine actinia. We demonstrate the application of our topology based map algebra by solving real world big data problems using a single algebraic expression. This included the massively parallel computation of the NDVI from a series of 100 Sentinel2A scenes organized as earth observation data cubes. The processing was performed and benchmarked on a many core computer setup and in a distributed container environment. The design of our topology based map algebra allows us to deploy it as a standardized service in the EU Horizon 2020 project openEO.