37 #include <boost/filesystem.hpp>
39 namespace fs = boost::filesystem;
44 fs::path in(inputPath);
48 if(fs::is_directory(in))
50 errorMessage =
"Enter with the full path, including the file name and extension!";
53 if(!fs::is_regular_file(in))
55 errorMessage =
"Input not identified!";
59 std::string extension = fs::extension(in);
64 errorMessage =
"Input Raster not exists!";
73 if(outputPath.empty())
75 errorMessage =
"Output path invalid!!";
79 fs::path out(outputPath);
80 std::string extension = fs::extension(out);
82 out.remove_filename();
86 errorMessage =
"The Output path not exists!";
96 std::map<std::string, std::string> rasterInfo;
97 rasterInfo[
"URI"] = path;
111 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS
113 #elif TE_PLATFORM == TE_PLATFORMCODE_LINUX
114 info.m_type =
"s.o.";
115 #elif TE_PLATFORM == TE_PLATFORMCODE_APPLE
116 info.m_type =
"dylib";
118 #error "Platform not supported yet"
121 info.
m_name =
"OGR DataSource Driver";
124 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS
126 info.m_mainFile =
"terralib_ogr.dll";
128 info.m_mainFile =
"terralib_ogr_d.dll";
132 #if TE_PLATFORM == TE_PLATFORMCODE_LINUX
134 info.m_mainFile =
"libterralib_ogr.so";
136 info.m_mainFile =
"libterralib_ogr_d.so";
140 #if TE_PLATFORM == TE_PLATFORMCODE_APPLE
142 info.m_mainFile =
"libterralib_ogr.dylib";
144 info.m_mainFile =
"libterralib_ogr.dylib";
156 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS
158 #elif TE_PLATFORM == TE_PLATFORMCODE_LINUX
159 info.m_type =
"s.o.";
160 #elif TE_PLATFORM == TE_PLATFORMCODE_APPLE
161 info.m_type =
"dylib";
163 #error "Platform not supported yet"
166 info.
m_name =
"GDAL DataSource Driver";
169 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS
171 info.m_mainFile =
"terralib_gdal.dll";
173 info.m_mainFile =
"terralib_gdal_d.dll";
177 #if TE_PLATFORM == TE_PLATFORMCODE_LINUX
179 info.m_mainFile =
"libterralib_gdal.so";
181 info.m_mainFile =
"libterralib_gdal_d.so";
185 #if TE_PLATFORM == TE_PLATFORMCODE_APPLE
187 info.m_mainFile =
"libterralib_gdal.dylib";
189 info.m_mainFile =
"libterralib_gdal.dylib";
std::string m_name
The plugin name: an internal value used to identify the plugin in the system. Must be a unique value...
static PluginManager & getInstance()
It returns a reference to the singleton instance.
An abstract class for raster data strucutures.
A singleton for managing plugins.
std::string m_description
A brief explanation about the plugin.
This is the abstract factory for Rasters.
The basic information about a plugin.
static Raster * open(const std::map< std::string, std::string > &rinfo, te::common::AccessPolicy p=te::common::RAccess)
It opens a raster with the given parameters and default raster driver.