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(
TR_RASTER(
"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 gives access to values in one band (dimension) of a raster.
ProxyRaster(const std::vector< RasterPtr > &rasters)
Constructor from a set of rasters.
void swap(std::size_t first, std::size_t second)
A proxy class for bands of several rasters over the same region.
void open(const std::map< std::string, std::string > &rinfo, te::common::AccessPolicy p=te::common::RAccess)
Opens a raster.
const Band * getBand(std::size_t i) const
Returns the raster i-th band.
#define TR_RASTER(message)
It marks a string in order to get translated. This is a special mark used in the TerraLib Raster modu...
It describes one band (or dimension) of a raster.
Grid * getGrid()
It returns the raster grid.
const Band & operator[](std::size_t i) const
Access band in i position.
Grid * m_grid
The spatial support for raster data.
A rectified grid is the spatial support for raster data.
~ProxyRaster()
Destructor.
AccessPolicy
Supported data access policies (can be used as bitfield).
An exception class for the Raster module.
A proxy class for bands of several rasters over the same region.
int getBandDataType(std::size_t i) const
Returns the data type in a particular band (or dimension).
A raster band description.
A rectified grid is the spatial support for raster data.
std::size_t getNumberOfBands() const
Returns the number of bands (dimension of cells attribute values) in the raster.
std::map< std::string, std::string > getInfo() const
It returns additional information about the raster.
boost::shared_ptr< Raster > RasterPtr
std::vector< Band * > m_bands
The proxy raster bands.