26 #ifndef __TERRALIB_STMEMORY_INTERNAL_DATASET_H
27 #define __TERRALIB_STMEMORY_INTERNAL_DATASET_H
30 #include "../dataaccess/dataset/DataSet.h"
31 #include "../sam/rtree/Index.h"
38 #include <boost/shared_ptr.hpp>
40 namespace te {
namespace da {
class DataSetType; } }
41 namespace te {
namespace dt {
class DateTimePeriod; } }
42 namespace te {
namespace mem {
class DataSetItem; } }
108 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);
219 void copy(
te::da::DataSet* src,
const std::vector<std::size_t>& properties,
unsigned int limit = 0);
226 const TimeToDataSetItemMap& getData()
const;
233 int getGeomPropIdx()
const;
240 int getBeginTimePropIdx()
const;
247 int getEndTimePropIdx()
const;
263 void add(
const std::pair<te::dt::DateTime*, DateSetItemShrPtr>& item);
283 std::auto_ptr<te::dt::DateTimePeriod> getTemporalExtent()
const;
292 std::auto_ptr<DataSet> clone()
const;
377 std::auto_ptr<te::stmem::DataSet> nearestObservations(
const te::dt::DateTime* time,
int n)
const;
386 std::size_t getNumProperties()
const;
388 int getPropertyDataType(std::size_t i)
const;
390 std::string getPropertyName(std::size_t i)
const;
394 std::string getDatasetNameOfProperty(std::size_t i)
const;
396 bool isEmpty()
const;
398 bool isConnected()
const;
400 std::size_t size()
const;
402 std::auto_ptr<te::gm::Envelope> getExtent(std::size_t i);
408 bool moveBeforeFirst();
414 bool move(std::size_t i);
416 bool isAtBegin()
const;
418 bool isBeforeBegin()
const;
420 bool isAtEnd()
const;
422 bool isAfterEnd()
const;
424 char getChar(std::size_t i)
const;
426 unsigned char getUChar(std::size_t i)
const;
428 boost::int16_t getInt16(std::size_t i)
const;
430 boost::int32_t getInt32(std::size_t i)
const;
432 boost::int64_t getInt64(std::size_t i)
const;
434 bool getBool(std::size_t i)
const;
436 float getFloat(std::size_t i)
const;
438 double getDouble(std::size_t i)
const;
440 std::string getNumeric(std::size_t i)
const;
442 std::string getString(std::size_t i)
const;
444 std::auto_ptr<te::dt::ByteArray> getByteArray(std::size_t i)
const;
446 std::auto_ptr<te::gm::Geometry> getGeometry(std::size_t i)
const;
448 std::auto_ptr<te::rst::Raster> getRaster(std::size_t i)
const;
450 std::auto_ptr<te::dt::DateTime> getDateTime(std::size_t i)
const;
452 std::auto_ptr<te::dt::Array> getArray(std::size_t i)
const;
454 bool isNull(std::size_t i)
const;
456 std::auto_ptr<te::dt::AbstractData> getValue(std::size_t i)
const;
464 void setChar(std::size_t i,
char value);
466 void setChar(
const std::string& name,
char value);
468 void setUChar(std::size_t i,
unsigned char value);
470 void setUChar(
const std::string& name,
unsigned char value);
472 void setInt16(std::size_t i, boost::int16_t value);
474 void setInt16(
const std::string& name, boost::int16_t value);
476 void setInt32(std::size_t i, boost::int32_t value);
478 void setInt32(
const std::string& name, boost::int32_t value);
480 void setInt64(std::size_t i, boost::int64_t value);
482 void setInt64(
const std::string& name, boost::int64_t value);
484 void setBool(std::size_t i,
bool value);
486 void setBool(
const std::string& name,
bool value);
488 void setFloat(std::size_t i,
float value);
490 void setFloat(
const std::string& name,
float value);
492 void setDouble(std::size_t i,
double value);
494 void setDouble(
const std::string& name,
double value);
496 void setNumeric(std::size_t i,
const std::string& value);
498 void setNumeric(
const std::string& name,
const std::string& value);
500 void setString(std::size_t i,
const std::string& value);
502 void setString(
const std::string& name,
const std::string& value);
528 std::auto_ptr<te::sam::rtree::Index<te::mem::DataSetItem*> >
m_RTree;
541 #endif // __TERRALIB_STMEMORY_INTERNAL_DATASET_H
boost::shared_ptr< te::mem::DataSetItem > DateSetItemShrPtr
CharEncoding
Supported charsets (character encoding).
A class that models the description of a dataset.
TemporalRelation
Temporal relations between date and time (Source: Allen, 1991).
SpatialRelation
Spatial relations between geometric objects.
int m_endTimePropIdx
The property index of the DataSetType that contains the phenomenon end time.
AccessPolicy
Supported data access policies (can be used as bitfield).
TraverseType
A dataset can be traversed in two ways:
#define TESTMEMORYEXPORT
You can use this macro in order to export/import classes and functions from this module.
An Envelope defines a 2D rectangular region.
An abstract class for raster data strucutures.
std::multimap< te::dt::DateTime *, DateSetItemShrPtr, te::dt::CompareDateTime > TimeToDataSetItemMap
A base class for values that can be retrieved from the data access module.
int m_begTimePropIdx
The property index of the DataSetType that contains the phenomenon beginning time.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
TimeToDataSetItemMap::const_iterator m_iterator
The pointer to the current item.
Implementation of a in-memory data set that contains spatiotemporal observations indexed by time and ...
An implementation of the DatasetItem class for the TerraLib In-Memory Data Access driver...
A dataset is the unit of information manipulated by the data access module of TerraLib.
std::vector< int > m_ptypes
The list of property types.
std::map< int, te::common::CharEncoding > m_encodings
The list of string properties char-encoding.
TimeToDataSetItemMap m_items
The list of dataset items, ordered by time.
int m_geomPropIdx
The property index of the DataSetType that contains geometries.
std::auto_ptr< te::sam::rtree::Index< te::mem::DataSetItem * > > m_RTree
A RTree index created over the default geometry property.
std::vector< std::string > m_pnames
internal control
A class for representing binary data.
std::pair< te::dt::DateTime *, DateSetItemShrPtr > TimeAndDateSetItemPair