Implementation of a in-memory data set that contains spatiotemporal observations indexed by time and space. More...
#include <DataSet.h>
Public Member Functions | |
void | add (const std::pair< te::dt::DateTime *, DateSetItemShrPtr > &item) |
It adds an existing item to the dataset. More... | |
void | add (te::mem::DataSetItem *item) |
It adds a new item to the dataset and takes its ownership. More... | |
std::auto_ptr< DataSet > | clone () const |
It returns a clone of the DataSet. More... | |
void | copy (te::da::DataSet *src, unsigned int limit=0) |
It copies up to limit items from the source dataset. More... | |
void | copy (te::da::DataSet *src, const std::vector< std::size_t > &properties, unsigned int limit=0) |
It copies up to limit items from the source dataset (src). More... | |
DataSet (const te::da::DataSetType *type, int tpPropIdx) | |
It constructs an empty in-memory dataset indexed by time and space. More... | |
DataSet (const te::da::DataSetType *type, int tpPropIdx, int gmPropIdx) | |
It constructs an empty in-memory dataset indexed by time and space. More... | |
DataSet (const te::da::DataSetType *type, int begTimePropIdx, int endTimePropIdx, int gmPropIdx) | |
It constructs an empty in-memory dataset indexed by time and space. More... | |
DataSet (const std::vector< std::string > &pnames, const std::vector< int > &ptyes, const std::map< int, te::common::CharEncoding > &encodings, int begTimePropIdx, int endTimePropIdx, int gmPropIdx) | |
It constructs an empty in-memory dataset indexed by time and space. More... | |
DataSet (te::da::DataSet *ds, int tpPropIdx, int gmPropIdx=-1, unsigned int limit=0) | |
It constructs an in-memory observation dataset from a given data set. More... | |
DataSet (te::da::DataSet *ds, int begTimePropIdx, int endTimePropIdx, int gmPropIdx, unsigned int limit) | |
It constructs an in-memory observation dataset from a given data set. More... | |
DataSet (const DataSet &rhs, const bool deepCopy=false) | |
Regular copy constructor. More... | |
std::auto_ptr< DataSet > | filter (const te::gm::Envelope *e, te::gm::SpatialRelation r) const |
It returns a new DataSet, based on a given spatial filter. More... | |
std::auto_ptr< DataSet > | filter (const te::gm::Geometry *g, te::gm::SpatialRelation r) const |
It returns a new DataSet, based on a given spatial filter. More... | |
std::auto_ptr< DataSet > | filter (const te::dt::DateTime *dt, te::dt::TemporalRelation tr) const |
It returns a new DataSet, based on a given temporal filter. More... | |
std::auto_ptr< DataSet > | filter (const te::gm::Envelope *e, te::gm::SpatialRelation r, const te::dt::DateTime *dt, te::dt::TemporalRelation tr) const |
It returns a new DataSet, based on a given spatial and temporal filter. More... | |
std::auto_ptr< DataSet > | filter (const te::gm::Geometry *g, te::gm::SpatialRelation r, const te::dt::DateTime *dt, te::dt::TemporalRelation tr) const |
It returns a new DataSet, based on a given spatial filter. More... | |
int | getBeginTimePropIdx () const |
It returns the index of the property that contains the beginning phenomenon time. More... | |
const TimeToDataSetItemMap & | getData () const |
It returns a reference to the internal observation set. More... | |
int | getEndTimePropIdx () const |
It returns the index of the property that contains the end phenomenon time. More... | |
int | getGeomPropIdx () const |
It returns the index of the property that contains the observed geometries. More... | |
std::auto_ptr< te::dt::DateTimePeriod > | getTemporalExtent () const |
It returns the temporal extent of the observations. More... | |
std::auto_ptr< te::stmem::DataSet > | nearestObservations (const te::dt::DateTime *time, int n) const |
It returns the n nearest observations to a given date and time. More... | |
DataSet & | operator= (const DataSet &rhs) |
Assignment operator. More... | |
~DataSet () | |
Destructor. More... | |
DataSet inherited methods | |
te::common::TraverseType | getTraverseType () const |
It returns the traverse type associated to the dataset. More... | |
te::common::AccessPolicy | getAccessPolicy () const |
It returns the read and write permission associated to the dataset. More... | |
std::size_t | getNumProperties () const |
It returns the number of properties that composes an item of the dataset. More... | |
int | getPropertyDataType (std::size_t i) const |
It returns the underlying data type of the property at position pos. More... | |
std::string | getPropertyName (std::size_t i) const |
It returns the property name at position pos. More... | |
te::common::CharEncoding | getPropertyCharEncoding (std::size_t i) const |
It returns the property character encoding at position pos. More... | |
std::string | getDatasetNameOfProperty (std::size_t i) const |
It returns the underlying dataset name of the property at position pos. More... | |
bool | isEmpty () const |
It returns true if the collection is empty. More... | |
bool | isConnected () const |
It returns true if the dataset is connected and false if it is disconnected. A dataset can be connected or disconnected. A connected dataset, after its creation through the data source transactor, continues to depend on the connection given by its associated data source. Differently, a disconnected dataset, after its creation, no more depends of the connection given by the data source, and it continues to live after the connection has been released to the data source. More... | |
std::size_t | size () const |
It returns the collection size, if it is known. More... | |
std::auto_ptr< te::gm::Envelope > | getExtent (std::size_t i) |
It computes the bounding rectangle for a spatial property of the dataset. More... | |
bool | moveNext () |
It moves the internal pointer to the next item of the collection. More... | |
bool | movePrevious () |
It moves the internal pointer to the previous item of the collection. More... | |
bool | moveBeforeFirst () |
It moves the internal pointer to a position before the first item in the collection. More... | |
bool | moveFirst () |
It moves the internal pointer to the first item in the collection. More... | |
bool | moveLast () |
It sets the dataset internal pointer to the last item in the collection. More... | |
bool | move (std::size_t i) |
It moves the dataset internal pointer to a given position. More... | |
bool | isAtBegin () const |
It tells if the dataset internal pointer is on the first element of the collection or not. More... | |
bool | isBeforeBegin () const |
It tells if the dataset internal pointer is in a position before the first element of the collection or not. More... | |
bool | isAtEnd () const |
It tells if the dataset internal pointer is on the last element of the collection. More... | |
bool | isAfterEnd () const |
It tells if the dataset internal pointer is on the sentinel position after the last element of the collection or not. More... | |
char | getChar (std::size_t i) const |
Method for retrieving a signed character attribute value (1 byte long). More... | |
unsigned char | getUChar (std::size_t i) const |
Method for retrieving an unsigned character attribute value (1 byte long). More... | |
boost::int16_t | getInt16 (std::size_t i) const |
Method for retrieving a 16-bit integer attribute value (2 bytes long). More... | |
boost::int32_t | getInt32 (std::size_t i) const |
Method for retrieving a 32-bit integer attribute value (4 bytes long). More... | |
boost::int64_t | getInt64 (std::size_t i) const |
Method for retrieving a 64-bit integer attribute value (8 bytes long). More... | |
bool | getBool (std::size_t i) const |
Method for retrieving a boolean attribute value. More... | |
float | getFloat (std::size_t i) const |
Method for retrieving a float attribute value. More... | |
double | getDouble (std::size_t i) const |
Method for retrieving a double attribute value. More... | |
std::string | getNumeric (std::size_t i) const |
Method for retrieving a numeric attribute value. More... | |
std::string | getString (std::size_t i) const |
Method for retrieving a string value attribute. More... | |
std::auto_ptr< te::dt::ByteArray > | getByteArray (std::size_t i) const |
Method for retrieving a byte array. More... | |
std::auto_ptr< te::gm::Geometry > | getGeometry (std::size_t i) const |
Method for retrieving a geometric attribute value. More... | |
std::auto_ptr< te::rst::Raster > | getRaster (std::size_t i) const |
Method for retrieving a raster attribute value. More... | |
std::auto_ptr< te::dt::DateTime > | getDateTime (std::size_t i) const |
Method for retrieving a date and time attribute value. More... | |
std::auto_ptr< te::dt::Array > | getArray (std::size_t i) const |
Method for retrieving an array. More... | |
bool | isNull (std::size_t i) const |
It checks if the attribute value is NULL. More... | |
std::auto_ptr< te::dt::AbstractData > | getValue (std::size_t i) const |
Method for retrieving any other type of data value stored in the data source. More... | |
Methods to set values to the DataSet | |
| |
void | setChar (std::size_t i, char value) |
void | setChar (const std::string &name, char value) |
void | setUChar (std::size_t i, unsigned char value) |
void | setUChar (const std::string &name, unsigned char value) |
void | setInt16 (std::size_t i, boost::int16_t value) |
void | setInt16 (const std::string &name, boost::int16_t value) |
void | setInt32 (std::size_t i, boost::int32_t value) |
void | setInt32 (const std::string &name, boost::int32_t value) |
void | setInt64 (std::size_t i, boost::int64_t value) |
void | setInt64 (const std::string &name, boost::int64_t value) |
void | setBool (std::size_t i, bool value) |
void | setBool (const std::string &name, bool value) |
void | setFloat (std::size_t i, float value) |
void | setFloat (const std::string &name, float value) |
void | setDouble (std::size_t i, double value) |
void | setDouble (const std::string &name, double value) |
void | setNumeric (std::size_t i, const std::string &value) |
void | setNumeric (const std::string &name, const std::string &value) |
void | setString (std::size_t i, const std::string &value) |
void | setString (const std::string &name, const std::string &value) |
void | setByteArray (std::size_t i, te::dt::ByteArray *value) |
void | setByteArray (const std::string &name, te::dt::ByteArray *value) |
void | setGeometry (std::size_t i, te::gm::Geometry *value) |
void | setGeometry (const std::string &name, te::gm::Geometry *value) |
void | setRaster (std::size_t i, te::rst::Raster *value) |
void | setRaster (const std::string &name, te::rst::Raster *value) |
void | setDateTime (std::size_t i, te::dt::DateTime *value) |
void | setDateTime (const std::string &name, te::dt::DateTime *value) |
void | setValue (std::size_t i, te::dt::AbstractData *value) |
void | setValue (const std::string &name, te::dt::AbstractData *ad) |
DataSet Element Properties | |
Methods for retrieving/setting the dataset item component values without the need to explicitly instantiate an item via getItem method. | |
virtual char | getChar (const std::string &name) const |
Method for retrieving a signed character attribute value (1 byte long). More... | |
virtual unsigned char | getUChar (const std::string &name) const |
Method for retrieving an unsigned character attribute value (1 byte long). More... | |
virtual boost::int16_t | getInt16 (const std::string &name) const |
Method for retrieving a 16-bit integer attribute value (2 bytes long). More... | |
virtual boost::int32_t | getInt32 (const std::string &name) const |
Method for retrieving a 32-bit integer attribute value (4 bytes long). More... | |
virtual boost::int64_t | getInt64 (const std::string &name) const |
Method for retrieving a 64-bit integer attribute value (8 bytes long). More... | |
virtual bool | getBool (const std::string &name) const |
Method for retrieving a boolean attribute value. More... | |
virtual float | getFloat (const std::string &name) const |
Method for retrieving a float attribute value. More... | |
virtual double | getDouble (const std::string &name) const |
Method for retrieving a double attribute value. More... | |
virtual std::string | getNumeric (const std::string &name) const |
Method for retrieving a numeric attribute value. More... | |
virtual std::string | getString (const std::string &name) const |
Method for retrieving a string attribute value. More... | |
virtual std::auto_ptr< te::dt::ByteArray > | getByteArray (const std::string &name) const |
Method for retrieving a byte array. More... | |
virtual std::auto_ptr< te::gm::Geometry > | getGeometry (const std::string &name) const |
Method for retrieving a geometric attribute value. More... | |
virtual std::auto_ptr< te::rst::Raster > | getRaster (const std::string &name) const |
Method for retrieving a raster attribute value. More... | |
virtual std::auto_ptr< te::dt::DateTime > | getDateTime (const std::string &name) const |
Method for retrieving a date and time attribute value. More... | |
virtual std::auto_ptr< te::dt::Array > | getArray (const std::string &name) const |
Method for retrieving an array. More... | |
virtual std::auto_ptr< te::dt::AbstractData > | getValue (const std::string &name) const |
Method for retrieving any other type of data value stored in the data source. More... | |
virtual std::string | getAsString (std::size_t i, int precision=0) const |
Method for retrieving a data value as a string plain representation. More... | |
virtual std::string | getAsString (const std::string &name, int precision=0) const |
Method for retrieving a data value as a string plain representation. More... | |
virtual bool | isNull (const std::string &name) const |
It checks if the attribute value is NULL. More... | |
Protected Attributes | |
bool | m_beforeFirst |
int | m_begTimePropIdx |
The property index of the DataSetType that contains the phenomenon beginning time. More... | |
std::map< int, te::common::CharEncoding > | m_encodings |
The list of string properties char-encoding. More... | |
int | m_endTimePropIdx |
The property index of the DataSetType that contains the phenomenon end time. More... | |
int | m_geomPropIdx |
The property index of the DataSetType that contains geometries. More... | |
TimeToDataSetItemMap | m_items |
The list of dataset items, ordered by time. More... | |
TimeToDataSetItemMap::const_iterator | m_iterator |
The pointer to the current item. More... | |
std::vector< std::string > | m_pnames |
internal control More... | |
std::vector< int > | m_ptypes |
The list of property types. More... | |
std::auto_ptr< te::sam::rtree::Index< te::mem::DataSetItem * > > | m_RTree |
A RTree index created over the default geometry property. More... | |
Implementation of a in-memory data set that contains spatiotemporal observations indexed by time and space.
te::stmem::DataSet::DataSet | ( | const te::da::DataSetType * | type, |
int | tpPropIdx | ||
) |
It constructs an empty in-memory dataset indexed by time and space.
dt | the schema of the in-memory observation DataSet that will be created. |
tpPropIdx | the property index of the DataSetType "dt" that contains the observation phenomenon time. |
gmPropIdx | the property index of the DataSetType "dt" that contains geometries. |
Definition at line 54 of file DataSet.cpp.
References te::dt::StringProperty::getCharEncoding(), te::dt::CompositeProperty::getProperty(), te::da::GetPropertyInfo(), m_encodings, m_pnames, m_ptypes, m_RTree, and te::dt::CompositeProperty::size().
te::stmem::DataSet::DataSet | ( | const te::da::DataSetType * | type, |
int | tpPropIdx, | ||
int | gmPropIdx | ||
) |
It constructs an empty in-memory dataset indexed by time and space.
dt | the schema of the in-memory observation DataSet that will be created. |
tpPropIdx | the property index of the DataSetType "dt" that contains the observation phenomenon time. |
gmPropIdx | the property index of the DataSetType "dt" that contains geometries. |
Definition at line 79 of file DataSet.cpp.
References te::dt::StringProperty::getCharEncoding(), te::dt::CompositeProperty::getProperty(), te::da::GetPropertyInfo(), m_encodings, m_pnames, m_ptypes, m_RTree, and te::dt::CompositeProperty::size().
te::stmem::DataSet::DataSet | ( | const te::da::DataSetType * | type, |
int | begTimePropIdx, | ||
int | endTimePropIdx, | ||
int | gmPropIdx | ||
) |
It constructs an empty in-memory dataset indexed by time and space.
dt | the schema of the in-memory observation DataSet that will be created. |
begTimePropIdx | the property index of the DataSetType "dt" that contains the observation phenomenon beginning time. |
endTimePropIdx | the property index of the DataSetType "dt" that contains the observation phenomenon end time. |
gmPropIdx | the property index of the DataSetType "dt" that contains geometries. |
Definition at line 104 of file DataSet.cpp.
References te::dt::StringProperty::getCharEncoding(), te::dt::CompositeProperty::getProperty(), te::da::GetPropertyInfo(), m_encodings, m_pnames, m_ptypes, m_RTree, and te::dt::CompositeProperty::size().
te::stmem::DataSet::DataSet | ( | const std::vector< std::string > & | pnames, |
const std::vector< int > & | ptyes, | ||
const std::map< int, te::common::CharEncoding > & | encodings, | ||
int | begTimePropIdx, | ||
int | endTimePropIdx, | ||
int | gmPropIdx | ||
) |
It constructs an empty in-memory dataset indexed by time and space.
pnames | The names of the properties. |
ptypes | The types of the properties. |
begTimePropIdx | The property index of the ptypes vector that contains the observation phenomenon beginning time. |
endTimePropIdx | The property index of the ptypes vector that contains the observation phenomenon end time. |
gmPropIdx | The property index of the ptypes vector that contains geometries. |
Definition at line 130 of file DataSet.cpp.
References m_RTree.
te::stmem::DataSet::DataSet | ( | te::da::DataSet * | ds, |
int | tpPropIdx, | ||
int | gmPropIdx = -1 , |
||
unsigned int | limit = 0 |
||
) |
It constructs an in-memory observation dataset from a given data set.
It creates a new in-memory observation dataset with the items from the given dataset.
ds | the dataset which will provide the observations. |
tpPropIdx | the property index of the DataSet "ds" that contains the observation phenomenon time |
gmPropIdx | the property index of the DataSet "ds" that contains geometries |
limit | The number of items to be copied. Use 0 to copy all items. |
Definition at line 147 of file DataSet.cpp.
References copy(), te::da::DataSet::getPropertyCharEncoding(), te::da::GetPropertyInfo(), m_encodings, m_pnames, m_ptypes, m_RTree, and te::dt::STRING_TYPE.
te::stmem::DataSet::DataSet | ( | te::da::DataSet * | ds, |
int | begTimePropIdx, | ||
int | endTimePropIdx, | ||
int | gmPropIdx, | ||
unsigned int | limit | ||
) |
It constructs an in-memory observation dataset from a given data set.
It creates a new in-memory observation dataset with the items from the given dataset.
ds | the dataset which will provide the observations. |
begTimePropIdx | the property index of the DataSetType "dt" that contains the observation phenomenon beginning time. |
endTimePropIdx | the property index of the DataSetType "dt" that contains the observation phenomenon end time. |
gmPropIdx | the property index of the DataSet "ds" that contains geometries |
limit | The number of items to be copied. Use 0 to copy all items. |
Definition at line 172 of file DataSet.cpp.
References copy(), te::da::DataSet::getPropertyCharEncoding(), te::da::GetPropertyInfo(), m_encodings, m_pnames, m_ptypes, m_RTree, and te::dt::STRING_TYPE.
te::stmem::DataSet::DataSet | ( | const DataSet & | rhs, |
const bool | deepCopy = false |
||
) |
Regular copy constructor.
It creates a new in-memory observation dataset with the items from the rhs dataset.
rhs | The dataset which will provide the items. |
deepCopy | If true the new dataset instance will clone all dataset items from the source dataset (rhs), otherwise it will share all items. |
Definition at line 197 of file DataSet.cpp.
|
virtual |
void te::stmem::DataSet::add | ( | const std::pair< te::dt::DateTime *, DateSetItemShrPtr > & | item | ) |
It adds an existing item to the dataset.
This method must be used when the user wants to share the same item among DataSets. After adding the item, it updates the internal RTree.
item | An existing item coming from another DataSet. |
Definition at line 326 of file DataSet.cpp.
Referenced by DataSet().
void te::stmem::DataSet::add | ( | te::mem::DataSetItem * | item | ) |
It adds a new item to the dataset and takes its ownership.
item | The item to be added to the dataset. |
Definition at line 344 of file DataSet.cpp.
References te::dt::GetTimePeriod().
std::auto_ptr< te::stmem::DataSet > te::stmem::DataSet::clone | ( | ) | const |
It returns a clone of the DataSet.
Definition at line 388 of file DataSet.cpp.
void te::stmem::DataSet::copy | ( | te::da::DataSet * | src, |
unsigned int | limit = 0 |
||
) |
It copies up to limit items from the source dataset.
src | The source dataset with the items that will be copied. |
limit | The number of items to be copied. Use 0 to copy all items. |
Definition at line 261 of file DataSet.cpp.
References te::da::DataSet::getNumProperties().
Referenced by DataSet().
void te::stmem::DataSet::copy | ( | te::da::DataSet * | src, |
const std::vector< std::size_t > & | properties, | ||
unsigned int | limit = 0 |
||
) |
It copies up to limit items from the source dataset (src).
src | The source dataset with the items that will be copied. |
properties | The list of properties which will be considered in the copy. |
limit | The number of items to be copied. Use 0 to copy all items. |
Definition at line 273 of file DataSet.cpp.
References te::da::DataSet::getValue(), te::da::DataSet::isNull(), and te::da::DataSet::moveNext().
std::auto_ptr< te::stmem::DataSet > te::stmem::DataSet::filter | ( | const te::gm::Envelope * | e, |
te::gm::SpatialRelation | r | ||
) | const |
It returns a new DataSet, based on a given spatial filter.
e | A given envelope |
r | A given spatial relation. |
Definition at line 393 of file DataSet.cpp.
References te::gm::INTERSECTS.
Referenced by te::stmem::Transactor::getDataSet().
std::auto_ptr< te::stmem::DataSet > te::stmem::DataSet::filter | ( | const te::gm::Geometry * | g, |
te::gm::SpatialRelation | r | ||
) | const |
It returns a new DataSet, based on a given spatial filter.
g | A given geometry |
r | A given spatial relation. |
Definition at line 409 of file DataSet.cpp.
References te::gm::Geometry::getMBR(), and te::gm::INTERSECTS.
std::auto_ptr< te::stmem::DataSet > te::stmem::DataSet::filter | ( | const te::dt::DateTime * | dt, |
te::dt::TemporalRelation | tr | ||
) | const |
It returns a new DataSet, based on a given temporal filter.
dt | A given date time |
tr | A given temporal relation. |
Definition at line 428 of file DataSet.cpp.
References te::dt::AFTER, te::dt::BEFORE, te::dt::AbstractData::clone(), te::dt::DURING, and te::dt::EQUALS.
std::auto_ptr< te::stmem::DataSet > te::stmem::DataSet::filter | ( | const te::gm::Envelope * | e, |
te::gm::SpatialRelation | r, | ||
const te::dt::DateTime * | dt, | ||
te::dt::TemporalRelation | tr | ||
) | const |
It returns a new DataSet, based on a given spatial and temporal filter.
e | A given envelope |
r | A given spatial relation. |
dt | A given date time |
tr | A given temporal relation. |
Definition at line 483 of file DataSet.cpp.
std::auto_ptr< te::stmem::DataSet > te::stmem::DataSet::filter | ( | const te::gm::Geometry * | g, |
te::gm::SpatialRelation | r, | ||
const te::dt::DateTime * | dt, | ||
te::dt::TemporalRelation | tr | ||
) | const |
It returns a new DataSet, based on a given spatial filter.
g | A given geometry |
r | A given spatial relation. |
dt | A given date time |
tr | A given temporal relation. |
Definition at line 490 of file DataSet.cpp.
|
virtual |
It returns the read and write permission associated to the dataset.
Implements te::da::DataSet.
Definition at line 545 of file DataSet.cpp.
References te::common::RWAccess.
|
virtual |
Method for retrieving an array.
i | The attribute index. |
Implements te::da::DataSet.
Definition at line 890 of file DataSet.cpp.
|
virtualinherited |
Method for retrieving an array.
name | The attribute name. |
Reimplemented in te::gdal::DataSet.
Definition at line 144 of file DataSet.cpp.
References te::da::GetPropertyPos().
|
virtualinherited |
Method for retrieving a data value as a string plain representation.
i | The attribute index. |
precision | The precision in the conversion. |
Definition at line 218 of file DataSet.cpp.
References te::dt::ARRAY_TYPE, te::dt::BOOLEAN_TYPE, te::dt::BYTE_ARRAY_TYPE, te::dt::CHAR_TYPE, te::common::Convert2String(), te::dt::DATETIME_TYPE, te::dt::DOUBLE_TYPE, te::dt::FLOAT_TYPE, te::dt::GEOMETRY_TYPE, getDouble(), te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::INT64_TYPE, te::dt::NUMERIC_TYPE, te::dt::RASTER_TYPE, te::dt::STRING_TYPE, and te::dt::UCHAR_TYPE.
Referenced by te::ogr::Transactor::add(), te::sa::AssociateGPMVertexAttribute(), te::sa::KernelRatioOperation::buildTree(), te::sa::KernelMapOperation::buildTree(), te::sa::SkaterOperation::createDataSet(), te::map::QueryLayerRenderer::drawDatSetGeometries(), te::attributefill::VectorToVectorMemory::getDistinctClasses(), te::qt::widgets::Info::getGeometryInfo(), te::qt::widgets::Promoter::preProcessKeys(), te::sa::BayesLocalOperation::runBayesLocal(), ToHighlight(), te::da::TupleToStringConverter(), te::ado::Transactor::update(), and te::pgis::Transactor::update().
|
virtualinherited |
Method for retrieving a data value as a string plain representation.
name | The attribute name. |
precision | The precision in the conversion. |
Definition at line 306 of file DataSet.cpp.
References te::da::GetPropertyPos().
int te::stmem::DataSet::getBeginTimePropIdx | ( | ) | const |
It returns the index of the property that contains the beginning phenomenon time.
Definition at line 316 of file DataSet.cpp.
|
virtual |
Method for retrieving a boolean attribute value.
i | The attribute index. |
Implements te::da::DataSet.
Definition at line 760 of file DataSet.cpp.
|
virtualinherited |
Method for retrieving a boolean attribute value.
name | The attribute name. |
Reimplemented in te::gdal::DataSet.
Definition at line 81 of file DataSet.cpp.
References te::da::GetPropertyPos().
|
virtual |
Method for retrieving a byte array.
You can use this method in order to retrieve a BLOB data.
i | The attribute index. |
Implements te::da::DataSet.
Definition at line 830 of file DataSet.cpp.
|
virtualinherited |
Method for retrieving a byte array.
You can use this method in order to retrieve a BLOB data.
name | The attribute name. |
Reimplemented in te::gdal::DataSet.
Definition at line 116 of file DataSet.cpp.
References te::da::GetPropertyPos().
|
virtualinherited |
Method for retrieving a signed character attribute value (1 byte long).
name | The attribute name. |
Reimplemented in te::gdal::DataSet.
Definition at line 46 of file DataSet.cpp.
References te::da::DataSet::getChar(), and te::da::GetPropertyPos().
|
virtual |
Method for retrieving a signed character attribute value (1 byte long).
i | The attribute index. |
Implements te::da::DataSet.
Definition at line 685 of file DataSet.cpp.
const te::stmem::TimeToDataSetItemMap & te::stmem::DataSet::getData | ( | ) | const |
It returns a reference to the internal observation set.
Definition at line 306 of file DataSet.cpp.
|
virtual |
It returns the underlying dataset name of the property at position pos.
i | The property position of interest. |
Implements te::da::DataSet.
Definition at line 573 of file DataSet.cpp.
|
virtual |
Method for retrieving a date and time attribute value.
i | The attribute index. |
Implements te::da::DataSet.
Definition at line 875 of file DataSet.cpp.
|
virtualinherited |
Method for retrieving a date and time attribute value.
name | The attribute name. |
Reimplemented in te::gdal::DataSet.
Definition at line 137 of file DataSet.cpp.
References te::da::GetPropertyPos().
|
virtual |
Method for retrieving a double attribute value.
i | The attribute index. |
Implements te::da::DataSet.
Definition at line 785 of file DataSet.cpp.
|
virtualinherited |
Method for retrieving a double attribute value.
name | The attribute name. |
Reimplemented in te::gdal::DataSet.
Definition at line 95 of file DataSet.cpp.
References getDouble(), and te::da::GetPropertyPos().
int te::stmem::DataSet::getEndTimePropIdx | ( | ) | const |
It returns the index of the property that contains the end phenomenon time.
Definition at line 321 of file DataSet.cpp.
|
virtual |
It computes the bounding rectangle for a spatial property of the dataset.
i | The position of a spatial property to get its bounding box. |
Exception | It throws an exception if something goes wrong during MBR search. |
Implements te::da::DataSet.
Definition at line 593 of file DataSet.cpp.
Referenced by te::st::STDataLoaderFromMemDS::buildDataSet(), and te::stmem::Transactor::getExtent().
|
virtual |
Method for retrieving a float attribute value.
i | The attribute index. |
Implements te::da::DataSet.
Definition at line 775 of file DataSet.cpp.
|
virtualinherited |
Method for retrieving a float attribute value.
name | The attribute name. |
Reimplemented in te::gdal::DataSet.
Definition at line 88 of file DataSet.cpp.
References te::da::GetPropertyPos().
|
virtual |
Method for retrieving a geometric attribute value.
i | The attribute index. |
Implements te::da::DataSet.
Definition at line 845 of file DataSet.cpp.
|
virtualinherited |
Method for retrieving a geometric attribute value.
name | The attribute name. |
Reimplemented in te::gdal::DataSet.
Definition at line 123 of file DataSet.cpp.
References te::da::GetPropertyPos().
int te::stmem::DataSet::getGeomPropIdx | ( | ) | const |
It returns the index of the property that contains the observed geometries.
Definition at line 311 of file DataSet.cpp.
Referenced by te::stmem::Transactor::getDataSet(), and te::stmem::Transactor::getExtent().
|
virtualinherited |
Method for retrieving a 16-bit integer attribute value (2 bytes long).
name | The attribute name. |
Reimplemented in te::gdal::DataSet.
Definition at line 60 of file DataSet.cpp.
References te::da::GetPropertyPos().
|
virtual |
Method for retrieving a 16-bit integer attribute value (2 bytes long).
i | The attribute index. |
Implements te::da::DataSet.
Definition at line 715 of file DataSet.cpp.
|
virtualinherited |
Method for retrieving a 32-bit integer attribute value (4 bytes long).
name | The attribute name. |
Reimplemented in te::gdal::DataSet.
Definition at line 67 of file DataSet.cpp.
References te::da::GetPropertyPos().
|
virtual |
Method for retrieving a 32-bit integer attribute value (4 bytes long).
i | The attribute index. |
Implements te::da::DataSet.
Definition at line 730 of file DataSet.cpp.
|
virtualinherited |
Method for retrieving a 64-bit integer attribute value (8 bytes long).
name | The attribute name. |
Reimplemented in te::gdal::DataSet.
Definition at line 74 of file DataSet.cpp.
References te::da::GetPropertyPos().
|
virtual |
Method for retrieving a 64-bit integer attribute value (8 bytes long).
i | The attribute index. |
Implements te::da::DataSet.
Definition at line 745 of file DataSet.cpp.
|
virtual |
Method for retrieving a numeric attribute value.
i | The attribute index. |
Implements te::da::DataSet.
Definition at line 800 of file DataSet.cpp.
|
virtualinherited |
Method for retrieving a numeric attribute value.
name | The attribute name. |
Reimplemented in te::gdal::DataSet.
Definition at line 102 of file DataSet.cpp.
References te::da::GetPropertyPos().
|
virtual |
It returns the number of properties that composes an item of the dataset.
Implements te::da::DataSet.
Definition at line 550 of file DataSet.cpp.
|
virtual |
It returns the property character encoding at position pos.
i | The property the position of interest. |
Exception | It throws an exception if the property at position pos is not a textual property. |
Implements te::da::DataSet.
Definition at line 565 of file DataSet.cpp.
|
virtual |
It returns the underlying data type of the property at position pos.
i | The property position of interest. |
Implements te::da::DataSet.
Definition at line 555 of file DataSet.cpp.
|
virtual |
It returns the property name at position pos.
i | The property name at the position of interest. |
Implements te::da::DataSet.
Definition at line 560 of file DataSet.cpp.
|
virtual |
Method for retrieving a raster attribute value.
i | The attribute index. |
Exception | It can throw an exception if:
|
Implements te::da::DataSet.
Definition at line 860 of file DataSet.cpp.
|
virtualinherited |
Method for retrieving a raster attribute value.
name | The attribute name. |
Exception | It can throw an exception if:
|
Reimplemented in te::gdal::DataSet.
Definition at line 130 of file DataSet.cpp.
References te::da::GetPropertyPos().
|
virtual |
Method for retrieving a string value attribute.
i | The attribute index. |
Implements te::da::DataSet.
Definition at line 815 of file DataSet.cpp.
|
virtualinherited |
Method for retrieving a string attribute value.
name | The attribute name. |
Reimplemented in te::gdal::DataSet.
Definition at line 109 of file DataSet.cpp.
References te::da::GetPropertyPos().
std::auto_ptr< te::dt::DateTimePeriod > te::stmem::DataSet::getTemporalExtent | ( | ) | const |
It returns the temporal extent of the observations.
Definition at line 375 of file DataSet.cpp.
References te::dt::GetTemporalExtent().
Referenced by te::st::STDataLoaderFromMemDS::buildDataSet(), and te::stmem::Transactor::getTemporalExtent().
|
virtual |
It returns the traverse type associated to the dataset.
Implements te::da::DataSet.
Definition at line 540 of file DataSet.cpp.
References te::common::BIDIRECTIONAL.
|
virtualinherited |
Method for retrieving an unsigned character attribute value (1 byte long).
name | The attribute name. |
Reimplemented in te::gdal::DataSet.
Definition at line 53 of file DataSet.cpp.
References te::da::GetPropertyPos().
|
virtual |
Method for retrieving an unsigned character attribute value (1 byte long).
i | The attribute index. |
Implements te::da::DataSet.
Definition at line 700 of file DataSet.cpp.
|
virtual |
Method for retrieving any other type of data value stored in the data source.
This method can be use for extensible datatypes.
i | The attribute index. |
Reimplemented from te::da::DataSet.
Definition at line 895 of file DataSet.cpp.
|
virtualinherited |
Method for retrieving any other type of data value stored in the data source.
This method can be use for extensible datatypes.
name | The attribute name. |
Reimplemented in te::gdal::DataSet.
Definition at line 211 of file DataSet.cpp.
References te::da::GetPropertyPos().
|
virtual |
It tells if the dataset internal pointer is on the sentinel position after the last element of the collection or not.
Implements te::da::DataSet.
Definition at line 680 of file DataSet.cpp.
|
virtual |
It tells if the dataset internal pointer is on the first element of the collection or not.
Implements te::da::DataSet.
Definition at line 663 of file DataSet.cpp.
|
virtual |
It tells if the dataset internal pointer is on the last element of the collection.
Implements te::da::DataSet.
Definition at line 673 of file DataSet.cpp.
|
virtual |
It tells if the dataset internal pointer is in a position before the first element of the collection or not.
Implements te::da::DataSet.
Definition at line 668 of file DataSet.cpp.
|
virtual |
It returns true if the dataset is connected and false if it is disconnected. A dataset can be connected or disconnected. A connected dataset, after its creation through the data source transactor, continues to depend on the connection given by its associated data source. Differently, a disconnected dataset, after its creation, no more depends of the connection given by the data source, and it continues to live after the connection has been released to the data source.
Implements te::da::DataSet.
Definition at line 583 of file DataSet.cpp.
|
virtual |
It returns true if the collection is empty.
Implements te::da::DataSet.
Definition at line 578 of file DataSet.cpp.
|
virtual |
It checks if the attribute value is NULL.
i | The attribute index. |
Implements te::da::DataSet.
Definition at line 910 of file DataSet.cpp.
|
virtualinherited |
It checks if the attribute value is NULL.
name | The attribute name. |
Reimplemented in te::gdal::DataSet.
Definition at line 313 of file DataSet.cpp.
References te::da::GetPropertyPos().
|
virtual |
It moves the dataset internal pointer to a given position.
i | The position the dataset internal pointer must be set up. |
Implements te::da::DataSet.
Definition at line 648 of file DataSet.cpp.
|
virtual |
It moves the internal pointer to a position before the first item in the collection.
Implements te::da::DataSet.
Definition at line 634 of file DataSet.cpp.
|
virtual |
It moves the internal pointer to the first item in the collection.
Implements te::da::DataSet.
Definition at line 627 of file DataSet.cpp.
|
virtual |
It sets the dataset internal pointer to the last item in the collection.
Implements te::da::DataSet.
Definition at line 640 of file DataSet.cpp.
|
virtual |
It moves the internal pointer to the next item of the collection.
You always has to call this method in order to move the internal pointer to the first item in the collection. This method can be used to traverse a dataset.
Implements te::da::DataSet.
Definition at line 611 of file DataSet.cpp.
|
virtual |
It moves the internal pointer to the previous item of the collection.
Implements te::da::DataSet.
Definition at line 619 of file DataSet.cpp.
std::auto_ptr< te::stmem::DataSet > te::stmem::DataSet::nearestObservations | ( | const te::dt::DateTime * | time, |
int | n | ||
) | const |
It returns the n nearest observations to a given date and time.
dt | A given date time |
n | The number of returned observations. |
Definition at line 497 of file DataSet.cpp.
References te::dt::AbstractData::clone(), and te::dt::GetDistance().
te::stmem::DataSet & te::stmem::DataSet::operator= | ( | const DataSet & | rhs | ) |
Assignment operator.
Definition at line 225 of file DataSet.cpp.
References m_begTimePropIdx, m_encodings, m_endTimePropIdx, m_geomPropIdx, m_items, m_pnames, and m_ptypes.
void te::stmem::DataSet::setBool | ( | std::size_t | i, |
bool | value | ||
) |
Definition at line 765 of file DataSet.cpp.
void te::stmem::DataSet::setBool | ( | const std::string & | name, |
bool | value | ||
) |
Definition at line 770 of file DataSet.cpp.
void te::stmem::DataSet::setByteArray | ( | std::size_t | i, |
te::dt::ByteArray * | value | ||
) |
Definition at line 835 of file DataSet.cpp.
void te::stmem::DataSet::setByteArray | ( | const std::string & | name, |
te::dt::ByteArray * | value | ||
) |
Definition at line 840 of file DataSet.cpp.
void te::stmem::DataSet::setChar | ( | std::size_t | i, |
char | value | ||
) |
Definition at line 690 of file DataSet.cpp.
void te::stmem::DataSet::setChar | ( | const std::string & | name, |
char | value | ||
) |
Definition at line 695 of file DataSet.cpp.
void te::stmem::DataSet::setDateTime | ( | std::size_t | i, |
te::dt::DateTime * | value | ||
) |
Definition at line 880 of file DataSet.cpp.
void te::stmem::DataSet::setDateTime | ( | const std::string & | name, |
te::dt::DateTime * | value | ||
) |
Definition at line 885 of file DataSet.cpp.
void te::stmem::DataSet::setDouble | ( | std::size_t | i, |
double | value | ||
) |
Definition at line 790 of file DataSet.cpp.
void te::stmem::DataSet::setDouble | ( | const std::string & | name, |
double | value | ||
) |
Definition at line 795 of file DataSet.cpp.
void te::stmem::DataSet::setFloat | ( | std::size_t | i, |
float | value | ||
) |
Definition at line 780 of file DataSet.cpp.
void te::stmem::DataSet::setFloat | ( | const std::string & | name, |
float | value | ||
) |
void te::stmem::DataSet::setGeometry | ( | std::size_t | i, |
te::gm::Geometry * | value | ||
) |
Definition at line 850 of file DataSet.cpp.
void te::stmem::DataSet::setGeometry | ( | const std::string & | name, |
te::gm::Geometry * | value | ||
) |
Definition at line 855 of file DataSet.cpp.
void te::stmem::DataSet::setInt16 | ( | std::size_t | i, |
boost::int16_t | value | ||
) |
Definition at line 720 of file DataSet.cpp.
void te::stmem::DataSet::setInt16 | ( | const std::string & | name, |
boost::int16_t | value | ||
) |
Definition at line 725 of file DataSet.cpp.
void te::stmem::DataSet::setInt32 | ( | std::size_t | i, |
boost::int32_t | value | ||
) |
Definition at line 735 of file DataSet.cpp.
void te::stmem::DataSet::setInt32 | ( | const std::string & | name, |
boost::int32_t | value | ||
) |
Definition at line 740 of file DataSet.cpp.
void te::stmem::DataSet::setInt64 | ( | std::size_t | i, |
boost::int64_t | value | ||
) |
Definition at line 750 of file DataSet.cpp.
void te::stmem::DataSet::setInt64 | ( | const std::string & | name, |
boost::int64_t | value | ||
) |
Definition at line 755 of file DataSet.cpp.
void te::stmem::DataSet::setNumeric | ( | std::size_t | i, |
const std::string & | value | ||
) |
Definition at line 805 of file DataSet.cpp.
void te::stmem::DataSet::setNumeric | ( | const std::string & | name, |
const std::string & | value | ||
) |
Definition at line 810 of file DataSet.cpp.
void te::stmem::DataSet::setRaster | ( | std::size_t | i, |
te::rst::Raster * | value | ||
) |
Definition at line 865 of file DataSet.cpp.
void te::stmem::DataSet::setRaster | ( | const std::string & | name, |
te::rst::Raster * | value | ||
) |
Definition at line 870 of file DataSet.cpp.
void te::stmem::DataSet::setString | ( | std::size_t | i, |
const std::string & | value | ||
) |
Definition at line 820 of file DataSet.cpp.
void te::stmem::DataSet::setString | ( | const std::string & | name, |
const std::string & | value | ||
) |
Definition at line 825 of file DataSet.cpp.
void te::stmem::DataSet::setUChar | ( | std::size_t | i, |
unsigned char | value | ||
) |
Definition at line 705 of file DataSet.cpp.
void te::stmem::DataSet::setUChar | ( | const std::string & | name, |
unsigned char | value | ||
) |
Definition at line 710 of file DataSet.cpp.
void te::stmem::DataSet::setValue | ( | std::size_t | i, |
te::dt::AbstractData * | value | ||
) |
Definition at line 900 of file DataSet.cpp.
void te::stmem::DataSet::setValue | ( | const std::string & | name, |
te::dt::AbstractData * | ad | ||
) |
Definition at line 905 of file DataSet.cpp.
|
virtual |
It returns the collection size, if it is known.
It may return std::string::npos if the size is not known, or it would be too costly to compute it.
Implements te::da::DataSet.
Definition at line 588 of file DataSet.cpp.
Referenced by te::stmem::Transactor::getNumberOfItems().
|
protected |
The property index of the DataSetType that contains the phenomenon beginning time.
Definition at line 534 of file DataSet.h.
Referenced by operator=().
|
protected |
The list of string properties char-encoding.
Definition at line 533 of file DataSet.h.
Referenced by DataSet(), and operator=().
|
protected |
The property index of the DataSetType that contains the phenomenon end time.
Definition at line 535 of file DataSet.h.
Referenced by operator=().
|
protected |
The property index of the DataSetType that contains geometries.
Definition at line 536 of file DataSet.h.
Referenced by operator=().
|
protected |
The list of dataset items, ordered by time.
Definition at line 527 of file DataSet.h.
Referenced by DataSet(), and operator=().
|
protected |
|
protected |
internal control
The list of property names.
Definition at line 531 of file DataSet.h.
Referenced by DataSet(), and operator=().
|
protected |
The list of property types.
Definition at line 532 of file DataSet.h.
Referenced by DataSet(), and operator=().
|
protected |