TerraLib and TerraView Wiki Page

Design and Implementation of TerraLib 5

This document presents the TerraLib 5 design and it gives an overview of its architecture. Only high level diagrams will be shown. The updated documentation generated by Doxygen is sometimes referenced to clarify all class details.

Architecture Overview of TerraLib Platform Modules

In TerraLib a module1) encapsulates a set of related functionalities. The following modules are provided in the TerraLib Platform:

Bindings

  • Java UNDER DEVELOPMENT

Cellular Spaces

Color

  • Color UNDER DEVELOPMENT

Common

The Common Runtime module contains the foundation classes and functions for all TerraLib modules:

  • Exception: type of exceptions thrown by TerraLib modules.
  • Globals: an static class with global definitions.
  • Library: a class for handling shared libraries.
  • Library Manager: a singleton that can be used to register the available libraries in the system.
    • TerraLib: an utility class to control the startup and cleanup of the TerraLib Platform and its resources.
    • Module: a singleton that defines an entry in the Platform for the TerraLib Common Runtime module.
  • Progress: a set of class that can be used to inform the progress of a process.
  • Unit of Measure: classes that deals with units of measure.

Data Access

This module provides the fundamental layer for applications that handle spatial data from different sources, ranging from traditional DBMSs to OGC Web Services.

  • General Concepts: explains the base data abstractions in this module and how to access and query some information from a data source.
  • Data Access Drivers: show details about the implementations for each kind of system or data format.
    • ADO <color red> UNDER DEVELOPMENT </color>
    • PostGIS <color red> UNDER DEVELOPMENT </color>
    • MySQL <color red> UNDER DEVELOPMENT </color>
    • SQLite <color red> UNDER DEVELOPMENT </color>
    • Memory <color red> UNDER DEVELOPMENT </color>
    • GDAL: <color red> UNDER DEVELOPMENT </color>
    • OGR: <color red> UNDER DEVELOPMENT </color>
    • TERRALIB4: <color red> UNDER DEVELOPMENT </color>

Data Types

The data type module implements the type system supported by TerraLib for dealing with data that comes from different data sources. The basic classes/concepts in this module are:

Geometry

The geometry module is responsible for providing:

  • The primitive geometric objects like points, lines and polygons;
  • Homogeneous and heterogeneous collections of geometries;
  • Polyhedral surfaces and Triangular Irregular Networks (TIN);
  • Curved geometries;
  • Spatial operations: topological relationship tests, metric, set operations;
  • Geometric transformations
  • Serialization routines for common data formats: WKB, WKT, …

Graph

The graph module provides a set of classes for the storage and manipulation of graphs:

  • Modelo Conceitual - Define o modelo de armazenamento dos dados e metadados no banco de dados.
  • Modelo de Dados - Define as estruturas do objetos que representam os elementos do grafo em memória.
  • Builders - São funções que servem como extratores de grafos.
  • MapTools - Definição de um layer e um renderer para que a TerraLib consiga se relacionar com os grafos.

Layout

The layout module provides a set of classes for creation maps.

MapTools

The MapTools module contains some basic abstractions for handling spatial data in the form of a map:

  • Canvas: <color red> TO BE DONE</color>
  • Layer: <color red> TO BE DONE</color>
  • MapDisplay: <color red> TO BE DONE</color>
  • Rendering Model: <color red> TO BE DONE</color>
  • Table: an abstraction that provides a logical view over a data table.

Metadata

This module as well as its documentation are under construction

OGC

Plugin

TerraLib comes with a simple framework to help in dynamic module management. It provides support for the startup and shutdown of modules loaded at run time. These modules loaded at runtime are hereafter called plugins. A plugin is just a thin wrapper for a component that allows it to be loaded dynamically. For C++ this means DLLs, Shared Objects (SO), Dynamic Libraries (DYLIB) or even scripts written in Lua, R or any other supported language. See the section below for a deep discussion about this module.

Qt

TerraLib provides some geosptial components and a framework based on Qt. You can read more about the design of this support in the basic concepts section. The Qt support is organized as follows:

  • Widgets: GUI components for dealing with geospatial concepts.
  • Designer Components: a set of components that can be used inside Qt Designer for rapid development of new forms.
  • Application Framework: a framework to help customizing an application built on top of TerraLib's Qt Components. Notice that components can be used without this framework. See this section for more details.

Raster

This module can be used to manage geographical data with raster representation.

General Concepts

Raster drivers:

  • GDAL: this multi-driver allows applications to access raster data stored in traditional raster formats.
  • GRIB: allows applications to access spatial data (raster) in GRIB files.
  • Memory: this driver allows applications to manipulate rasters in memory.
  • CachedRaster: a RAM cache adaptor to an external existent raster that must always be avaliable.
  • ProxyRaster: a proxy class for bands of several rasters over the same region.
  • idlRaster: an adaptor to an external existent raster in a idl array form.
  • PostGIS Raster: allows applications to access raster data stored in a PostgreSQL database through the PostGIS extension.
  • SQLite: allows applications to access raster data stored in an SQLite database.
  • Expansible Raster: A raster (stored in memory and eventually swapped to disk) where it is possible to dynamically add lines/columns.

Raster Processing

This module provides classes and functions with raster processing capabilities. See the general concepts here.

They are organized as follows:

  • Classifier: Detects patterns in image regions using different methods.
  • Contrast: Basic image contrast enhancement following the supplied parameters.
  • Filtering: Filters include pixel-based techniques like masks, convolution, low-pass and high-pass filtering to smooth or sharpen images.
  • Fusion: Fusion includes techniques to combine pixel information from different sensors to obtain better spatial resolution.
  • Mixture Model: Raster decomposition using mixture model.
  • Mosaic: Merges two or more rasters into a single raster.
  • Register: Image registration.
  • Segmenter: Image segmentation covers techniques for splitting one image into its components as homogeneous regions.

Resources

Schemas

  • OGC: XML schemas from OGC.
  • TerraLib: XML schemas for TerraLib concepts/conteiners.

Spatial Reference System (SRS)

  • The SRS deals with the representation of Spatial Reference System and with the transformation of coordinates between two different SRS.

See also the description of a Qt component that represents the concepts of the SRS here.

Spatiotemporal (ST)

This module contains classes to deal with spatiotemporal information.

Spatial Statistics

TerraView

Tools

The TerraLib Platform accompanies some utility applications that can be run in command line interface (CLI) or graphical enviroments (GUI):

  • te_dsinfo: an application that shows information about a data source.
  • te_dscopy: an application that copy data from one data source to another. It can be used as an import or export tool.
  • Plugin Builder: an application that helps to create new TerraLib plugins.

Vector Processing

This module provides classes and functions with vector processing capabilities. See the general concepts here.

They are organized as follows:

1) Sometimes, according to the programming language or software platform, people prefer to use other names for a module, like: package, unit, component, service, micro-kernel.