26 #ifndef __TERRALIB_GDAL_INTERNAL_UTILS_H
27 #define __TERRALIB_GDAL_INTERNAL_UTILS_H
30 #include "../raster/BandProperty.h"
31 #include "../raster/Enums.h"
32 #include "../raster/Raster.h"
33 #include "../common/Translator.h"
39 #include <gdal_priv.h>
47 #include <boost/filesystem.hpp>
48 #include <boost/thread/mutex.hpp>
52 namespace gm {
class Envelope;
class Geometry;}
54 namespace rst {
class Grid;
class RasterProperty; }
114 default :
return GDT_Unknown;
168 default :
return GCI_Undefined;
192 switch(interpolationMethod)
274 GDALDataset*
CreateRaster(
te::rst::Grid* g,
const std::vector<te::rst::BandProperty*>& bands,
const std::map<std::string, std::string>& optParams);
287 GDALDataset*
CreateRaster(
const std::string& name,
te::rst::Grid* g,
const std::vector<te::rst::BandProperty*>& bands,
const std::map<std::string, std::string>& optParams);
349 std::string
GetSubDataSetName(
const std::string& name,
const std::string& driverName);
GDALColorInterp GetGDALColorInterpretation(te::rst::ColorInterp ci)
It translates a TerraLib ColorInterpretation to a GDAL ColorInterpretation.
HSL indexed palette interpretation.
Palette indexes color interpretation.
This is a class that represents a GDAL Raster.
GDALDataType GetGDALDataType(int tet)
It translates a TerraLib DataType to a GDAL DataType.
Near neighborhood interpolation method.
const std::multimap< std::string, std::string > & GetGDALDriversUCaseExt2DriversMap()
Returns a map all GDAL supported Upper-case extensions to their respective driver names...
Hue channel color interpretation.
te::rst::PaletteInterpretation GetTePaletteInterpretation(GDALPaletteInterp gpi)
It translates a GDAL Pallete Interpretation to a TerraLib Pallete Interpretation. ...
Alpha channel color interpretation.
void GetBands(te::gdal::Raster *rst, std::vector< te::gdal::Band * > &bands)
Gets the list of bands from a GDAL dataset.
Index into a lookup table.
Lightness color interpretation.
te::rst::ColorInterp GetTeColorInterpretation(GDALColorInterp gci)
It translates a GDAL ColorInterpretation to a TerraLib ColorInterpretation.
ColorInterp
Color model component use.
A raster band description.
RGB indexed palette interpretation.
This class represents Raster data.
Base exception class for plugin module.
te::rst::RasterProperty * GetRasterProperty(std::string strAccessInfo)
Gets the complete description from a GDAL dataset.
TEGDALEXPORT te::rst::Grid * GetGrid(GDALDataset *gds)
Gets the grid definition from a GDAL dataset.
Gray indexed palette interpretation.
It gives access to values in one band (dimension) of a raster.
#define TEGDALEXPORT
You can use this macro in order to export/import classes and functions from this module.
GDALDataset * GetRasterHandle(std::string strAccessInfo, te::common::AccessPolicy policy=te::common::RAccess)
Get a handle to a raster file.
Red channel color interpretation.
#define TE_TR(message)
It marks a string in order to get translated.
Cyan color interpretation.
InterpolationMethod
Allowed interpolation methods.
TEGDALEXPORT void Rasterize(std::vector< te::gm::Geometry * > geometries, GDALDataset *outraster)
Rasterizes a given vector of geometries, using GDALRasterizeGeometries function.
std::string GetGDALRessamplingMethod(te::rst::InterpolationMethod interpolationMethod)
It translates a TerraLib interpolation method into a GDAL ressampling method name string...
int GetTeDataType(GDALDataType gt)
It translates a GDAL DataType to a TerraLib DataType.
AccessPolicy
Supported data access policies (can be used as bitfield).
YCbCr Cr Band color interpretation.
An Envelope defines a 2D rectangular region.
An abstract class for raster data strucutures.
std::string GetParentDataSetName(const std::string &subDataSetName)
It returns the parent dataset name from a Sub DataSet name.
No color interpretation is associated with the band.
TEGDALEXPORT void GetBandProperties(GDALDataset *gds, std::vector< te::rst::BandProperty * > &bprops)
Gets the list of bands definition from a GDAL dataset.
te::gm::Envelope * GetExtent(std::string strAccessInfo)
Gets the extent of a raster data decoded by GDAL.
Undefined palette interpretation.
Key (black) color interpretation.
Yellow color interpretation.
std::string GetDriverName(const std::string &dsName)
It returns the GDAL driver name associated to a data source name.
Bicubic interpolation method.
TEGDALEXPORT boost::mutex & getStaticMutex()
Returns a reference to a static mutex initialized when this module is initialized.
bool IsSubDataSet(const std::string &uri)
Returns true if the given URI is related to a sub-dataset.
bool ReprojectRaster(te::rst::Raster const *const rin, te::rst::Raster *rout)
Reprojects a raster to another SRS.
bool RecognizesSRID(unsigned int srid)
It returns true if GDAL recognizes the given SRS id.
std::string GetGDALConnectionInfo(const std::map< std::string, std::string > &connInfo)
It returns a GDAL connection string from the given map.
std::string MakePGConnectionStr(const std::map< std::string, std::string > &dsInfo)
Returns a PostGIS connection string from the set connection information. The connection string is to ...
YCbCr Y Band color interpretation.
Bilinear interpolation method.
CMYK indexed palette interpretation.
Saturation color interpretation.
Blue channel color interpretation.
PaletteInterpretation
Palette interpratation types.
TEGDALEXPORT void Vectorize(GDALRasterBand *band, std::vector< te::gm::Geometry * > &geometries)
Vectorizes a given raster band, using GDALPolygonize function.
A rectified grid is the spatial support for raster data.
std::string GetSubDataSetName(const std::string &name, const std::string &driverName)
It returns the Sub DataSet name from the given name or the same name.
Green channel color interpretation.
GDALDataset * 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.
te::rst::BandProperty * GetBandProperty(GDALRasterBand *gband, const unsigned int bandIndex)
Gets the properties of a single band from a GDAL dataset.
Magenta color interpretation.
YCbCr Cb Band color interpretation.
const std::map< std::string, DriverMetadata > & GetGDALDriversMetadata()
Returns metadata from all registered GDAL drivers (key: driver name).
Configuration flags for the GDAL Driver of TerraLib.