All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Utils.h File Reference

Utilitary functions to access GDAL and match some of its concepts to TerraLib concepts. More...

#include "../raster/BandProperty.h"
#include "../raster/Enums.h"
#include "../raster/Raster.h"
#include "../common/Translator.h"
#include "Config.h"
#include "Band.h"
#include "Raster.h"
#include <gdal_priv.h>
#include <map>
#include <string>
#include <vector>
#include <set>
#include <boost/filesystem.hpp>
#include <boost/thread/mutex.hpp>

Go to the source code of this file.

Classes

struct  te::gdal::DriverMetadata
 GDAL driver metadata. More...
 

Namespaces

 te
 URI C++ Library.
 
 te::gdal
 Namespace for the TerraLib GDAL driver implementation.
 
 te::gm
 Namespace for the Vector Geometry module of TerraLib.
 
 te::rst
 Namespace for the Raster module of TerraLib.
 

Functions

GDALDataset * te::gdal::CreateRaster (te::rst::Grid *g, const std::vector< te::rst::BandProperty * > &bands, const std::map< std::string, std::string > &optParams)
 Creates a raster data using GDAL. More...
 
GDALDataset * te::gdal::CreateRaster (const std::string &name, te::rst::Grid *g, const std::vector< te::rst::BandProperty * > &bands, const std::map< std::string, std::string > &optParams)
 Creates a raster data using GDAL. More...
 
TEGDALEXPORT void te::gdal::GetBandProperties (GDALDataset *gds, std::vector< te::rst::BandProperty * > &bprops)
 Gets the list of bands definition from a GDAL dataset. More...
 
te::rst::BandPropertyte::gdal::GetBandProperty (GDALRasterBand *gband, const unsigned int bandIndex)
 Gets the properties of a single band from a GDAL dataset. More...
 
void te::gdal::GetBands (te::gdal::Raster *rst, std::vector< te::gdal::Band * > &bands)
 Gets the list of bands from a GDAL dataset. More...
 
bool te::gdal::GetBands (te::gdal::Raster *rst, int multiResLevel, std::vector< te::gdal::Band * > &bands)
 Gets the list of bands from a GDAL dataset. More...
 
std::string te::gdal::GetDriverName (const std::string &dsName)
 It returns the GDAL driver name associated to a data source name. More...
 
te::gm::Envelopete::gdal::GetExtent (std::string strAccessInfo)
 Gets the extent of a raster data decoded by GDAL. More...
 
GDALColorInterp te::gdal::GetGDALColorInterpretation (te::rst::ColorInterp ci)
 It translates a TerraLib ColorInterpretation to a GDAL ColorInterpretation. More...
 
std::string te::gdal::GetGDALConnectionInfo (const std::map< std::string, std::string > &connInfo)
 It returns a GDAL connection string from the given map. More...
 
GDALDataType te::gdal::GetGDALDataType (int tet)
 It translates a TerraLib DataType to a GDAL DataType. More...
 
const std::map< std::string,
DriverMetadata > & 
te::gdal::GetGDALDriversMetadata ()
 Returns metadata from all registered GDAL drivers (key: driver name). More...
 
const std::multimap
< std::string, std::string > & 
te::gdal::GetGDALDriversUCaseExt2DriversMap ()
 Returns a map all GDAL supported Upper-case extensions to their respective driver names. More...
 
std::string te::gdal::GetGDALRessamplingMethod (te::rst::InterpolationMethod interpolationMethod)
 It translates a TerraLib interpolation method into a GDAL ressampling method name string. More...
 
TEGDALEXPORT te::rst::Gridte::gdal::GetGrid (GDALDataset *gds)
 Gets the grid definition from a GDAL dataset. More...
 
TEGDALEXPORT te::rst::Gridte::gdal::GetGrid (GDALDataset *gds, const int multiResLevel)
 Gets the grid definition from a GDAL dataset. More...
 
std::string te::gdal::GetParentDataSetName (const std::string &subDataSetName)
 It returns the parent dataset name from a Sub DataSet name. More...
 
GDALDataset * te::gdal::GetRasterHandle (std::string strAccessInfo, te::common::AccessPolicy policy=te::common::RAccess)
 Get a handle to a raster file. More...
 
te::rst::RasterPropertyte::gdal::GetRasterProperty (std::string strAccessInfo)
 Gets the complete description from a GDAL dataset. More...
 
TEGDALEXPORT boost::mutex & te::gdal::getStaticMutex ()
 Returns a reference to a static mutex initialized when this module is initialized. More...
 
std::string te::gdal::GetSubDataSetName (const std::string &name, const std::string &driverName)
 It returns the Sub DataSet name from the given name or the same name. More...
 
te::rst::ColorInterp te::gdal::GetTeColorInterpretation (GDALColorInterp gci)
 It translates a GDAL ColorInterpretation to a TerraLib ColorInterpretation. More...
 
int te::gdal::GetTeDataType (GDALDataType gt)
 It translates a GDAL DataType to a TerraLib DataType. More...
 
te::rst::PaletteInterpretation te::gdal::GetTePaletteInterpretation (GDALPaletteInterp gpi)
 It translates a GDAL Pallete Interpretation to a TerraLib Pallete Interpretation. More...
 
bool te::gdal::IsSubDataSet (const std::string &uri)
 Returns true if the given URI is related to a sub-dataset. More...
 
std::string te::gdal::MakePGConnectionStr (const std::map< std::string, std::string > &dsInfo)
 Returns a PostGIS connection string from the set connection information. The connection string is to be used as a dataset name in GDAL data model. See also http://trac.osgeo.org/gdal/wiki/frmts_wtkraster.html. More...
 
TEGDALEXPORT void te::gdal::Rasterize (std::vector< te::gm::Geometry * > geometries, GDALDataset *outraster)
 Rasterizes a given vector of geometries, using GDALRasterizeGeometries function. More...
 
bool te::gdal::RecognizesSRID (unsigned int srid)
 It returns true if GDAL recognizes the given SRS id. More...
 
bool te::gdal::ReprojectRaster (te::rst::Raster const *const rin, te::rst::Raster *rout)
 Reprojects a raster to another SRS. More...
 
TEGDALEXPORT void te::gdal::Vectorize (GDALRasterBand *band, std::vector< te::gm::Geometry * > &geometries)
 Vectorizes a given raster band, using GDALPolygonize function. More...
 

Detailed Description

Utilitary functions to access GDAL and match some of its concepts to TerraLib concepts.

Definition in file Utils.h.