27 #include "../common/Translator.h"
31 #include "../raster/Grid.h"
43 const unsigned char maxMemPercentUsed,
44 const unsigned int dataPrefetchThreshold )
45 :
te::rst::
Raster( new
te::rst::
Grid( *rhs.getGrid() ), rhs.getAccessPolicy() )
48 throw Exception(
TE_TR(
"Cannot initialize the blocks menager") );
57 const unsigned int dataPrefetchThreshold )
58 :
te::rst::
Raster( new
te::rst::
Grid( *rhs.getGrid() ), rhs.getAccessPolicy() )
61 dataPrefetchThreshold) )
62 throw Exception(
TE_TR(
"Cannot initialize the blocks menager") );
81 assert( m_blocksManager.isInitialized() );
82 return new CachedRaster( m_blocksManager.getMaxNumberOfCacheBlocks(),
83 *m_blocksManager.getRaster(), m_blocksManager.getDataPrefetchThreshold() );
88 if( m_bands.size() > 0 )
90 for(
unsigned int bandsIdx = 0 ; bandsIdx < m_bands.size() ; ++bandsIdx )
91 delete m_bands[ bandsIdx ];
95 m_blocksManager.free();
A raster class for memory.
A RAM cache adaptor to an external existent raster that must always be avaliable. ...
#define TE_TR(message)
It marks a string in order to get translated.
An exception class for the TerraLib In-Memory Data Access driver.
void free()
Free all allocated internal resources and go back to the initial state.
RAM cached and tiled raster band.
AccessPolicy
Supported data access policies (can be used as bitfield).
An abstract class for raster data strucutures.
virtual std::size_t getNumberOfBands() const =0
Returns the number of bands (dimension of cells attribute values) in the raster.
RAM cached and tiled raster band.
A RAM cache adaptor to an external existent raster that must always be avaliable. ...
A base class for values that can be retrieved from the data access module.
bool initialize(const te::rst::Raster &externalRaster, const unsigned char maxMemPercentUsed, const unsigned int dataPrefetchThreshold)
Initialize this instance to an initial state.
te::dt::AbstractData * clone() const
It returns a clone of this object.
std::vector< CachedBand * > m_bands
Internal raster bands.
A rectified grid is the spatial support for raster data.
CachedBandBlocksManager m_blocksManager
Internal blocks manager.
void open(const std::map< std::string, std::string > &rinfo, te::common::AccessPolicy p=te::common::RAccess)
Opens a raster.