Average rainfall 2001-2016, global tropics

Map: Average rainfall 2001-2016, global tropics

Setup processes (setup_processes)

Thomas Gumbricht bio photo By Thomas Gumbricht

Introduction

This post demonstrates how to add processes to Karttur’s GeoImagine Framework Spatial Data Integrated Development Environment (SPIDE). The processes as such are not added, only the parameters required for running the processes are added to the databases.

Prerequisites

You must have the complete Spatial Data Integrated Development Environment (SPIDE) installed as described in the blog Install and setup spatial data IDE. You must have setup Karttur’s GeoImagine Framework, either by importing - NOT YET AVAILABLE, by copying (drag and drop) - NOT YET AVAILABLE or by a manual download and setup by the package setup_db in the previous post. You must also have prepared a solution for how to link the Framework processes and the postgres database.

If you get stuck, please have a look at the pages on describing the Framework key concept and running processes - NOT YET AVAILABLE.

Framework processes

All functionalities of Karttur’s GeoImagine Framework are called processes and operate based on parameters defined in the Framework database. Thus a process must be defined in the database before it can be used. Processes are grouped in roots, where a root is usually associated either with a typical class of functions (e.g. overlay, scalar, export) or data sources (e.g Landsat, Sentinel, MODIS etc).

If you followed the tutorial on how to set up the database one root group (manageprocess) and one process (addsubproc) were inserted in the database. This added the capability of defining all other processes.

A complete list of both root and sub processes are available from the top menu, or here and here.

Python package setup_processes

The setup of processes is done from the special package setup_processes. This package contains four .py files, the standard modules __init__.py and version.py, plus one main module and one module for adding regions:

  • setup_process_main.py
  • setup_process_regions.py

The package also contains several subfolders. The package subfolder dbdoc contains all the core processes, whereas the other [https://github.com/karttur/geoimagine02-setup_processes/) contain thematic processes and default or template data related to different data source systems.

Get the package

If you cloned or imported the complete Framework, you already have the setup_processes package in your Eclipse PyDev project. If you need to add the package, follow the instruction in the previous post on setup_db, download [setup_processes package and create a sub-package also called setup_processes and drag the complete content of the download into that sub-package.

setup_processes_main.py

The main module, setup_process_main.py, only contains one linked text file process_karttur_setup_YYYYMMDD.txt.

if __name__ == "__main__":
    verbose = True
    ''' Link to project file that sets up all processes'''
    projFN = 'process_karttur_setup_YYYYMMDD.txt'
    Setup('dbdoc',projFN,verbose)

The textfile, however links to all the xml files (under the subfolder dbdoc/xml).

Running setup_processes_main.py installs all the interfaces for standard processing capabilities of the Framework.

setup_process_regions.py

The module setup_process_regions.py can be used to setup regional datasets, including the predefined tiling systems. It is the main topic of the next post.