27 #include "../common/Translator.h"
42 assert(rasters.empty() ==
false);
44 const std::size_t nrasters = rasters.size();
46 for(std::size_t i = 0; i != nrasters; ++i)
50 const std::size_t nbands = r->getNumberOfBands();
52 for(std::size_t b = 0; b != nbands; ++b)
54 m_bands.push_back(r->getBand(b));
65 throw Exception(
TE_TR(
"Not implemented yet!"));
74 std::swap(m_bands[first], m_bands[second]);
75 std::swap(m_rasters[first], m_rasters[second]);
89 return m_bands.size();
94 assert(i < m_bands.size());
96 assert(m_bands[i]->getProperty());
98 return m_bands[i]->getProperty()->getType();
103 assert(i < m_bands.size());
110 assert(i < m_bands.size());
117 assert(i < m_bands.size());
120 return *(m_bands[i]);
125 assert(i < m_bands.size());
128 return *(m_bands[i]);
It describes one band (or dimension) of a raster.
void open(const std::map< std::string, std::string > &rinfo, te::common::AccessPolicy p=te::common::RAccess)
Opens a raster.
A proxy class for bands of several rasters over the same region.
std::size_t getNumberOfBands() const
Returns the number of bands (dimension of cells attribute values) in the raster.
#define TE_TR(message)
It marks a string in order to get translated.
const Band & operator[](std::size_t i) const
Access band in i position.
Grid * m_grid
The spatial support for raster data.
AccessPolicy
Supported data access policies (can be used as bitfield).
boost::shared_ptr< Raster > RasterPtr
An exception class for the Raster module.
void swap(std::size_t first, std::size_t second)
int getBandDataType(std::size_t i) const
Returns the data type in a particular band (or dimension).
std::vector< Band * > m_bands
The proxy raster bands.
~ProxyRaster()
Destructor.
const Band * getBand(std::size_t i) const
Returns the raster i-th band.
It gives access to values in one band (dimension) of a raster.
A raster band description.
Grid * getGrid()
It returns the raster grid.
A proxy class for bands of several rasters over the same region.
std::map< std::string, std::string > getInfo() const
It returns additional information about the raster.
A rectified grid is the spatial support for raster data.
ProxyRaster(const std::vector< RasterPtr > &rasters)
Constructor from a set of rasters.