27 #include "terralib_config.h"
28 #include "../common/Logger.h"
29 #include "../common/Translator.h"
30 #include "../dataaccess/datasource/DataSourceManager.h"
31 #include "../dataaccess/datasource/DataSourceFactory.h"
32 #include "../dataaccess/query/BinaryOpEncoder.h"
33 #include "../dataaccess/query/FunctionEncoder.h"
34 #include "../dataaccess/query/SQLDialect.h"
35 #include "../dataaccess/query/SQLFunctionEncoder.h"
36 #include "../dataaccess/query/TemplateEncoder.h"
37 #include "../dataaccess/query/UnaryOpEncoder.h"
47 : te::plugin::Plugin(pluginInfo)
60 std::string gdal_data;
61 char* gdata = getenv(
"GDAL_DATA");
64 gdal_data = std::string(gdata);
68 char* tDir = getenv(
"TERRALIB_HOME");
72 teDir = std::string(tDir);
75 gdal_data = teDir +
"/share/gdal-data";
79 gdal_data = TERRALIB_GDAL_DATA;
81 if( !gdal_data.empty() )
83 CPLSetConfigOption(
"GDAL_DATA", gdal_data.c_str());
86 CPLSetConfigOption(
"GDAL_PAM_ENABLED",
"NO");
96 #if GDAL_VERSION_NUM >= 1900
97 const char* currentValue = CPLGetConfigOption(
"GDAL_FIX_ESRI_WKT",
"");
98 if(strcmp(currentValue,
"") == 0)
99 CPLSetConfigOption(
"GDAL_FIX_ESRI_WKT",
"GEOGCS");
104 m_initialized =
true;
124 m_initialized =
false;
#define TE_LOG_TRACE(msg)
Use this tag in order to log a message to a specified logger with the TRACE level.
A class for data providers of OGR.
#define OGR_DRIVER_IDENTIFIER
The OGR driver identifier string.
#define TE_TR(message)
It marks a string in order to get translated.
#define PLUGIN_CALL_BACK_IMPL(PLUGIN_CLASS_NAME)
This macro should be used by C++ plugins in order to declare the exportable/callable DLL function...
static DataSourceManager & getInstance()
It returns a reference to the singleton instance.
The TerraLib OGR driver is a plugin.
The TerraLib OGR driver is a plugin.
Module(const te::plugin::PluginInfo &pluginInfo)
Plugin constructor.
static void add(const std::string &dsType, FactoryFnctType f)
The basic information about a plugin.
static void remove(const std::string &dsType)
An static class with global definitions.
void startup()
It initializes all TerraLib OGR driver support.
static void setDialect(te::da::SQLDialect *dialect)
void shutdown()
It finalizes all TerraLib OGR driver support.