| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Attributes
TeDecoder Class Reference

An abstract class to decode raster data. More...

`#include <TeDecoder.h>`

Inheritance diagram for TeDecoder:

List of all members.

## Public Member Functions

| TeDecoder ()
| Empty constructor.
| TeDecoder (const TeRasterParams &par)
| Constructor from raster parameters.
virtual | ~TeDecoder ()
| Virtual destructor.
TeRasterParams & | params ()
| Returns the raster parameters.
void | updateParams (TeRasterParams &par)
| Updates the raster parameters.
virtual bool | setElement (int col, int lin, double val, int band=0)=0
| Sets the value of a specific raster element.
virtual bool | setElementRGB (int col, int lin, double Rval, double Gval, double Bval, unsigned int=255)
| An optimizated method to set values raster images.
virtual bool | getElement (int col, int lin, double &val, int band=0)=0
| Gets an specific element (col, lin, band) of a raster data.
virtual TeCoord2D | coord2Index (const TeCoord2D &pt)
| Transforms a geographical coordinate to an index (lin, col) coordinate.
virtual TeCoord2D | index2Coord (const TeCoord2D &pt)
| Transforms an index (lin, col) coordinate to a geographical coordinate.
virtual void | init (TeRasterParams &par)
| Initializes the internal structures of the decoder from a raster parameters structure.
virtual void | init ()=0
| Initializes the internal structures of the decoder.
virtual bool | clear ()=0
| Clears its internal structures.
Selection
These routines are used to implement a selection of blocks or tiles that intercept a given bounding box, and provide sequential access to them. These routines should be implemented by concrete decoders to formats that support tilling.
virtual bool | selectBlocks (TeBox &, int, TeRasterParams &)
| Returns TRUE if it there are raster blocks that intersect a given box.
virtual int | numberOfSelectedBlocks ()
| Returns the number of blocks selected in the last block selection.
virtual bool | getSelectedRasterBlock (TeDecoderMemory *)
| Gets a decoder to the current selected block.
virtual void | clearBlockSelection ()
| Clear a previous block selection.
virtual int | bestResolution (TeBox &, int, int, TeProjection *)
| Returns the raster best resolution level available to fill a given bounding box with a given number of lines and columns in a given projection.
virtual int | bestResolution (double)
| Returns the raster resolution level available that is more similiar to a given desired resolution.

## Static Public Member Functions

static TeDecoder * | DefaultObject (const TeRasterParams &par)
| Returns a default object - for compatibility reasons with TeDecoderFactory.

## Protected Attributes

TeRasterParams | params_
| The parameters that describes a raster data.

## Detailed Description

An abstract class to decode raster data.

## Constructor & Destructor Documentation

TeDecoder::TeDecoder | ( |  | ) |

Empty constructor.

TeDecoder::TeDecoder | ( | const TeRasterParams & | par | ) |

Constructor from raster parameters.

Parameters:

  par | raster parameters

TeDecoder::~TeDecoder | ( |  | ) | `[virtual]`

Virtual destructor.

## Member Function Documentation

int TeDecoder::bestResolution | ( | TeBox & | ,
|  | int | ,
|  | int | ,
|  | TeProjection * |
| ) |  | `[virtual]`

Returns the raster best resolution level available to fill a given bounding box with a given number of lines and columns in a given projection.

Reimplemented in TeDecoderMrSID, and TeDecoderDatabase.

int TeDecoder::bestResolution | ( | double |  | ) | `[virtual]`

Returns the raster resolution level available that is more similiar to a given desired resolution.

Reimplemented in TeDecoderMrSID.

virtual bool TeDecoder::clear | ( |  | ) | `[pure virtual]`

Clears its internal structures.

Implemented in TeGDALDecoder, TeDecoderMrSID, TeDecoderQtImage, TeDecoderASCIIGrid, TeDecoderDatabase, TeDecoderJPEG, TeDecoderMemory, TeDecoderMemoryMap, TeDecoderSmartMem, TeDecoderSPR, TeDecoderTIFF, and TeDecoderVirtualMemory.

void TeDecoder::clearBlockSelection | ( |  | ) | `[virtual]`

Clear a previous block selection.

Reimplemented in TeDecoderMrSID, and TeDecoderDatabase.

TeCoord2D TeDecoder::coord2Index | ( | const TeCoord2D & | pt | ) | `[virtual]`

Transforms a geographical coordinate to an index (lin, col) coordinate.

TeDecoder * TeDecoder::DefaultObject | ( | const TeRasterParams & | par | ) | `[static]`

Returns a default object - for compatibility reasons with TeDecoderFactory.

virtual bool TeDecoder::getElement | ( | int | col,
|  | int | lin,
|  | double & | val,
|  | int | band = `0`
| ) |  | `[pure virtual]`

Gets an specific element (col, lin, band) of a raster data.

Parameters:

  col | element column identifier
  lin | element line identifier
  val | element value being retrieved
  band | element band identifier

Implemented in TeDecoderMrSID, TeDecoderQtImage, TeDecoderASCIIGrid, TeDecoderJPEG, TeDecoderMemory, TeDecoderMemoryMap, TeDecoderSmartMem, TeDecoderTIFF, and TeDecoderVirtualMemory.

bool TeDecoder::getSelectedRasterBlock | ( | TeDecoderMemory * |  | ) | `[virtual]`

Gets a decoder to the current selected block.

Reimplemented in TeDecoderMrSID, and TeDecoderDatabase.

TeCoord2D TeDecoder::index2Coord | ( | const TeCoord2D & | pt | ) | `[virtual]`

Transforms an index (lin, col) coordinate to a geographical coordinate.

virtual void TeDecoder::init | ( |  | ) | `[pure virtual]`

Initializes the internal structures of the decoder.

Implemented in TeGDALDecoder, TeDecoderMrSID, TeDecoderPAM, TeDecoderQtImage, TeDecoderASCIIGrid, TeDecoderDatabase, TeDecoderJPEG, TeDecoderMemory, TeDecoderMemoryMap, TeDecoderSmartMem, TeDecoderSPR, TeDecoderTIFF, and TeDecoderVirtualMemory.

void TeDecoder::init | ( | TeRasterParams & | par | ) | `[virtual]`

Initializes the internal structures of the decoder from a raster parameters structure.

int TeDecoder::numberOfSelectedBlocks | ( |  | ) | `[virtual]`

Returns the number of blocks selected in the last block selection.

Reimplemented in TeDecoderMrSID, and TeDecoderDatabase.

TeRasterParams & TeDecoder::params | ( |  | ) |

Returns the raster parameters.

bool TeDecoder::selectBlocks | ( | TeBox & | ,
|  | int | ,
|  | TeRasterParams & |
| ) |  | `[virtual]`

Returns TRUE if it there are raster blocks that intersect a given box.

Reimplemented in TeDecoderMrSID, and TeDecoderDatabase.

virtual bool TeDecoder::setElement | ( | int | col,
|  | int | lin,
|  | double | val,
|  | int | band = `0`
| ) |  | `[pure virtual]`

Sets the value of a specific raster element.

Parameters:

  col | element column identifier
  lin | element line identifier
  val | element value being inserted
  band | element band identifier

Implemented in TeGDALDecoder, TeDecoderMrSID, TeDecoderQtImage, TeDecoderASCIIGrid, TeDecoderJPEG, TeDecoderMemory, TeDecoderMemoryMap, TeDecoderSmartMem, TeDecoderSPR, TeDecoderTIFF, and TeDecoderVirtualMemory.

bool TeDecoder::setElementRGB | ( | int | col,
|  | int | lin,
|  | double | Rval,
|  | double | Gval,
|  | double | Bval,
|  | unsigned | int = `255`
| ) |  | `[virtual]`

An optimizated method to set values raster images.

Reimplemented in TeDecoderQtImage.

void TeDecoder::updateParams | ( | TeRasterParams & | par | ) |

Updates the raster parameters.

## Member Data Documentation

TeRasterParams TeDecoder::params_`[protected]`

The parameters that describes a raster data.

The documentation for this class was generated from the following files:

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeDecoder.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeDecoder.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines