Introduction
This post is the first hands-on post in the series of posts on "Regional synthesis" using Karttur’s GeoImagine Framework. In this post you are going to create the region to use for synthesising data, methods and models. The example uses the Okavango Inland Delta In Botswana but you can define any other region you like.
Prerequisites
To follow this post you must have setup the Karttur’s GeoImagine Framework as described in earlier posts.
If you define a region that stretches to higher latitudes than 50 degrees you need to calculate the Vertical Water Balance using the IMERG dataset instead of the TRMM dataset.
Karttur projects and regions
All the processes included in Karttur´s GeoImagine Framework must be associated with a user, a project, a region and a system. Running the Framework from xml files, these are defined in the <userproj> child tag:
userproj userid = 'karttur' projectid = 'karttur' tractid= 'karttur' siteid = '*' plotid = '*' system = 'system'></userproj>
For a process to be accepted at runtime, the user (userid) must 1) have sufficient privileges to run the process, and 2) either own or have rights to alter the defined region. The region is not explicitly stated, instead one of the three hierarchical levels of user defined spatial domains must be stated: tract, site or plot. These three levels are hierarchical so that a plot is always inside a site that is always inside a tract. A tract can contain any number of sites, and a site can contain any number of plots. Further, the tract must either be equal to a default region, or associated with a default region. If a plot is given, the processing will be for that plot alone; if a site is given the processing will be for that site alone (but including all plots associated with that site); if a tract is given the processing will be for the tract including all sites and plots associated with that tract.
Most processing, except export and mosaic, are only allowed at the lowest level of data organization. Put differently, the processing of ancillary data is only permissible at the original ancillary level. All processing of MODIS data is only allowed using MODIS tiled data, etc. This means that when assembling data for a region, the data to assemble must be pre-processed at their original levels. You can not import ancillary data to a region and then process the data using ancillary associated processes at tile or mosaic levels.
The conceptual idea behind this principle is to make the processing as efficient as possible while preventing duplicate processing. Behind the scenes the assembly of regional data is always done using tiled data at the requested system level (i.e. modis or mgrs. This means that if you create a region and an existing region already includes the same tiles (of say modis), then all the processing for your newly defined region that were done for the pre-existing region, are already ready and will not be redone.
Create a custom region
The Framework contains hundreds of default regions, including the world´s continents and countries. If your processing region coincides with a particular country or continent you just use that country/continent as your region.
In most cases it is, however, unlikely that the region you want to work with is identical to one of the default regions. You can then define your own region, albeit you still have to hook it to a default region. A customized region can be created either by importing a vector that defines the region, or by giving the co-ordinates (The latter is not included in the public version).
Create region from existing vector
Creating a customized region from an existing vector is a 2-stage process; first you have to import the vector as an ancillary layer, and then you define a project from that vector. The two processes to call are organizeancillary and ManageTractProj
Organize Ancillary
In the example below the region is defined in a shape file called oka-delta_mapbox.shp. The shape file contains a single polygon feature identifying the region. To import it use the standard import process for any ancillary data, organizeancillary.
Manage Tract Project
When you have imported the polygon you want to use for defining your region (tract), you can set up a new project by calling the process ManageTractProj.
There are some requirements on the naming of both tracts and projects, both must contain at least one hyphen (”-”), and the number of letters before and after the first hyphen must be at least five.
In the example, that will be used throughout this series of blog posts on "Regional synthesis" the tract and the project have the same name: karttur-okadelta.
The process ManageTractProj will seek out the MODIS (MODIS SIN grid) and Sentinel (MGRS) tiles covered by the region as requested. When sub-sequently running processes with the tractid set to karttur_okadelta they will operate exclusively on these identified tiles. Only when the data is explored or exported will the processing actually be restricted to the region as defined by the user (i.e. the polygon imported in the first step above).