Average rainfall 2001-2016, global tropics

Map: Average rainfall 2001-2016, global tropics

Karttur's GeoImagine Framework:
Link regions & system tiles

Thomas Gumbricht bio photo By Thomas Gumbricht

In karttur’s GeoImagine Framework a system refers to a projection with predefined tiles that can be used for processing spatiotemporal datasets. All spatial processing is related to a default region, but the actual processing is not done at the region as such, but based on predefined tiles of the system. This post describes the Framework process for linking a system projection to default regions.

Introduction

Every time you run a process in Karttur’s GeoImagine Framework you must state the projectid , tractid and system as part of the "userproject" defined in the json command structure:

{
  "postgresdb": {
    "db": "geoimagine"
  },
  "userproject": {
    "userid": "karttur",
    "projectid": "karttur",
    "tractid": "karttur",
    "siteid": "*",
    "plotid": "*",
    "system": "ease2n"
  },

The tractid is always linked to a default region, otherwise you can not define it. The default region is in turn linked to the predefined tiles of the system on which you operate. This is true even if you operate on a custom system that you defined yourself. In order for that to function you must link the default regions to the system that you work with, the topic of this post.

Prerequisites

To identify the linkages between your system tiles and the default regions, you must have defined the system and imported the default regions.

LinkDefaultRegionTiles

The process that links default regions to system tiles is LinkDefaultRegionTiles. The system to apply the process to is defined as part of the json object "userproject" (see Introduction), that also defines the projection to use (can not be changed). The parameters to set include:

  • defregmask (default region for restricting tile search),
  • regioncat (the region category to link),
  • ogr2ogr (whether to use ogr2ogr or python scripting for the process [boolean]),
  • cmdpath (command line path to ogr2ogr if required),
  • clipsrc (empty [default] or csv for src minx, miny, maxx, maxy),
  • clipdst (clip reporojected vector to system boundaries [boolean]),
  • wrapdateline (only for geographic projection [boolean]),
  • onlyregionsfullywithinsystem (only process regions that fall completely inside system boundaries [boolean]), and
  • checkfixvalidity (whether to check vector vaildity [boolean]),
  • onlytiling (skip the reprojection and only creates vectors of the overlapping tiles [boolean]).

defregmask

The parameter defregmask (default region mask) limits the tiling to an already existing tile region - for instance land (the parameter default value) if the new tile region should only contain tiles that include a terrestrial area.

regioncat

The regionacat (region category) shoud be set to a default region category that fits your system (e.g. country). You have to repeat the LinkDefaultRegionTiles process for each type of region category you want to link up the selected system.

ogr2ogr

If set to true, the parameter ogr2ogr directs the processing towards the utility program ogr2ogr. Otherwise the process will use python scripting.

ogr2ogr: clipsrc

In the current (December 2021) of the Framework, the parameter clipsrc is only relevant if ogr2ogr is true. Then the source (i.e. Geographic) datasource will be clipped prior to reprojection to the system projection. This is recommended for global projection, inlcuding MODIS and the thres EASE-grid project and tiling systems. The parameters clipsrc must be gien as a comma separeted string with “min longitude, min latitude, max longitude, max latitude”. clipsrc has precedense over clipdst.

ogr2ogr: clipdst

In the current (December 2021) of the Framework, the parameter clipdst is only relevant if ogr2ogr is true. clipdst is a bollean (true/false) parameter. If set to true the reproejction will be clipped to the boundary extent of the system projection itself.

ogr2ogr: wrapdateline

In the current (December 2021) of the Framework, the parameter wrapdateline is only relevant if ogr2ogr is true. And it comes into action only if the destination projection is Geographic coordinates. It is a boolean (true/false) parameter.

onlyregionsfullywithinsystem

onlyregionsfullywithinsystem is a boolean parameter. If set to true only those regions that are fully inside the system boundaries are added to the database. Regions that are partially outside are omitted. Regions that are fully outside of the system boundaries are always skipped.

onlytiling

oonlytiling is another boolean parameter. If set to true the process skips the reprojection step and only analysis the overlaps and produce vector representations of the overlapping tile.

Continent region tiles for the ease2n system

As an example, the json parameterization for linking default country regions to the ease2n system are under the Hide/Show button. The clipsrc parameter is set to the northern hemsiphere and onlyregionsfullywithinsystem is set to true. This will include all parts of the world’s continents north of the equator (see figure below).

image
Continental regions and tiles in the EASS-grid 2.0 North tiling and projection system.

EASE-grid 2 prepared setup

The post EASE-grid tile & projection system contains the complete installation of the EASE-grid 2 tiling and projection systems.