| TerraLib 4.1

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

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

Public Types | Public Member Functions | Public Attributes
TeRasterParams Class Reference

A class to handle the parameters set associated with a raster data. More...

`#include <TeRasterParams.h>`

List of all members.

## Public Types

enum | TeRasterInterLeavingMode { TePerPixel, TePerLine, TePerBand }
| Pixels interleaving mode: used by rasters in memory and files in raw formats. More...
enum | TeRasterPhotometricInterpretation { TeUnknown, TePallete, TeMultiBand, TeRGB }
| Photometric interpretation of a raster data. More...
enum | TeRasterStatus { TeNotReady, TeReadyToRead, TeReadyToWrite }
| Status of a raster data, in terms of reading and writting possibilities. More...
enum | TeRasterCompressionMode { TeNoCompression, TeZLib, TeJpeg, TeTiffCompression }
| Compression modes of a raster data. More...
enum | TeRasterTilingType { TeExpansible = 1, TeNoExpansible = 2 }
| Tiling type modes to store raster data in a TerraLib database. More...
typedef std::pair< std::string, std::string > | DecoderParamT
| Decoder parameter in a form <param_name,param_value> (This parameter is specific for each decoder, please consult each TeDecoder inherited class for reference).

## Public Member Functions

| TeRasterParams ()
| Default contructor.
| TeRasterParams (const TeRasterParams &other)
| Copy constructor.
TeRasterParams & | operator= (const TeRasterParams &rhs)
| Operator=.
virtual | ~TeRasterParams ()
| Destructor.
void | nBands (int n)
| Sets the number of bands, or dimentions in a raster data.
void | projection (TeProjection *proj)
| Sets the projection.
TeProjection * | projection ()
| Returns the projection.
TeCoord2D | coord2Index (const TeCoord2D &pt) const
| Transform a coordinate from world domain to line/column domain.
TeCoord2D | index2Coord (const TeCoord2D &pt) const
| Transform a coordinate from line/column domain to world domain.
const string & | decName () const
| Returns the identifier of the decoder associated to the raster.
int | nBands () const
| Returns the number of bands of the raster.
void | writeParametersFile ()
| Saves the parameters in a ASCII File, in TerraLib format.
void | readParametersFile ()
| Reads the parameters described in a ASCII File, in TerraLib format.
Extension
Methods to deal with the spatial extensions of a raster data
const TeBox & | box () const
| Returns the box based on the coordinates of center of the corner elements.
TeBox | boundingBox () const
| Returns the outline box.
void | boundingBoxResolution (double x1, double y1, double x2, double y2, double resx, double resy, TeBox::TeBoxCorner lock=TeBox::TeUPPERLEFT)
| Sets extension parameters.
void | boundingBoxLinesColumns (double x1, double y1, double x2, double y2, int nlines, int ncols, TeBox::TeBoxCorner lock=TeBox::TeUPPERLEFT)
| Sets extension parameters.
void | boxResolution (double x1, double y1, double x2, double y2, double resx, double resy, TeBox::TeBoxCorner lock=TeBox::TeUPPERLEFT)
| Sets extension parameters.
void | boxLinesColumns (double x1, double y1, double x2, double y2, int nlines, int ncols, TeBox::TeBoxCorner lock=TeBox::TeUPPERLEFT)
| Sets extension parameters.
void | topLeftResolutionSize (double left, double top, double resx, double resy, int ncol, int nlin, bool coordIsCentrePixel=true)
| Sets extension parameters.
void | lowerLeftResolutionSize (double left, double lower, double resx, double resy, int ncol, int nlin, bool coordIsCentrePixel=true)
| Sets extension parameters.
void | setNLinesNColumns (int nlines, int ncolumns)
| Sets default extension parameters.
void | resizeToTiling (TeBox &bb, int bWidth, int bHeight)
| Resizes the raster bounding box to cut it exactly in tiles of a give size.

## Public Attributes

int | nlines_
| number of lines
int | ncols_
| number of columns
double | resx_
| horizontal resolution
double | resy_
| vertical resolution
bool | swap_
| a flag to indicate that the values of the elements of the raster are swapped
bool | useDummy_
| a flag to indicate that raster has dummy values
char | mode_
| a character indicating the access mode to the raster data: 'r', 'w' or 'c'
TeRasterStatus | status_
TeTime | date_
| Status for reading and writing to raster.
std::vector< DecoderParamT > | decoderParams_
| Decoder parameters (This parameter is specific for each decoder, please consult each TeDecoder inherited class for reference).
string | decoderIdentifier_
| decoder associated to his raster
TeRasterInterLeavingMode | interleaving_
| interleaving mode
string | errorMessage_
| String that contains any error or warning message that raster manipulation might have detected.
Resolution level parameters
Used when raster has different levels of resolution
int | resolution_
int | subBand_
| resolution level
File parameters
sub band identification Used when raster is stored in files
string | fileName_
| name of a raster file
int | offset_
| offset
Tilling parameters
TeRasterTilingType | tiling_type_
| raster tiling mode
int | blockHeight_
| tiles height
int | blockWidth_
| tiles width
int | nTilesInMemory_
| number of tiles to be kept in memory
string | blockId_
| tiles identification
TeDatabase * | database_
| pointer to a TerraLib database where the raster is stored
int | layerId_
| identification of the layer that contains the raster
string | objectId_
| identification of an object associated to this raster geometry

## Parameters variable per band

vector< int > | nbitsperPixel_
| number of bits per pixel
vector< double > | vmin_
| minimum value
vector< double > | vmax_
| maximum value
vector< int > | bands_
| bands information
vector< double > | dummy_
| no data value
vector< string > | bandName_
| band name
vector < TeRasterPhotometricInterpretation > | photometric_
| photometric interpretation
vector< TeRasterCompressionMode > | compression_
| compression type
vector< TeDataType > | dataType_
| computational size of elements
void | setDataType (TeDataType type, int band=-1)
| Sets the size of the elements in a particular or in every band.
int | elementSize (int band=0)
| Returns the size in bytes of each raster element.
void | setPhotometric (TeRasterPhotometricInterpretation photom, int band=-1)
| Sets the photometric type in a particular or in every band.
void | setCompressionMode (TeRasterCompressionMode cmode, int band=-1)
| Sets the compression mode of each band.
void | setDummy (double dummy, int band=-1)
| Sets the dummy value in each band.
void | setBandName (string name, int band)
| Sets the band name in each band.

## Raster pallete

Look up table associated to a raster
string | lutName_
| name of a lut table associated to this raster
vector< unsigned short > | lutr_
| red pallete
vector< unsigned short > | lutg_
| green pallete
vector< unsigned short > | lutb_
| blue pallete
vector< string > | lutClassName_
| class name
const string & | lutName ()
| Returns the name of the lut.

## Navigation parameters

Parameters associated to translation/rotation of the positioning of the raster data
double | dxJ_
| X offset due to increase of one column position.
double | dxI_
| X offset due to increase of one line position.
double | dyJ_
| Y offset due to increase of one column position.
double | dyI_
| Y offset due to increase of one line position.
double | x0_
| X coordinate of the upper left raster element.
double | y0_
| Y coordinate of the upper left raster element.
void | setNavigationParameters (const vector< double > &nwf)
void | getNavigationParameters (vector< double > &nwf)

## Detailed Description

A class to handle the parameters set associated with a raster data.

This class is a data structure to store and manipulate a set of parameters and definitions that characterizes a raster data. It contains parameters relative to storaging, geographical or interpretation aspects. Not all parameters are valid, or make sense, for all raster data. Most parameters are public and can be accessed directly. The private ones should be acessed through the methods provided.

See also:
  TeRaster

Examples:

  importGridData.cpp, TePDIBlender_test.cpp, TePDIColorTransform_test.cpp, TePDICorrelationMatching_test.cpp, TePDIFFT_test.cpp, TePDIHants_test.cpp, TePDIHistogram_test.cpp, TePDIInterpolator_test.cpp, TePDIMIMatching_test.cpp, TePDIMixModel_test.cpp, TePDIMMIOMatching_test.cpp, TePDIMorfFilter_test.cpp, TePDIMosaic_test.cpp, TePDIOFMatching_test.cpp, TePDIParallelSegmenter_test.cpp, TePDIRaster2Vector_test.cpp, TePDIRegister_test.cpp, TePDIUtils_test.cpp, and TePDIWavelets_test.cpp.

## Member Typedef Documentation

typedef std::pair< std::string, std::string > TeRasterParams::DecoderParamT

Decoder parameter in a form <param_name,param_value> (This parameter is specific for each decoder, please consult each TeDecoder inherited class for reference).

## Member Enumeration Documentation

enum TeRasterParams::TeRasterCompressionMode

Compression modes of a raster data.

Enumerator:

  TeNoCompression |
  TeZLib |
  TeJpeg |
  TeTiffCompression |

enum TeRasterParams::TeRasterInterLeavingMode

Pixels interleaving mode: used by rasters in memory and files in raw formats.

Enumerator:

  TePerPixel |
  TePerLine |
  TePerBand |

enum TeRasterParams::TeRasterPhotometricInterpretation

Photometric interpretation of a raster data.

Enumerator:

  TeUnknown |
  TePallete |
  TeMultiBand |
  TeRGB |

enum TeRasterParams::TeRasterStatus

Status of a raster data, in terms of reading and writting possibilities.

Enumerator:

  TeNotReady |
  TeReadyToRead |
  TeReadyToWrite |

enum TeRasterParams::TeRasterTilingType

Tiling type modes to store raster data in a TerraLib database.

Enumerator:

  TeExpansible |
  TeNoExpansible |

## Constructor & Destructor Documentation

TeRasterParams::TeRasterParams | ( |  | ) | `[inline]`

Default contructor.

TeRasterParams::TeRasterParams | ( | const TeRasterParams & | other | ) |

Copy constructor.

virtual TeRasterParams::~TeRasterParams | ( |  | ) | `[inline, virtual]`

Destructor.

## Member Function Documentation

TeBox TeRasterParams::boundingBox | ( |  | ) | const

Returns the outline box.

Calculates the *bounding box* when box coordinates are relative to the center of the pixel.

void TeRasterParams::boundingBoxLinesColumns | ( | double | x1,
|  | double | y1,
|  | double | x2,
|  | double | y2,
|  | int | nlines,
|  | int | ncols,
|  | TeBox::TeBoxCorner | lock = `TeBox::TeUPPERLEFT`
| ) |  |

Sets extension parameters.

Examples:
  TePDIFFT_test.cpp, TePDIMMIOMatching_test.cpp, and TePDIOFMatching_test.cpp.

void TeRasterParams::boundingBoxResolution | ( | double | x1,
|  | double | y1,
|  | double | x2,
|  | double | y2,
|  | double | resx,
|  | double | resy,
|  | TeBox::TeBoxCorner | lock = `TeBox::TeUPPERLEFT`
| ) |  |

Sets extension parameters.

const TeBox& TeRasterParams::box | ( |  | ) | const`[inline]`

Returns the box based on the coordinates of center of the corner elements.

void TeRasterParams::boxLinesColumns | ( | double | x1,
|  | double | y1,
|  | double | x2,
|  | double | y2,
|  | int | nlines,
|  | int | ncols,
|  | TeBox::TeBoxCorner | lock = `TeBox::TeUPPERLEFT`
| ) |  |

Sets extension parameters.

void TeRasterParams::boxResolution | ( | double | x1,
|  | double | y1,
|  | double | x2,
|  | double | y2,
|  | double | resx,
|  | double | resy,
|  | TeBox::TeBoxCorner | lock = `TeBox::TeUPPERLEFT`
| ) |  |

Sets extension parameters.

Examples:
  TePDIFFT_test.cpp.

TeCoord2D TeRasterParams::coord2Index | ( | const TeCoord2D & | pt | ) | const

Transform a coordinate from world domain to line/column domain.

const string& TeRasterParams::decName | ( |  | ) | const`[inline]`

Returns the identifier of the decoder associated to the raster.

int TeRasterParams::elementSize | ( | int | band = `0` | ) |

Returns the size in bytes of each raster element.

void TeRasterParams::getNavigationParameters | ( | vector< double > & | nwf | ) |

Returns the georeferecing parameters

Parameters:

  nwf | vector of double to return the navigation parameters set
      		The Navigation parameters describe a transformation from column/line domain (i,j)
              to geographical world (x,y), so that:
      		| x = x0 + i*dxJ + j*dxI
      		| y = y0 + i*dyJ + j*dyI

      		and:

      		|i = (dyI*(x-x0) - dxI*(y-y0)) / (dxJ*dyI-dyJ*dxI)
      		|j = (dyJ*(x-x0) - dxJ*(y-y0)) / (dyJ*dxI-dxJ*dyI)

      		where:
      		nwf[0] = dxJ : the offset in the X direction along each column
      		nwf[1] = dxI : the offset in the X direction along each line
      		nwf[2] = dyJ : the offset in the Y direction along each column
      		nwf[3] = dyI : the offset in the Y direction along each line
      		nwf[4] = x0  : X coordinate of the center of the upper left raster element
      		nwf[5] = y0  : Y coordinate of the center of the upper left raster element

TeCoord2D TeRasterParams::index2Coord | ( | const TeCoord2D & | pt | ) | const

Transform a coordinate from line/column domain to world domain.

void TeRasterParams::lowerLeftResolutionSize | ( | double | left,
|  | double | lower,
|  | double | resx,
|  | double | resy,
|  | int | ncol,
|  | int | nlin,
|  | bool | coordIsCentrePixel = `true`
| ) |  |

Sets extension parameters.

Examples:
  importGridData.cpp.

const string& TeRasterParams::lutName | ( |  | ) | `[inline]`

Returns the name of the lut.

void TeRasterParams::nBands | ( | int | n | ) |

Sets the number of bands, or dimentions in a raster data.

Examples:
  importGridData.cpp, TePDIBlender_test.cpp, TePDIColorTransform_test.cpp, TePDICorrelationMatching_test.cpp, TePDIFFT_test.cpp, TePDIHants_test.cpp, TePDIHistogram_test.cpp, TePDIInterpolator_test.cpp, TePDIMIMatching_test.cpp, TePDIMixModel_test.cpp, TePDIMMIOMatching_test.cpp, TePDIMorfFilter_test.cpp, TePDIMosaic_test.cpp, TePDIOFMatching_test.cpp, TePDIParallelSegmenter_test.cpp, TePDIRaster2Vector_test.cpp, TePDIRegister_test.cpp, TePDIUtils_test.cpp, and TePDIWavelets_test.cpp.

int TeRasterParams::nBands | ( | void |  | ) | const`[inline]`

Returns the number of bands of the raster.

TeRasterParams & TeRasterParams::operator= | ( | const TeRasterParams & | rhs | ) |

Operator=.

void TeRasterParams::projection | ( | TeProjection * | proj | ) |

Sets the projection.

Examples:
  importGridData.cpp, TePDIFFT_test.cpp, and TePDIUtils_test.cpp.

TeProjection* TeRasterParams::projection | ( |  | ) | `[inline]`

Returns the projection.

void TeRasterParams::readParametersFile | ( |  | ) |

Reads the parameters described in a ASCII File, in TerraLib format.

void TeRasterParams::resizeToTiling | ( | TeBox & | bb,
|  | int | bWidth,
|  | int | bHeight
| ) |  |

Resizes the raster bounding box to cut it exactly in tiles of a give size.

Parameters:

  bb | an initial bounding box
  bWidth | block width (in number of elements/pixels)
  bHeight | block height (in number of elements/pixels)

Note:
  keeps the defined X an Y resolutions

void TeRasterParams::setBandName | ( | string | name,
|  | int | band
| ) |  |

Sets the band name in each band.

void TeRasterParams::setCompressionMode | ( | TeRasterParams::TeRasterCompressionMode | cmode,
|  | int | band = `-1`
| ) |  |

Sets the compression mode of each band.

void TeRasterParams::setDataType | ( | TeDataType | type,
|  | int | band = `-1`
| ) |  |

Sets the size of the elements in a particular or in every band.

Examples:
  importGridData.cpp, TePDIBlender_test.cpp, TePDIColorTransform_test.cpp, TePDICorrelationMatching_test.cpp, TePDIFFT_test.cpp, TePDIHistogram_test.cpp, TePDIInterpolator_test.cpp, TePDIMIMatching_test.cpp, TePDIMixModel_test.cpp, TePDIMMIOMatching_test.cpp, TePDIMosaic_test.cpp, TePDIParallelSegmenter_test.cpp, TePDIRaster2Vector_test.cpp, TePDIRegister_test.cpp, TePDIUtils_test.cpp, and TePDIWavelets_test.cpp.

void TeRasterParams::setDummy | ( | double | dummy,
|  | int | band = `-1`
| ) |  |

Sets the dummy value in each band.

Examples:
  TePDIMorfFilter_test.cpp, and TePDIRaster2Vector_test.cpp.

void TeRasterParams::setNavigationParameters | ( | const vector< double > & | nwf | ) |

Sets the navigation parameters

Parameters:

  nwf | the navigation parameters set

Note:
  this method should be called after the number of lines and columns has been set

    		The Navigation parameters describe a transformation from column/line domain (i,j)
            to geographical world (x,y), so that:
    		| x = x0 + i*dxJ + j*dxI
    		| y = y0 + i*dyJ + j*dyI

    		and:

    		|i = (dyI*(x-x0) - dxI*(y-y0)) / (dxJ*dyI-dyJ*dxI)
    		|j = (dyJ*(x-x0) - dxJ*(y-y0)) / (dyJ*dxI-dxJ*dyI)

    		where:
    		nwf[0] = dxJ : the offset in the X direction along each column
    		nwf[1] = dxI : the offset in the X direction along each line
    		nwf[2] = dyJ : the offset in the Y direction along each column
    		nwf[3] = dyI : the offset in the Y direction along each line
    		nwf[4] = x0  : X coordinate of the center of the upper left raster element
    		nwf[5] = y0  : Y coordinate of the center of the upper left raster element

void TeRasterParams::setNLinesNColumns | ( | int | nlines,
|  | int | ncolumns
| ) |  |

Sets default extension parameters.

Examples:
  TePDIColorTransform_test.cpp, TePDICorrelationMatching_test.cpp, TePDIHistogram_test.cpp, TePDIInterpolator_test.cpp, TePDIMIMatching_test.cpp, TePDIMMIOMatching_test.cpp, TePDIMosaic_test.cpp, TePDIParallelSegmenter_test.cpp, TePDIRaster2Vector_test.cpp, TePDIRegister_test.cpp, and TePDIUtils_test.cpp.

void TeRasterParams::setPhotometric | ( | TeRasterParams::TeRasterPhotometricInterpretation | photom,
|  | int | band = `-1`
| ) |  |

Sets the photometric type in a particular or in every band.

Examples:
  TePDIColorTransform_test.cpp, TePDIFFT_test.cpp, TePDIHistogram_test.cpp, TePDIMMIOMatching_test.cpp, TePDIMorfFilter_test.cpp, TePDIMosaic_test.cpp, and TePDIUtils_test.cpp.

void TeRasterParams::topLeftResolutionSize | ( | double | left,
|  | double | top,
|  | double | resx,
|  | double | resy,
|  | int | ncol,
|  | int | nlin,
|  | bool | coordIsCentrePixel = `true`
| ) |  |

Sets extension parameters.

void TeRasterParams::writeParametersFile | ( |  | ) |

Saves the parameters in a ASCII File, in TerraLib format.

## Member Data Documentation

vector<string> TeRasterParams::bandName_

band name

vector<int> TeRasterParams::bands_

bands information

int TeRasterParams::blockHeight_

tiles height

string TeRasterParams::blockId_

tiles identification

int TeRasterParams::blockWidth_

tiles width

vector<TeRasterCompressionMode> TeRasterParams::compression_

compression type

TeDatabase* TeRasterParams::database_

pointer to a TerraLib database where the raster is stored

vector<TeDataType> TeRasterParams::dataType_

computational size of elements

TeTime TeRasterParams::date_

Status for reading and writing to raster.

The date of the raster

string TeRasterParams::decoderIdentifier_

decoder associated to his raster

Examples:
  TePDIColorTransform_test.cpp, TePDICorrelationMatching_test.cpp, TePDIMIMatching_test.cpp, and TePDIMMIOMatching_test.cpp.

std::vector< DecoderParamT > TeRasterParams::decoderParams_

Decoder parameters (This parameter is specific for each decoder, please consult each TeDecoder inherited class for reference).

vector<double> TeRasterParams::dummy_

no data value

double TeRasterParams::dxI_

X offset due to increase of one line position.

double TeRasterParams::dxJ_

X offset due to increase of one column position.

double TeRasterParams::dyI_

Y offset due to increase of one line position.

double TeRasterParams::dyJ_

Y offset due to increase of one column position.

string TeRasterParams::errorMessage_

String that contains any error or warning message that raster manipulation might have detected.

string TeRasterParams::fileName_

name of a raster file

Examples:
  importGridData.cpp, TePDICorrelationMatching_test.cpp, TePDIMIMatching_test.cpp, and TePDIMMIOMatching_test.cpp.

TeRasterInterLeavingMode TeRasterParams::interleaving_

interleaving mode

int TeRasterParams::layerId_

identification of the layer that contains the raster

vector<unsigned short> TeRasterParams::lutb_

blue pallete

Examples:
  TePDIUtils_test.cpp.

vector<string> TeRasterParams::lutClassName_

class name

vector<unsigned short> TeRasterParams::lutg_

green pallete

Examples:
  TePDIUtils_test.cpp.

string TeRasterParams::lutName_

name of a lut table associated to this raster

vector<unsigned short> TeRasterParams::lutr_

red pallete

Examples:
  TePDIHistogram_test.cpp, and TePDIUtils_test.cpp.

char TeRasterParams::mode_

a character indicating the access mode to the raster data: 'r', 'w' or 'c'

Examples:
  importGridData.cpp, TePDIColorTransform_test.cpp, TePDICorrelationMatching_test.cpp, TePDIMIMatching_test.cpp, TePDIMMIOMatching_test.cpp, and TePDIOFMatching_test.cpp.

vector<int> TeRasterParams::nbitsperPixel_

number of bits per pixel

int TeRasterParams::ncols_

number of columns

Examples:
  importGridData.cpp, TePDIMixModel_test.cpp, TePDIOFMatching_test.cpp, and TePDIUtils_test.cpp.

int TeRasterParams::nlines_

number of lines

Examples:
  TePDIMixModel_test.cpp, TePDIOFMatching_test.cpp, and TePDIUtils_test.cpp.

int TeRasterParams::nTilesInMemory_

number of tiles to be kept in memory

string TeRasterParams::objectId_

identification of an object associated to this raster geometry

int TeRasterParams::offset_

offset

vector<TeRasterPhotometricInterpretation> TeRasterParams::photometric_

photometric interpretation

int TeRasterParams::resolution_

double TeRasterParams::resx_

horizontal resolution

double TeRasterParams::resy_

vertical resolution

TeRasterStatus TeRasterParams::status_

int TeRasterParams::subBand_

resolution level

bool TeRasterParams::swap_

a flag to indicate that the values of the elements of the raster are swapped

TeRasterTilingType TeRasterParams::tiling_type_

raster tiling mode

bool TeRasterParams::useDummy_

a flag to indicate that raster has dummy values

Examples:
  TePDIFFT_test.cpp.

vector<double> TeRasterParams::vmax_

maximum value

vector<double> TeRasterParams::vmin_

minimum value

double TeRasterParams::x0_

X coordinate of the upper left raster element.

double TeRasterParams::y0_

Y coordinate of the upper left raster element.

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines