27 #include "../common/StringUtils.h" 28 #include "../core/translator/Translator.h" 49 std::map<std::string, std::string>::const_iterator it = rinfo.find(
"RTYPE");
50 if( it != rinfo.end() )
52 return make(it->second, g, bands, rinfo, h, deleter);
55 it = rinfo.find(
"FORCE_MEM_DRIVER");
56 if( ( it != rinfo.end() ) &&
59 return make(
"MEM", g, bands, rinfo, h, deleter);
74 throw Exception(
TE_TR(
"Could not find concrete factory! Check if it was initialized!"));
88 return make(rType,
nullptr, std::vector<BandProperty*>(), rinfo, h, deleter);
105 throw Exception(
TE_TR(
"Could not find concrete factory! Check if it was initialized!"));
107 return f->
iOpen(rinfo, p);
117 std::map<std::string, std::string> rinfo;
121 return open(rType, rinfo, p);
An exception class for the Raster module.
#define TE_DEFAULT_RASTER_TYPE
Base exception class for plugin module.
static dictionary_type & getDictionary()
It returns a reference to the internal dictionary of concrete factories.
std::string Convert2UCase(const std::string &value)
It converts a string to upper case.
#define TE_TR(message)
It marks a string in order to get translated.
TFACTORY * find(const TFACTORYKEY &factoryKey) const
It looks for a given factory identified by a key.
AccessPolicy
Supported data access policies (can be used as bitfield).
This is the abstract factory for Rasters.
virtual Raster * iOpen(const std::map< std::string, std::string > &rinfo, te::common::AccessPolicy p=te::common::RAccess)
This method may be re-implemented by subclasses in order to have a finner control for the raster obje...
An abstract class for raster data strucutures.
static te::dt::DateTime d(2010, 8, 9, 15, 58, 39)
AbstractFactory(const std::string &factoryKey)
It creates the factory and automatically registers it in the dictionary.
static TPRODUCT * make(const TFACTORYKEY &factoryKey)
It creates an object with the appropriated factory.
const std::string & getKey() const
It returns the factory key associated to the concreate factory.
static Raster * make()
It creates and returns an empty raster with default raster driver.
RasterFactory(const std::string &factoryKey)
Constructor.
This is the abstract factory for Rasters.
A rectified grid is the spatial support for raster data.
virtual Raster * create(Grid *g, const std::vector< BandProperty * > bands, const std::map< std::string, std::string > &rinfo, void *h=0, void(*deleter)(void *)=0)=0
This method must be implemented by subclasses (raster drivers).
This class represents a dictionary of factories.
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.