27 #include "../core/translator/Translator.h" 28 #include "../dataaccess/dataset/DataSetType.h" 29 #include "../dataaccess/utils/Utils.h" 30 #include "../datatype/AbstractData.h" 31 #include "../datatype/ByteArray.h" 32 #include "../datatype/DateTime.h" 33 #include "../datatype/Property.h" 34 #include "../datatype/SimpleData.h" 35 #include "../geometry/Geometry.h" 36 #include "../raster/Grid.h" 37 #include "../raster/RasterProperty.h" 54 m_data.resize(nproperties,
nullptr);
60 m_data.resize(nproperties,
nullptr);
70 if (rhs.
isNull(i) ==
false)
97 return std::unique_ptr<te::mem::DataSetItem>(
new DataSetItem(*
this));
388 return std::unique_ptr<te::dt::AbstractData>(
getByteArray(i).release());
391 return std::unique_ptr<te::dt::AbstractData>(
getGeometry(i).release());
394 return std::unique_ptr<te::dt::AbstractData>(
getDateTime(i).release());
397 return std::unique_ptr<te::dt::AbstractData>(
getRaster(i).release());
400 return std::unique_ptr<te::dt::AbstractData>();
417 return boost::is_null(
m_data.begin() + i);
void setFloat(std::size_t i, float value)
It sets the value of the i-th property.
std::string getNumeric(std::size_t i) const
It returns the value of the i-th property.
std::unique_ptr< te::dt::ByteArray > getByteArray(std::size_t i) const
It returns the value of the i-th property.
SimpleData< std::string, STRING_TYPE > String
void setGeometry(std::size_t i, te::gm::Geometry *value)
It sets the value of the i-th property.
std::unique_ptr< te::dt::DateTime > getDateTime(std::size_t i) const
It returns the value of the i-th property.
void setUChar(std::size_t i, unsigned char value)
It sets the value of the i-th property.
void setDouble(std::size_t i, double value)
It sets the value of the i-th property.
std::string getPropertyName(std::size_t pos) const
It returns the name of the pos-th property.
DataSetItem & operator=(const DataSetItem &rhs)
Assignment operator.
SimpleData< unsigned char, UCHAR_TYPE > UChar
const te::da::DataSet * m_parent
The parent dataset, if the item is associated to one.
int getPropertyDataType(std::size_t pos) const
It returns the type of the pos-th property.
float getFloat(std::size_t i) const
It returns the value of the i-th property.
bool isNull(std::size_t i) const
An exception class for the TerraLib In-Memory Data Access driver.
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)
char getChar(std::size_t i) const
It returns the value of the i-th property.
void setValue(std::size_t i, te::dt::AbstractData *value)
It sets the value of the i-th property.
bool getBool(std::size_t i) const
It returns the value of the i-th property.
boost::int64_t getInt64(std::size_t i) const
It returns the value of the i-th property.
SimpleData< float, FLOAT_TYPE > Float
boost::int16_t getInt16(std::size_t i) const
It returns the value of the i-th property.
void setInt16(std::size_t i, boost::int16_t value)
It sets the value of the i-th property.
void setChar(std::size_t i, char value)
It sets the value of the i-th property.
std::size_t getNumProperties() const
It returns the number of properties.
void setNumeric(std::size_t i, const std::string &value)
It sets the value of the i-th property.
SimpleData< std::string, NUMERIC_TYPE > Numeric
boost::int32_t getInt32(std::size_t i) const
It returns the value of the i-th property.
void setInt32(std::size_t i, boost::int32_t value)
It sets the value of the i-th property.
std::string getString(std::size_t i) const
It returns the value of the i-th property.
std::unique_ptr< te::gm::Geometry > getGeometry(std::size_t i) const
It returns the value of the i-th property.
A raster class for memory.
void setRaster(std::size_t i, te::rst::Raster *value)
It sets the value of the i-th property.
virtual int getPropertyDataType(std::size_t i) const =0
It returns the underlying data type of the property at position pos.
void setDateTime(std::size_t i, te::dt::DateTime *value)
It sets the value of the i-th property.
An abstract class for raster data strucutures.
boost::ptr_vector< boost::nullable< te::dt::AbstractData > > m_data
The data values of the dataset item.
double getDouble(std::size_t i) const
It returns the value of the i-th property.
SimpleData< boost::uint64_t, UINT64_TYPE > UInt64
A base class for values that can be retrieved from the data access module.
An implementation of the DatasetItem class for the TerraLib In-Memory Data Access driver...
void setGeometry(const std::string &name, te::gm::Geometry *value)
It sets the value of the property, indicating its name.
unsigned char getUChar(std::size_t i) const
It returns the value of the i-th property.
Implementation of a random-access dataset class for the TerraLib In-Memory Data Access driver...
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
std::unique_ptr< DataSetItem > clone() const
It returns a clone of the DataSetItem.
te::da::DataSet * getParent() const
It returns its parent.
An implementation of the DatasetItem class for the TerraLib In-Memory Data Access driver...
void setByteArray(std::size_t i, te::dt::ByteArray *value)
It sets the value of the i-th property.
A dataset is the unit of information manipulated by the data access module of TerraLib.
SimpleData< bool, BOOLEAN_TYPE > Boolean
DataSetItem(const te::da::DataSet *parent)
It creates a new item having the same schema as the parent dataset.
SimpleData< double, DOUBLE_TYPE > Double
SimpleData< char, CHAR_TYPE > Char
void setBool(std::size_t i, bool value)
It sets the value of the i-th property.
virtual ~DataSetItem()
Destructor.
SimpleData< boost::uint16_t, UINT16_TYPE > UInt16
A template for atomic data types (integers, floats, strings and others).
void setString(std::size_t i, const std::string &value)
It sets the value of the i-th property.
std::unique_ptr< te::dt::AbstractData > getValue(std::size_t i) const
It returns the value of the i-th property.
virtual std::size_t getNumProperties() const =0
It returns the number of properties that composes an item of the dataset.
virtual std::string getPropertyName(std::size_t i) const =0
It returns the property name at position pos.
void setInt64(std::size_t i, boost::int64_t value)
It sets the value of the i-th property.
SimpleData< boost::int16_t, INT16_TYPE > Int16
std::unique_ptr< te::rst::Raster > getRaster(std::size_t i) const
It returns the value of the i-th property.
void setInt32(const std::string &name, boost::int32_t value)
It sets the value of the property, indicating its name.
SimpleData< boost::uint32_t, UINT32_TYPE > UInt32
A class for representing binary data.