| TerraLib 4.1

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

- File List
- File Members

Functions
E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/gdal/TeGDALUtils.h File Reference

Utility functions for GDAL support. More...

`#include "TeGDALDefines.h"`
`#include "../../kernel/TeDataTypes.h"`
`#include "../../kernel/TeRasterParams.h"`
`#include <gdal_priv.h>`
`#include <ogr_spatialref.h>`

Go to the source code of this file.

## Functions

TEGDAL_DLL void | Convert2TerraLib (GDALDataset *ds, TeRasterParams &params)
| It converts the GDAL data set to TerraLib Raster Parameters set.
TEGDAL_DLL void | Convert2TerraLib (GDALRasterBand *rasterBand, TeRasterParams &params, const int &i)
| It converts a GDAL raster band definition to TerraLib Raster Parameters set.
TEGDAL_DLL TeRasterParams::TeRasterPhotometricInterpretation | Convert2TerraLib (GDALColorInterp colorInterpretation)
| It converts the GDAL Color Interpretation type to TerraLib Raster Photometric Interpretation.
TEGDAL_DLL void | ReadLUT (GDALRasterBand *rasterBand, TeRasterParams &params)
| It reads the lut form a GDAL raster band and converts it to TerraLib.
TEGDAL_DLL TeDataType | Convert2TerraLib (GDALDataType type)
| It converts the GDAL data type to TerraLib Data Type.
TEGDAL_DLL GDALDataType | Convert2GDAL (TeDataType type)
| It converts the TerraLib data type to GDAL Data Type.
TEGDAL_DLL void | Convert2TerraLib (double *geoTransformParams, TeRasterParams &params)
| It converts the GDAL affine transformation coefficients to TerraLib Raster Parameters set.
TEGDAL_DLL void | Convert2GDAL (double *geoTransformParams, const TeRasterParams &params)
| It converts the TerraLib Raster Parameters set to GDAL affine transformation coefficients.
TEGDAL_DLL GDALDataset * | CreateGDALRaster (TeRasterParams &params)
| Creates a raster data using GDAL.

## Detailed Description

Utility functions for GDAL support.

Author:
  Douglas Uba <douglas@dpi.inpe.br>

## Function Documentation

TEGDAL_DLL GDALDataType Convert2GDAL | ( | TeDataType | type | ) |

It converts the TerraLib data type to GDAL Data Type.

Parameters:

  type | A valid TerraLib data type.

Returns:
  GDAL Data Type enum element.

TEGDAL_DLL void Convert2GDAL | ( | double * | geoTransformParams,
|  | const TeRasterParams & | params
| ) |  |

It converts the TerraLib Raster Parameters set to GDAL affine transformation coefficients.

Parameters:

  geoTransformParams[out] | A valid GDAL affine transformation coefficients. params[in] TerraLib Raster Parameters that will be filled.

Note:
  This method extracts the raster resolution (x,y) and builds the correct box based on affine transformation coefficients.
  geoTransformParams is an array of double with size = 6, where: geoTransformParams[0] - top left x geoTransformParams[1] - w-e pixel resolution geoTransformParams[2] - rotation, 0 if image is "north up" geoTransformParams[3] - top left y geoTransformParams[4] - rotation, 0 if image is "north up" geoTransformParams[5] - n-s pixel resolution

TEGDAL_DLL void Convert2TerraLib | ( | GDALRasterBand * | rasterBand,
|  | TeRasterParams & | params,
|  | const int & | i
| ) |  |

It converts a GDAL raster band definition to TerraLib Raster Parameters set.

Parameters:

  rasterBand[in] | A valid GDAL raster band. params[out] TerraLib Raster Parameters that will be filled. i[in] The index of band.

TEGDAL_DLL void Convert2TerraLib | ( | double * | geoTransformParams,
|  | TeRasterParams & | params
| ) |  |

It converts the GDAL affine transformation coefficients to TerraLib Raster Parameters set.

Parameters:

  geoTransformParams[in] | A valid GDAL affine transformation coefficients. params[out] TerraLib Raster Parameters that will be filled.

Note:
  This method extracts the raster resolution (x,y) and builds the correct box based on affine transformation coefficients.
  geoTransformParams is an array of double with size = 6, where: geoTransformParams[0] - top left x geoTransformParams[1] - w-e pixel resolution geoTransformParams[2] - rotation, 0 if image is "north up" geoTransformParams[3] - top left y geoTransformParams[4] - rotation, 0 if image is "north up" geoTransformParams[5] - n-s pixel resolution

TEGDAL_DLL TeRasterParams::TeRasterPhotometricInterpretation Convert2TerraLib | ( | GDALColorInterp | colorInterpretation | ) |

It converts the GDAL Color Interpretation type to TerraLib Raster Photometric Interpretation.

Parameters:

  colorInterpretation | A valid GDAL color interpretation.

Returns:
  TerraLib Raster Photometric Interpretation.

TEGDAL_DLL TeDataType Convert2TerraLib | ( | GDALDataType | type | ) |

It converts the GDAL data type to TerraLib Data Type.

Parameters:

  type | A valid GDAL data type.

Returns:
  TerraLib Data Type enum element.

TEGDAL_DLL void Convert2TerraLib | ( | GDALDataset * | ds,
|  | TeRasterParams & | params
| ) |  |

It converts the GDAL data set to TerraLib Raster Parameters set.

Parameters:

  ds[in] | A valid GDAL data set. params[out] TerraLib Raster Parameters that will be filled.

TEGDAL_DLL GDALDataset* CreateGDALRaster | ( | TeRasterParams & | params | ) |

Creates a raster data using GDAL.

Parameters:

  params | TerraLib Raster Parameters that will be used.

Returns:
  A pointer to a GDALDataset if it succeeds or a NULL pointer otherwise. Caller is responsible for kill it!

TEGDAL_DLL void ReadLUT | ( | GDALRasterBand * | rasterBand,
|  | TeRasterParams & | params
| ) |  |

It reads the lut form a GDAL raster band and converts it to TerraLib.

Parameters:

  rasterBand[in] | A valid GDAL raster band with color table associated.

Returns:
  params[out] TerraLib Raster Parameters that will be filled.

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines