28 #include "../common/Translator.h"
42 : te::rst::
Raster( grid, p )
47 const unsigned char maxMemPercentUsed )
55 throw Exception(
TE_TR(
"Cannot initialize the blocks menager") );
72 throw Exception(
TE_TR(
"Cannot initialize the blocks menager") );
87 std::map<std::string, std::string> info;
89 m_blocksManager.getSynchronizer()->m_mutex.lock();
90 assert( m_blocksManager.getRaster() );
91 info = m_blocksManager.getRaster()->getInfo();
92 m_blocksManager.getSynchronizer()->m_mutex.unlock();
101 m_blocksManager.getSynchronizer()->m_mutex.lock();
102 assert( m_blocksManager.getRaster() );
103 returnValue = m_blocksManager.getRaster()->getBandDataType( i );
104 m_blocksManager.getSynchronizer()->m_mutex.unlock();
116 assert( m_blocksManager.isInitialized() );
118 *m_blocksManager.getSynchronizer() );
123 if( m_bands.size() > 0 )
125 for(
unsigned int bandsIdx = 0 ; bandsIdx < m_bands.size() ; ++bandsIdx )
126 delete m_bands[ bandsIdx ];
130 m_blocksManager.free();
void free()
Free all allocated internal resources and go back to the initial state.
An adapter class to allow concurrent access to raster data by multiple threads.
It describes one band (or dimension) of a raster.
SynchronizedBandBlocksManager m_blocksManager
Internal blocks manager.
te::dt::AbstractData * clone() const
It returns a clone of this object.
An access synchronizer to be used in SynchronizedRaster raster instances.
#define TE_TR(message)
It marks a string in order to get translated.
boost::mutex m_mutex
General sync mutex;.
Grid * m_grid
The spatial support for raster data.
AccessPolicy
Supported data access policies (can be used as bitfield).
An exception class for the Raster module.
Raster & m_raster
The input raster.
An adapter class to allow concurrent access to raster data by multiple threads.
An abstract class for raster data strucutures.
Syncrhonized raster band.
virtual std::size_t getNumberOfBands() const =0
Returns the number of bands (dimension of cells attribute values) in the raster.
A base class for values that can be retrieved from the data access module.
Grid * getGrid()
It returns the raster grid.
bool initialize(RasterSynchronizer &sync, const unsigned char maxMemPercentUsed)
Initialize this instance to an initial state.
std::vector< SynchronizedBand * > m_bands
Internal raster bands.
A rectified grid is the spatial support for raster data.
int getBandDataType(std::size_t i) const
Returns the data type in a particular band (or dimension).
void open(const std::map< std::string, std::string > &rinfo, te::common::AccessPolicy p=te::common::RAccess)
Opens a raster.
A rectified grid is the spatial support for raster data.
std::map< std::string, std::string > getInfo() const
It returns additional information about the raster.