Namespace for the TerraLib GDAL driver implementation. More...
Classes | |
| class | Band | 
| This class represents raster band description.  More... | |
| class | DataSet | 
| A GDAL data set gives access to a raster file.  More... | |
| class | DataSetsManager | 
| GDAL data set manager.  More... | |
| class | DataSetUseCounter | 
| GDAL data set use counter.  More... | |
| class | DataSource | 
| A driver to access raster data using the GDAL library.  More... | |
| class | Globals | 
| An static class with global definitions for the TerraLib GDAL driver.  More... | |
| class | Module | 
| The TerraLib GDAL driver is a plugin.  More... | |
| class | Raster | 
| This class represents Raster data.  More... | |
| class | RasterFactory | 
| This is the concrete factory for GDAL rasters.  More... | |
| class | Transactor | 
Typedefs | |
| typedef boost::shared_ptr < DataSet >  | DataSetPtr | 
Functions | |
| te::da::DataSource * | Build () | 
| 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.  More... | |
| 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) | 
| Creates a raster data using GDAL.  More... | |
| TEGDALEXPORT void | GetBandProperties (GDALDataset *gds, std::vector< te::rst::BandProperty * > &bprops) | 
| Gets the list of bands definition from a GDAL dataset.  More... | |
| te::rst::BandProperty * | GetBandProperty (GDALRasterBand *gband, const unsigned int bandIndex) | 
| Gets the properties of a single band from a GDAL dataset.  More... | |
| void | GetBands (te::gdal::Raster *rst, std::vector< te::gdal::Band * > &bands) | 
| Gets the list of bands from a GDAL dataset.  More... | |
| std::string | GetDriverName (const std::string &dsName) | 
| It returns the GDAL driver name associated to a data source name.  More... | |
| te::gm::Envelope * | GetExtent (std::string strAccessInfo) | 
| Gets the extent of a raster data decoded by GDAL.  More... | |
| GDALColorInterp | GetGDALColorInterpretation (te::rst::ColorInterp ci) | 
| It translates a TerraLib ColorInterpretation to a GDAL ColorInterpretation.  More... | |
| std::string | GetGDALConnectionInfo (const std::map< std::string, std::string > &connInfo) | 
| It returns a GDAL connection string from the given map.  More... | |
| GDALDataType | GetGDALDataType (int tet) | 
| It translates a TerraLib DataType to a GDAL DataType.  More... | |
| TEGDALEXPORT te::rst::Grid * | GetGrid (GDALDataset *gds) | 
| Gets the grid definition from a GDAL dataset.  More... | |
| std::string | GetParentDataSetName (const std::string &subDataSetName) | 
| It returns the parent dataset name from a Sub DataSet name.  More... | |
| GDALDataset * | GetRasterHandle (std::string strAccessInfo, te::common::AccessPolicy policy=te::common::RAccess) | 
| Get a handle to a raster file.  More... | |
| te::rst::RasterProperty * | GetRasterProperty (std::string strAccessInfo) | 
| Gets the complete description from a GDAL dataset.  More... | |
| TEGDALEXPORT boost::mutex & | getStaticMutex () | 
| Returns a reference to a static mutex initialized when this module is initialized.  More... | |
| 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.  More... | |
| te::rst::ColorInterp | GetTeColorInterpretation (GDALColorInterp gci) | 
| It translates a GDAL ColorInterpretation to a TerraLib ColorInterpretation.  More... | |
| int | GetTeDataType (GDALDataType gt) | 
| It translates a GDAL DataType to a TerraLib DataType.  More... | |
| te::rst::PaletteInterpretation | GetTePaletteInterpretation (GDALPaletteInterp gpi) | 
| It translates a GDAL Pallete Interpretation to a TerraLib Pallete Interpretation.  More... | |
| bool | IsSubDataSet (const std::string &uri) | 
| Returns true if the given URI is related to a sub-dataset.  More... | |
| 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 be used as a dataset name in GDAL data model. See also http://trac.osgeo.org/gdal/wiki/frmts_wtkraster.html.  More... | |
| TEGDALEXPORT void | Rasterize (std::vector< te::gm::Geometry * > geometries, GDALDataset *outraster) | 
| Rasterizes a given vector of geometries, using GDALRasterizeGeometries function.  More... | |
| bool | RecognizesSRID (unsigned int srid) | 
| It returns true if GDAL recognizes the given SRS id.  More... | |
| bool | ReprojectRaster (te::rst::Raster const *const rin, te::rst::Raster *rout) | 
| Reprojects a raster to another SRS.  More... | |
| TEGDALEXPORT void | Vectorize (GDALRasterBand *band, std::vector< te::gm::Geometry * > &geometries) | 
| Vectorizes a given raster band, using GDALPolygonize function.  More... | |
Namespace for the TerraLib GDAL driver implementation.
| typedef boost::shared_ptr<DataSet> te::gdal::DataSetPtr | 
      
  | 
  inline | 
Definition at line 36 of file DataSourceFactory.h.
Referenced by te::gdal::Module::startup().
| 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.
| g | Raster grid info. | 
| bands | Band info. | 
| optParams | A vector of optional parameters that are valid only for some data formats. | 
| Exception | It throws an exception if the raster can not be created. | 
Definition at line 516 of file Utils.cpp.
References GetGDALConnectionInfo().
Referenced by te::gdal::Raster::create(), and te::gdal::Transactor::createDataSet().
| 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.
| name | The name of the dataset to create. UTF-8 encoded. | 
| g | Raster grid info. | 
| bands | Band info. | 
| optParams | A vector of optional parameters that are valid only for some data formats. | 
| Exception | It throws an exception if the raster can not be created. | 
Definition at line 389 of file Utils.cpp.
References GetDriverName(), GetGDALColorInterpretation(), GetGDALDataType(), te::rst::Grid::getGeoreference(), te::rst::Grid::getNumberOfColumns(), te::rst::Grid::getNumberOfRows(), and te::rst::Grid::getSRID().
| void te::gdal::GetBandProperties | ( | GDALDataset * | gds, | 
| std::vector< te::rst::BandProperty * > & | bprops | ||
| ) | 
Gets the list of bands definition from a GDAL dataset.
| gds | A pointer to a GDAL dataset. | 
| bprops | A reference to a vector to be filled with the bands description extracted from a dataset. | 
Definition at line 152 of file Utils.cpp.
References GetBandProperty(), and TE_TR.
Referenced by te::wcs::Transactor::getDataSetType(), te::wms::Transactor::getDataSetType(), GetRasterProperty(), and te::gdal::Transactor::getType().
| te::rst::BandProperty * te::gdal::GetBandProperty | ( | GDALRasterBand * | gband, | 
| const unsigned int | bandIndex | ||
| ) | 
Gets the properties of a single band from a GDAL dataset.
Definition at line 202 of file Utils.cpp.
References te::rst::AlphaCInt, te::rst::BlueCInt, te::rst::CyanCInt, te::common::UnitsOfMeasureManager::find(), te::common::Singleton< UnitsOfMeasureManager >::getInstance(), GetTeColorInterpretation(), GetTeDataType(), te::rst::GrayIdxCInt, te::rst::GreenCInt, te::rst::HueCInt, te::rst::KeyCInt, te::rst::LigCInt, te::rst::BandProperty::m_blkh, te::rst::BandProperty::m_blkw, te::rst::BandProperty::m_colorInterp, te::rst::BandProperty::m_idx, te::rst::BandProperty::m_nblocksx, te::rst::BandProperty::m_nblocksy, te::rst::BandProperty::m_noDataValue, te::rst::BandProperty::m_valuesOffset, te::rst::BandProperty::m_valuesScale, te::rst::MagentaCInt, te::rst::PaletteIdxCInt, te::rst::RedCInt, te::rst::SatCInt, te::rst::BandProperty::setUnitOfMeasure(), TE_TR, and te::rst::YellowCInt.
Referenced by te::gdal::Band::Band(), and GetBandProperties().
| void te::gdal::GetBands | ( | te::gdal::Raster * | rst, | 
| std::vector< te::gdal::Band * > & | bands | ||
| ) | 
Gets the list of bands from a GDAL dataset.
| rst | A pointer to the raster. | 
| bands | A reference to a vector to be filled with the bands extracted from a dataset. | 
Definition at line 312 of file Utils.cpp.
References te::gdal::Raster::getGDALDataset(), and TE_TR.
Referenced by te::gdal::Raster::create(), te::gdal::Raster::open(), and te::gdal::Raster::Raster().
| std::string te::gdal::GetDriverName | ( | const std::string & | dsName | ) | 
It returns the GDAL driver name associated to a data source name.
| dsName | the name of the file that represents the data source. | 
Definition at line 653 of file Utils.cpp.
References te::common::Convert2UCase().
Referenced by CreateRaster(), te::gdal::Transactor::getDataSetNames(), te::gdal::Transactor::getDataSetType(), and te::gdal::Raster::~Raster().
| te::gm::Envelope * te::gdal::GetExtent | ( | std::string | strAccessInfo | ) | 
Gets the extent of a raster data decoded by GDAL.
| strAccessInfo | A a string to be used by GDAL to access the raster. | 
Definition at line 377 of file Utils.cpp.
References te::rst::Grid::getExtent(), and GetGrid().
      
  | 
  inline | 
It translates a TerraLib ColorInterpretation to a GDAL ColorInterpretation.
Definition at line 134 of file Utils.h.
References te::rst::AlphaCInt, te::rst::BlueCInt, te::rst::CbCInt, te::rst::CrCInt, te::rst::CyanCInt, te::rst::GrayIdxCInt, te::rst::GreenCInt, te::rst::HueCInt, te::rst::KeyCInt, te::rst::LigCInt, te::rst::MagentaCInt, te::rst::PaletteIdxCInt, te::rst::RedCInt, te::rst::SatCInt, te::rst::YCInt, and te::rst::YellowCInt.
Referenced by CreateRaster().
| std::string te::gdal::GetGDALConnectionInfo | ( | const std::map< std::string, std::string > & | connInfo | ) | 
It returns a GDAL connection string from the given map.
| connInfo | An associative conteiner with data source connection info. | 
| Exception | It throws an exception if no connection info exists in the input map. | 
Definition at line 684 of file Utils.cpp.
References TE_TR.
Referenced by CreateRaster().
      
  | 
  inline | 
It translates a TerraLib DataType to a GDAL DataType.
Definition at line 82 of file Utils.h.
References te::dt::CDOUBLE_TYPE, te::dt::CFLOAT_TYPE, te::dt::CHAR_TYPE, te::dt::CINT16_TYPE, te::dt::CINT32_TYPE, te::dt::DOUBLE_TYPE, te::dt::FLOAT_TYPE, te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::UCHAR_TYPE, te::dt::UINT16_TYPE, and te::dt::UINT32_TYPE.
Referenced by te::gdal::Raster::create(), and CreateRaster().
| te::rst::Grid * te::gdal::GetGrid | ( | GDALDataset * | gds | ) | 
Gets the grid definition from a GDAL dataset.
| gds | A pointer to a GDAL dataset. | 
Definition at line 102 of file Utils.cpp.
References getStaticMutex(), and TE_UNKNOWN_SRS.
Referenced by te::wcs::Transactor::getDataSetType(), te::wms::Transactor::getDataSetType(), GetExtent(), GetRasterProperty(), te::gdal::Transactor::getType(), te::gdal::Raster::open(), and te::gdal::Raster::Raster().
| std::string te::gdal::GetParentDataSetName | ( | const std::string & | subDataSetName | ) | 
It returns the parent dataset name from a Sub DataSet name.
| subDataSetName | The Full SubDataSet string name. | 
Definition at line 769 of file Utils.cpp.
References IsSubDataSet().
Referenced by te::gdal::DataSource::exists(), te::gdal::Transactor::getDataSetType(), te::gdal::Transactor::getType(), te::gdal::DataSource::isValid(), te::gdal::Raster::open(), and te::gdal::Raster::Raster().
| GDALDataset * te::gdal::GetRasterHandle | ( | std::string | strAccessInfo, | 
| te::common::AccessPolicy | policy = te::common::RAccess  | 
        ||
| ) | 
Get a handle to a raster file.
| filename | File name (path included). | 
| policy | The access permission requested. | 
Definition at line 527 of file Utils.cpp.
References te::common::RWAccess, and te::common::WAccess.
Referenced by te::gdal::Raster::create(), te::gdal::Raster::open(), and te::gdal::Raster::Raster().
| te::rst::RasterProperty * te::gdal::GetRasterProperty | ( | std::string | strAccessInfo | ) | 
Gets the complete description from a GDAL dataset.
| strAccessInfo | A a string to be used by GDAL to access the raster. | 
Definition at line 356 of file Utils.cpp.
References GetBandProperties(), and GetGrid().
| boost::mutex & te::gdal::getStaticMutex | ( | ) | 
Returns a reference to a static mutex initialized when this module is initialized.
Definition at line 799 of file Utils.cpp.
Referenced by GetGrid(), and te::gdal::Module::startup().
| 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.
| name | The Full SubDataSet string name. | 
| driverName | The driver name. | 
Definition at line 61 of file Utils.cpp.
Referenced by te::gdal::Transactor::getDataSetNames(), and te::gdal::Transactor::getDataSetType().
      
  | 
  inline | 
It translates a GDAL ColorInterpretation to a TerraLib ColorInterpretation.
Definition at line 107 of file Utils.h.
References te::rst::AlphaCInt, te::rst::BlueCInt, te::rst::CbCInt, te::rst::CrCInt, te::rst::CyanCInt, te::rst::GrayIdxCInt, te::rst::GreenCInt, te::rst::HueCInt, te::rst::KeyCInt, te::rst::LigCInt, te::rst::MagentaCInt, te::rst::PaletteIdxCInt, te::rst::RedCInt, te::rst::SatCInt, te::rst::UndefCInt, te::rst::YCInt, and te::rst::YellowCInt.
Referenced by GetBandProperty().
      
  | 
  inline | 
It translates a GDAL DataType to a TerraLib DataType.
Definition at line 58 of file Utils.h.
References te::dt::CDOUBLE_TYPE, te::dt::CFLOAT_TYPE, te::dt::CINT16_TYPE, te::dt::CINT32_TYPE, te::dt::DOUBLE_TYPE, te::dt::FLOAT_TYPE, te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::UCHAR_TYPE, te::dt::UINT16_TYPE, te::dt::UINT32_TYPE, and te::dt::UNKNOWN_TYPE.
Referenced by GetBandProperty().
      
  | 
  inline | 
It translates a GDAL Pallete Interpretation to a TerraLib Pallete Interpretation.
Definition at line 161 of file Utils.h.
References te::rst::CMYKPalInt, te::rst::GrayPalInt, te::rst::HSLPalInt, te::rst::RGBPalInt, and te::rst::UndefPalInt.
| bool te::gdal::IsSubDataSet | ( | const std::string & | uri | ) | 
Returns true if the given URI is related to a sub-dataset.
| uri | The given URI. | 
Definition at line 746 of file Utils.cpp.
Referenced by GetParentDataSetName(), te::gdal::Raster::open(), and te::gdal::Raster::Raster().
| 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.
| connInfo | The connection parameters. | 
| void te::gdal::Rasterize | ( | std::vector< te::gm::Geometry * > | geometries, | 
| GDALDataset * | outraster | ||
| ) | 
Rasterizes a given vector of geometries, using GDALRasterizeGeometries function.
| geometries | A vector of geometries to be rasterized. | 
| outraster | A reference to the GDAL dataset where the rasterized geometries will be drawn. | 
Definition at line 721 of file Utils.cpp.
References te::ogr::Convert2OGR().
| bool te::gdal::RecognizesSRID | ( | unsigned int | srid | ) | 
It returns true if GDAL recognizes the given SRS id.
| srid | The SRS identifier. | 
Definition at line 593 of file Utils.cpp.
Referenced by te::gdal::Raster::transform().
| bool te::gdal::ReprojectRaster | ( | te::rst::Raster const *const | rin, | 
| te::rst::Raster * | rout | ||
| ) | 
Reprojects a raster to another SRS.
| rin | The input raster file. Do not pass a null pointer. | 
| rout | The new output raster. Do not pass a null pointer. | 
Definition at line 604 of file Utils.cpp.
References te::gdal::Raster::getGDALDataset().
Referenced by te::gdal::Raster::transform().
| void te::gdal::Vectorize | ( | GDALRasterBand * | band, | 
| std::vector< te::gm::Geometry * > & | geometries | ||
| ) | 
Vectorizes a given raster band, using GDALPolygonize function.
| band | The band to vectorize. | 
| geometries | A reference to a vector of geometries. Will be filled with geometries found in band. | 
Definition at line 699 of file Utils.cpp.
References te::ogr::Convert2TerraLib().