27 #include "../common/Translator.h"
33 #include <terralib4/kernel/TeDecoderDatabase.h>
34 #include <terralib4/kernel/TeRaster.h>
47 : m_parent(parent), m_raster(iraster)
64 return m_pImpl->m_parent;
69 m_pImpl->m_raster->getElement(c, r, value, (
int)m_idx);
74 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
84 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
89 TeDecoderDatabase* decDb =
dynamic_cast<TeDecoderDatabase*
>(m_pImpl->m_raster->decoder());
91 std::string bdIdx = decDb->codifyId(x, y, (
int)m_idx, 1, 0);
93 decDb->getRasterBlock(bdIdx, buffer);
103 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
Band implementation for TerraLib 4.x.
void getValue(unsigned int c, unsigned int r, double &value) const
Returns the cell attribute value.
A raster band description.
Impl(Raster *parent, TeRaster *iraster)
Band(Raster *parent, TeRaster *iraster, te::rst::BandProperty *bp, std::size_t idx)
te::rst::Raster * getRaster() const
Returns the associated raster.
#define TE_TR(message)
It marks a string in order to get translated.
void write(int x, int y, void *buffer)
It writes a data block from the specified buffer.
An abstract class for raster data strucutures.
void setIValue(unsigned int c, unsigned int r, const double value)
Sets the imaginary attribute value in a complex band of a cell.
void read(int x, int y, void *buffer) const
It reads a data block to the specified buffer.
void getIValue(unsigned int c, unsigned int r, double &value) const
Returns the imaginary attribute value in a complex band of a cell.
~Band()
Virtual destructor.
Raster implementaton for TerraLib 4.x.
void setValue(unsigned int c, unsigned int r, const double value)
Sets the cell attribute value.