28 #include "../../dataaccess/datasource/DataSourceInfo.h"
29 #include "../../dataaccess/datasource/DataSource.h"
30 #include "../../dataaccess/dataset/DataSet.h"
31 #include "../../dataaccess/utils/Utils.h"
32 #include "../../datatype/DateTimePeriod.h"
35 #include "../Exception.h"
38 #include "../core/observation/ObservationDataSetInfo.h"
39 #include "../core/trajectory/TrajectoryDataSetInfo.h"
40 #include "../core/timeseries/TimeSeriesDataSetInfo.h"
41 #include "../core/observation/ObservationDataSet.h"
42 #include "../core/trajectory/TrajectoryDataSet.h"
43 #include "../core/timeseries/TimeSeriesDataSet.h"
52 std::auto_ptr<te::st::ObservationDataSet>
59 std::auto_ptr<te::da::DataSet> dset(ds->getDataSet(info.
getDataSetName(), travType));
61 return buildDataSet(dset.release(), info);
65 std::auto_ptr<te::st::ObservationDataSet>
73 std::auto_ptr<te::da::DataSetType> dsettype(ds->getDataSetType(info.
getDataSetName()));
75 std::string geomPropName = dsettype->getProperty(info.
getGeomPropIdx())->getName();
78 std::auto_ptr<te::da::DataSet> dset(ds->getDataSet(info.
getDataSetName(), geomPropName, &e, r, travType));
80 return buildDataSet(dset.release(), info);
83 std::auto_ptr<te::st::ObservationDataSet>
91 std::auto_ptr<te::da::DataSetType> dsettype(ds->getDataSetType(info.
getDataSetName()));
93 std::string geomPropName = dsettype->getProperty(info.
getGeomPropIdx())->getName();
96 std::auto_ptr<te::da::DataSet> dset(ds->getDataSet(info.
getDataSetName(), geomPropName, &geom, r, travType));
98 return buildDataSet(dset.release(), info);
101 std::auto_ptr<te::st::ObservationDataSet>
112 return std::auto_ptr<te::st::ObservationDataSet>();
115 std::auto_ptr<te::st::ObservationDataSet>
127 return std::auto_ptr<te::st::ObservationDataSet> ();
136 std::auto_ptr<te::st::TrajectoryDataSet>
144 return buildDataSet(dset.release(), info);
147 std::auto_ptr<te::st::TrajectoryDataSet>
158 std::string geomPropName = dsettype->getProperty(info.
getGeomPropIdx())->getName();
163 return buildDataSet(dset.release(), info);
166 std::auto_ptr<te::st::TrajectoryDataSet>
177 std::string geomPropName = dsettype->getProperty(info.
getGeomPropIdx())->getName();
182 return buildDataSet(dset.release(), info);
185 std::auto_ptr<te::st::TrajectoryDataSet>
196 return std::auto_ptr<te::st::TrajectoryDataSet>();
199 std::auto_ptr<te::st::TrajectoryDataSet>
211 return std::auto_ptr<te::st::TrajectoryDataSet>();
215 std::vector<TimeSeriesDataSetInfo>& )
220 std::auto_ptr<te::st::TimeSeriesDataSet>
229 return buildDataSet(dset.release(), info);
232 std::auto_ptr<te::st::TimeSeriesDataSet>
243 return std::auto_ptr<te::st::TimeSeriesDataSet>();
246 std::auto_ptr<te::dt::DateTimePeriod>
255 return std::auto_ptr<te::dt::DateTimePeriod>();
258 std::auto_ptr<te::dt::DateTimePeriod>
267 return std::auto_ptr<te::dt::DateTimePeriod>();
270 std::auto_ptr<te::dt::DateTimePeriod>
279 return std::auto_ptr<te::dt::DateTimePeriod>();
304 std::auto_ptr<te::st::ObservationDataSet>
310 std::auto_ptr<te::st::TrajectoryDataSet>
316 std::auto_ptr<te::st::TimeSeriesDataSet>
const te::da::DataSourceInfo & getDataSourceInfo() const
It returns the information about the DataSource.
A class that contains infos about a DataSet that contains observations of one or more time series...
const std::string & getId() const
A class that contains infos about a DataSet that contains observations.
TEDATAACCESSEXPORT DataSourcePtr GetDataSource(const std::string &datasourceId, const bool opened=true)
Search for a data source with the informed id in the DataSourceManager.
std::string getDataSetName() const
It returns the DataSet name.
std::auto_ptr< ObservationDataSet > getDataSet(const ObservationDataSetInfo &info, te::common::TraverseType travType=te::common::FORWARDONLY)
It returns a ObservationDataSet, that is, a DataSet that contains observations.
This file contains a class responsible for loading spatiotemporal data from a DataSource using query ...
SpatialRelation
Spatial relations between geometric objects.
A class to represent a DataSet that contains observations.
TESTEXPORT ObservationDataSetType GetType(const ObservationDataSetInfo &info)
An auxiliary function that transform ObservationDataSetInfo into ObservationDataSetType.
void getInfo(const TrajectoryDataSetInfo &input, std::vector< TrajectoryDataSetInfo > &output)
It returns the information about all trajectories that exist in a single DataSet. ...
te::gm::Envelope getSpatialExtent(const ObservationDataSetInfo &info)
It returns the temporal extent of the data set with observations of a coverage series.
A class to represent a time series data set.
std::auto_ptr< te::dt::DateTimePeriod > getTemporalExtent(const ObservationDataSetInfo &info)
It returns the temporal extent of the data set with observations.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
TemporalRelation
Temporal relations between date and time (Source: Allen, 1991).
A class that contains infos about a DataSet that contains observations of one or more trajectories...
boost::shared_ptr< DataSource > DataSourcePtr
TraverseType
A dataset can be traversed in two ways:
int getGeomPropIdx() const
It returns the index of the property that is a geometry property.
const te::da::DataSourceInfo & getDataSourceInfo() const
It returns information about the DataSource from which the DataSet comes.
std::auto_ptr< ObservationDataSet > buildDataSet(te::da::DataSet *ds, const ObservationDataSetInfo &info)
It builds an ObservationDataSet from a given DataSet.
virtual ~STDataLoaderFromDS()
const ObservationDataSetInfo & getObservationDataSetInfo() const
It returns information about the DataSet that contians the time series observations.
const ObservationDataSetInfo & getObservationDataSetInfo() const
It returns information about the DataSet that contians the trajectory observations.
const te::da::DataSourceInfo & getDataSourceInfo() const
It returns information about the DataSource from which the DataSet comes.
int getGeomPropIdx() const
It returns the indexes of the DataSet properties that contains the geometries associated to the traje...
An Envelope defines a 2D rectangular region.
A class to represent a trajectory data set.
A dataset is the unit of information manipulated by the data access module of TerraLib.