27 #include "../common/ByteSwapUtils.h"
28 #include "../common/Globals.h"
29 #include "../common/StringUtils.h"
30 #include "../common/Translator.h"
31 #include "../dataaccess/dataset/DataSetType.h"
32 #include "../datatype/Array.h"
33 #include "../datatype/ByteArray.h"
34 #include "../datatype/DateTimeProperty.h"
35 #include "../datatype/SimpleData.h"
36 #include "../datatype/TimeInstant.h"
37 #include "../geometry/Envelope.h"
38 #include "../geometry/Geometry.h"
39 #include "../geometry/WKBReader.h"
40 #include "../raster/Raster.h"
48 #include <terralib/kernel/TeAttribute.h>
49 #include <terralib/kernel/TeDatabase.h>
50 #include <terralib/kernel/TeLayer.h>
52 #include <terralib/kernel/TeQuerierParams.h>
58 #include <boost/dynamic_bitset.hpp>
59 #include <boost/lexical_cast.hpp>
62 : m_raster(raster), m_i(-1)
175 throw Exception(
TR_TERRALIB4(
"Not supported by this type of dataset!"));
180 throw Exception(
TR_TERRALIB4(
"Not supported by this type of dataset!"));
185 throw Exception(
TR_TERRALIB4(
"Not supported by this type of dataset!"));
190 throw Exception(
TR_TERRALIB4(
"Not supported by this type of dataset!"));
195 throw Exception(
TR_TERRALIB4(
"Not supported by this type of dataset!"));
200 throw Exception(
TR_TERRALIB4(
"Not supported by this type of dataset!"));
205 throw Exception(
TR_TERRALIB4(
"Not supported by this type of dataset!"));
210 throw Exception(
TR_TERRALIB4(
"Not supported by this type of dataset!"));
215 throw Exception(
TR_TERRALIB4(
"Not supported by this type of dataset!"));
220 throw Exception(
TR_TERRALIB4(
"Not supported by this type of dataset!"));
225 throw Exception(
TR_TERRALIB4(
"Not supported by this type of dataset!"));
230 throw Exception(
TR_TERRALIB4(
"Not supported by this type of dataset!"));
235 return std::auto_ptr<te::rst::Raster>(
new Raster(m_raster));
240 throw Exception(
TR_TERRALIB4(
"Not supported by this type of dataset!"));
245 throw Exception(
TR_TERRALIB4(
"Not supported by this type of dataset!"));
bool isBeforeBegin() const
It tells if the dataset internal pointer is in a position before the first element of the collection ...
bool movePrevious()
It moves the internal pointer to the previous item of the collection.
bool moveLast()
It sets the dataset internal pointer to the last item in the collection.
bool move(std::size_t i)
It moves the dataset internal pointer to a given position.
std::auto_ptr< te::dt::Property > Convert2T5(const TeAttributeRep &attRep)
It creates a valid TerraLib 5 property given a valid TerraLib 4.x attribute representation.
#define TR_TERRALIB4(message)
It marks a string in order to get translated. This is a special mark used in the DataAccess module of...
boost::int16_t getInt16(std::size_t i) const
Method for retrieving a 16-bit integer attribute value (2 bytes long).
std::auto_ptr< te::gm::Geometry > getGeometry(std::size_t i) const
Method for retrieving a geometric attribute value.
std::auto_ptr< te::dt::Array > getArray(std::size_t i) const
Method for retrieving an array.
boost::int64_t getInt64(std::size_t i) const
Method for retrieving a 64-bit integer attribute value (8 bytes long).
bool moveBeforeFirst()
It moves the internal pointer to a position before the first item in the collection.
bool moveFirst()
It moves the internal pointer to the first item in the collection.
bool getBool(std::size_t i) const
Method for retrieving a boolean attribute value.
std::string getString(std::size_t i) const
Method for retrieving a string value attribute.
char getChar(std::size_t i) const
Method for retrieving a signed character attribute value (1 byte long).
bool isAfterEnd() const
It tells if the dataset internal pointer is on the sentinel position after the last element of the co...
AccessPolicy
Supported data access policies (can be used as bitfield).
std::string getPropertyName(std::size_t i) const
It returns the property name at position pos.
std::string getDatasetNameOfProperty(std::size_t i) const
It returns the underlying dataset name of the property at position pos.
bool isEmpty() const
It returns true if the collection is empty.
bool isAtEnd() const
It tells if the dataset internal pointer is on the last element of the collection.
float getFloat(std::size_t i) const
Method for retrieving a float attribute value.
Utilitary functions for dealing with TerraLib 5 and 4.x conversion.
std::string getNumeric(std::size_t i) const
Method for retrieving a numeric attribute value.
te::common::AccessPolicy getAccessPolicy() const
It returns the read and write permission associated to the dataset.
std::auto_ptr< te::dt::ByteArray > getByteArray(std::size_t i) const
Method for retrieving a byte array.
Implements the DataSource class for the TerraLib 4.x Data Access Driver.
TraverseType
A dataset can be traversed in two ways:
unsigned char getUChar(std::size_t i) const
Method for retrieving an unsigned character attribute value (1 byte long).
std::auto_ptr< te::gm::Envelope > getExtent(std::size_t i)
It computes the bounding rectangle for a spatial property of the dataset.
int getPropertyDataType(std::size_t i) const
It returns the underlying data type of the property at position pos.
std::auto_ptr< te::rst::Raster > getRaster(std::size_t i) const
Method for retrieving a raster attribute value.
RasterDataSet(TeRaster *raster)
bool moveNext()
It moves the internal pointer to the next item of the collection.
bool isNull(std::size_t i) const
It checks if the attribute value is NULL.
te::common::TraverseType getTraverseType() const
It returns the traverse type associated to the dataset.
double getDouble(std::size_t i) const
Method for retrieving a double attribute value.
std::auto_ptr< te::dt::DateTime > getDateTime(std::size_t i) const
Method for retrieving a date and time attribute value.
bool isConnected() const
It returns true if the dataset is connected and false if it is disconnected. A dataset can be connect...
std::size_t getNumProperties() const
It returns the number of properties that composes an item of the dataset.
boost::int32_t getInt32(std::size_t i) const
Method for retrieving a 32-bit integer attribute value (4 bytes long).
std::size_t size() const
It returns the collection size, if it is known.
An abstract class for raster data strucutures.
bool isAtBegin() const
It tells if the dataset internal pointer is on the first element of the collection or not...