Average rainfall 2001-2016, global tropics

Map: Average rainfall 2001-2016, global tropics

Regions

Introduction

In Karttur’s GeoImagine Framework all spatial data processing requires a pre-defined region. When you setup the Framework database the top region globe was added to the system. All other regions are hierarchically defined starting from globe. In this post you will add pre-defined regions and create the links between regions and the two tiling systems used with the framework: modis and mgrs.

Prerequisites

You must have the complete SPIDE installed as described in the blog Install and setup spatial data IDE. You must also have setup Karttur’s GeoImagine Framework, either by importing or by copying (drag and drop). You must also have setup the complete Framework database as described in of the previous posts.

How to run processes, including the setup described in this post, is covered in an earlier post. The xml files required for running the processes described in the post are included in the setup_processes package. To understand the structure of the xml file you can read this post.

If your PyDev project does not compile and stop because imports are not found, check which package that is lacking and use the post on Additional packages for support on adding the missing package to you PyDev project.

Python module

The setup of regions is done from the python module setup_process_regions.py. In the main section you can define which parts to install. If you want to change the region categories or default regions that are installed you need to edit the linked xml files.

Region categories

As mentioned in the Introduction, the top region is predefined as the entire globe. In the Framework the globe region belongs to the stratum 0. stratum 0 only contains this single region. To accommodate all other potential regions, the following hierarchical region categories are defined:

Stratum Name Parent
0 globe self
1 global globe
2 pancontinent global
2 panoceanic global
3 continent pancontinent
3 marinecontinent global
3 oceanic panoceanic
4 subcontinent continent
4 marinesubcontinent marinecontinent
4 suboceanic oceanic
5 basin pancontinent
6 subbasin basin
5 sovereign global
6 country sovereign
6 marinecountry global
6 continentcountry subcontinent
6 marinecontinentcountry marinesubcontinent
7 state country
8 province state
9 district province
10 community district
11 quarter community
12 domain any
12 tract any
13 site tract

While all processing is related to pre-defined regions at stratum 1 to 11, all user projects must be associated with a tract (stratum 12) that can be divided into sites (stratum 13). All tracts are associated with one (1), and only one, default region (at stratum 1 to 11).

Region categories are added to the Framework through the process regioncategories. The xml file below adds all the categories listed above, and also outlines the differences between different categories.

the above xml file is included in regions_karttur_setup_20181116.txt, and if you set DefaultRegions to True in the main section on setup_process_regions.py (hidden above) and run the script, the default region categories will be added to the Framework.

Adding default regions

Default regions (at stratum 1 to 11) can be added using either a rectangular area defined from the corner points or from existing polygons. The Framework comes with two types of default regions: arbitrary (rectangular) default regions, and the world’s continents and countries in two different formats (bounded by the land-sea shoreline and including marine areas). If you run the module setup_process_regions.py with DefaultRegions set to True all the default arbitrary regions as well as both formats of global continents and countries are added.

Arbitrary default regions

The Framework comes with the option to define a number of (arbitrary) default regions, including for tropical, subtropical, temperate and arctic regions. You do not need to add these regions unless you intend to work with them.

The pre-defined arbitrary regions also include a special region, trmm, that coincide with the global rainfall estimates from the Tropical Rainfall Measusrement Missions (TRMM) mission. If you intend to use the TRMM rainfall data, please make sure that you add the trmm region.

All the arbitrary regions are defined from corner coordinates and are added to the Framework with the process defaultregion.

Global country datasets

The Framework contains cleaned and prepared datasets for:

  • global countries (country)
  • global countries per continent (continentcountry)
  • continental sub-Regions (subcontinent)
  • continents (contient)
  • marine countries (marinecountry)
  • marine continent countries (marinecontinentcountry)
  • marine continents (marinecontinent)
  • marine continent subregions (marinesubcontinent)

The first four are based on the 2014 national boundaries with polygons at high spatial resolution following the coastline. The last four “marine” versions include the maritime area. The latter polygons are thus guaranteed to contain all coastal and near-shore areas. Before converting the datasets to default regions you must import them as ancillary layers using the process organizeancillary.

Regions from vectors

With the polygon data imported, you can convert the content to default regions with the process defaultregionfromvector. In order for that to work, the attribute table of the polygons must contain the following pre-defined columns:

  • name
  • category
  • parentid
  • parentcat

Adding default system layers and data

The module setup_process_regions.py also contains options for installing and defining system layers and data, including for:

  • MODIS
  • Landsat
  • Sentinel
  • Ancillary
  • Climate

In the main section of setup_process_regions.py, change the boolean variable defining whether to install the feature you are interested to True and run the module.

If you intend to use the Framework for calculations with any satellite data, you need to setup either the MODIS or Sentinel systems (or both).