27 #include "../../core/utils/HexUtils.h" 28 #include "../../core/translator/Translator.h" 29 #include "../../common/StringUtils.h" 30 #include "../../datatype/AbstractData.h" 31 #include "../../datatype/Array.h" 32 #include "../../datatype/ByteArray.h" 33 #include "../../datatype/DateTime.h" 34 #include "../../datatype/Property.h" 35 #include "../../datatype/SimpleData.h" 36 #include "../../raster/Raster.h" 37 #include "../utils/Utils.h" 45 #include <boost/lexical_cast.hpp> 196 return std::unique_ptr<te::dt::AbstractData>(
getByteArray(i));
199 return std::unique_ptr<te::dt::AbstractData>(
getGeometry(i));
202 return std::unique_ptr<te::dt::AbstractData>(
getDateTime(i));
205 return std::unique_ptr<te::dt::AbstractData>(
getRaster(i));
208 return std::unique_ptr<te::dt::AbstractData>();
234 value = boost::lexical_cast<std::string>(
getInt16(i));
238 value = boost::lexical_cast<std::string>(
getInt32(i));
242 value = boost::lexical_cast<std::string>(
getInt64(i));
246 value = boost::lexical_cast<std::string>(
getBool(i));
250 value = boost::lexical_cast<std::string>(
getFloat(i));
268 value = b->toString();
274 std::unique_ptr<te::dt::AbstractData> g(
getGeometry(i));
275 value = g->toString();
281 std::unique_ptr<te::dt::AbstractData> dTime(
getDateTime(i));
282 value = dTime->toString();
288 std::unique_ptr<te::dt::Array> a(
getArray(i));
289 value = a->toString();
295 std::unique_ptr<te::dt::AbstractData> r(
getRaster(i));
296 value = r->toString();
313 if(i > numProperties)
virtual std::unique_ptr< te::gm::Geometry > getGeometry(std::size_t i) const =0
Method for retrieving a geometric attribute value.
virtual unsigned char getUChar(std::size_t i) const =0
Method for retrieving an unsigned character attribute value (1 byte long).
SimpleData< std::string, STRING_TYPE > String
virtual double getDouble(std::size_t i) const =0
Method for retrieving a double attribute value.
virtual std::unique_ptr< te::dt::ByteArray > getByteArray(std::size_t i) const =0
Method for retrieving a byte array.
SimpleData< unsigned char, UCHAR_TYPE > UChar
virtual std::unique_ptr< te::rst::Raster > getRaster(std::size_t i) const =0
Method for retrieving a raster attribute value.
virtual std::string getNumeric(std::size_t i) const =0
Method for retrieving a numeric attribute value.
virtual float getFloat(std::size_t i) const =0
Method for retrieving a float attribute value.
SimpleData< boost::int64_t, INT64_TYPE > Int64
SimpleData< boost::int32_t, INT32_TYPE > Int32
TEDATAACCESSEXPORT std::size_t GetPropertyPos(const DataSet *dataset, const std::string &name)
virtual std::unique_ptr< te::dt::Array > getArray(std::size_t i) const =0
Method for retrieving an array.
SimpleData< float, FLOAT_TYPE > Float
#define TE_TR(message)
It marks a string in order to get translated.
SimpleData< std::string, NUMERIC_TYPE > Numeric
virtual boost::int16_t getInt16(std::size_t i) const =0
Method for retrieving a 16-bit integer attribute value (2 bytes long).
virtual int getPropertyDataType(std::size_t i) const =0
It returns the underlying data type of the property at position pos.
virtual boost::int32_t getInt32(std::size_t i) const =0
Method for retrieving a 32-bit integer attribute value (4 bytes long).
SimpleData< boost::uint64_t, UINT64_TYPE > UInt64
virtual std::string getAsString(std::size_t i, int precision=0) const
Method for retrieving a data value as a string plain representation.
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
virtual std::unique_ptr< te::dt::DateTime > getDateTime(std::size_t i) const =0
Method for retrieving a date and time attribute value.
virtual char getChar(std::size_t i) const =0
Method for retrieving a signed character attribute value (1 byte long).
SimpleData< bool, BOOLEAN_TYPE > Boolean
virtual std::unique_ptr< te::dt::AbstractData > getValue(std::size_t i) const
Method for retrieving any other type of data value stored in the data source.
A class that models the description of a dataset.
SimpleData< double, DOUBLE_TYPE > Double
SimpleData< char, CHAR_TYPE > Char
SimpleData< boost::uint16_t, UINT16_TYPE > UInt16
virtual bool getBool(std::size_t i) const =0
Method for retrieving a boolean attribute value.
virtual bool isNull(std::size_t i) const =0
It checks if the attribute value is NULL.
virtual boost::int64_t getInt64(std::size_t i) const =0
Method for retrieving a 64-bit integer attribute value (8 bytes long).
std::string Convert2String(boost::int16_t value)
It converts a short integer value to a string.
A dataset is the unit of information manipulated by the data access module of TerraLib.
virtual std::size_t getNumProperties() const =0
It returns the number of properties that composes an item of the dataset.
SimpleData< boost::int16_t, INT16_TYPE > Int16
virtual std::string getString(std::size_t i) const =0
Method for retrieving a string value attribute.
SimpleData< boost::uint32_t, UINT32_TYPE > UInt32