31 #include "../common/Translator.h"
32 #include "../raster/Utils.h"
36 throw te::idl::Exception(
"Not implemented" );
40 : te::rst::Raster( grid, p )
42 throw te::idl::Exception(
"Not implemented" );
46 : te::rst::Raster( rhs )
48 throw te::idl::Exception(
"Not implemented" );
52 const bool takeBufferOwnership )
53 : m_takeBufferOwnership( takeBufferOwnership )
55 if( ! ( idlValuePointer->flags & IDL_V_ARR) )
57 throw te::idl::Exception(
"Invalid IDL value pointer" );
61 unsigned int nLines = 0;
62 unsigned int nCols = 0;
63 unsigned int nBands = 0;
65 if( idlValuePointer->value.arr->n_dim == 2 )
67 nLines = (
unsigned int)idlValuePointer->value.arr->dim[ 1 ];
68 nCols = (
unsigned int)idlValuePointer->value.arr->dim[ 0 ];
71 else if( idlValuePointer->value.arr->n_dim == 3 )
73 nLines = (
unsigned int)idlValuePointer->value.arr->dim[ 2 ];
74 nCols = (
unsigned int)idlValuePointer->value.arr->dim[ 1 ];
75 nBands = (
unsigned int)idlValuePointer->value.arr->dim[ 0 ];
79 throw te::idl::Exception(
"Invalid IDL value pointer" );
89 for(
unsigned int bandIdx = 0 ; bandIdx < nBands ; ++bandIdx )
92 bandIdx,
m_dataType, nBands, nLines, nCols ) );
99 if( m_takeBufferOwnership )
delete[] m_allBandsDataPtr;
101 std::vector< te::idl::IdlBand* >::iterator bandsIt = m_bands.begin();
102 std::vector< te::idl::IdlBand* >::iterator bandsItEnd = m_bands.end();
104 while( bandsIt != bandsItEnd )
114 throw te::idl::Exception(
"Not implemented" );
119 throw te::idl::Exception(
"Not implemented" );
125 throw te::idl::Exception(
"Not implemented" );
A adaptor to an external existent raster in a idl array form.
A adaptor to an external existent raster in a idl array form.
int m_dataType
Data type used by all bands.
std::vector< te::idl::IdlBand * > m_bands
Internal raster bands.
Grid * m_grid
The spatial support for raster data.
AccessPolicy
Supported data access policies (can be used as bitfield).
void open(const std::map< std::string, std::string > &rinfo, te::common::AccessPolicy p=te::common::RAccess)
Opens a raster.
An abstract class for raster data strucutures.
A adaptor to an external existent raster in a idl array form.
unsigned char * m_allBandsDataPtr
Data buffer pointer.
A base class for values that can be retrieved from the data access module.
te::dt::AbstractData * clone() const
It returns a clone of this object.
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.
te::common::AccessPolicy m_policy
The access policy, can be te::common::{NoAccess, RAccess, RWAccess, WAccess}.
int idl2TerralibType(const UCHAR &idlType)
Convert IDL data types to Terralib data types.