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>
129 return std::auto_ptr<te::st::ObservationDataSet>();
133 std::auto_ptr<te::st::ObservationDataSet>
145 return std::auto_ptr<te::st::ObservationDataSet> ();
154 std::auto_ptr<te::st::TrajectoryDataSet>
162 return buildDataSet(dset.release(), info);
165 std::auto_ptr<te::st::TrajectoryDataSet>
176 std::string geomPropName = dsettype->getProperty(info.
getGeomPropIdx())->getName();
181 return buildDataSet(dset.release(), info);
184 std::auto_ptr<te::st::TrajectoryDataSet>
195 std::string geomPropName = dsettype->getProperty(info.
getGeomPropIdx())->getName();
200 return buildDataSet(dset.release(), info);
203 std::auto_ptr<te::st::TrajectoryDataSet>
214 return std::auto_ptr<te::st::TrajectoryDataSet>();
217 std::auto_ptr<te::st::TrajectoryDataSet>
231 return std::auto_ptr<te::st::TrajectoryDataSet>();
234 std::auto_ptr<te::st::TrajectoryDataSet>
246 return std::auto_ptr<te::st::TrajectoryDataSet>();
250 std::vector<TimeSeriesDataSetInfo>& )
255 std::auto_ptr<te::st::TimeSeriesDataSet>
264 return buildDataSet(dset.release(), info);
267 std::auto_ptr<te::st::TimeSeriesDataSet>
278 return std::auto_ptr<te::st::TimeSeriesDataSet>();
281 std::auto_ptr<te::dt::DateTimePeriod>
290 return std::auto_ptr<te::dt::DateTimePeriod>();
293 std::auto_ptr<te::dt::DateTimePeriod>
302 return std::auto_ptr<te::dt::DateTimePeriod>();
305 std::auto_ptr<te::dt::DateTimePeriod>
314 return std::auto_ptr<te::dt::DateTimePeriod>();
339 std::auto_ptr<te::st::ObservationDataSet>
345 std::auto_ptr<te::st::TrajectoryDataSet>
351 std::auto_ptr<te::st::TimeSeriesDataSet>
TEDATAACCESSEXPORT DataSourcePtr GetDataSource(const std::string &datasourceId, const bool opened=true)
Search for a data source with the informed id in the DataSourceManager.
A class to represent a time series data set.
A class to represent a DataSet that contains observations.
boost::shared_ptr< DataSource > DataSourcePtr
A class that contains infos about a DataSet that contains observations.
te::gm::Envelope getSpatialExtent(const ObservationDataSetInfo &info)
It returns the temporal extent of the data set with observations of a coverage series.
int getGeomPropIdx() const
It returns the index of the property that is a geometry property.
TemporalRelation
Temporal relations between date and time (Source: Allen, 1991).
const ObservationDataSetInfo & getObservationDataSetInfo() const
It returns information about the DataSet that contians the time series observations.
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.
SpatialRelation
Spatial relations between geometric objects.
This file contains a class responsible for loading spatiotemporal data from a DataSource using query ...
virtual ~STDataLoaderFromDS()
const ObservationDataSetInfo & getObservationDataSetInfo() const
It returns information about the DataSet that contians the trajectory observations.
int getGeomPropIdx() const
It returns the indexes of the DataSet properties that contains the geometries associated to the traje...
const te::da::DataSourceInfo & getDataSourceInfo() const
It returns information about the DataSource from which the DataSet comes.
TESTEXPORT ObservationDataSetType GetType(const ObservationDataSetInfo &info)
An auxiliary function that transform ObservationDataSetInfo into ObservationDataSetType.
TraverseType
A dataset can be traversed in two ways:
An Envelope defines a 2D rectangular region.
const te::da::DataSourceInfo & getDataSourceInfo() const
It returns the information about the DataSource.
void getInfo(const TrajectoryDataSetInfo &input, std::vector< TrajectoryDataSetInfo > &output)
It returns the information about all trajectories that exist in a single DataSet. ...
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
A class that contains infos about a DataSet that contains observations of one or more trajectories...
A class to represent a trajectory data set.
const std::string & getId() const
A dataset is the unit of information manipulated by the data access module of TerraLib.
A class that contains infos about a DataSet that contains observations of one or more time series...
std::string getDataSetName() const
It returns the DataSet name.
std::auto_ptr< ObservationDataSet > buildDataSet(te::da::DataSet *ds, const ObservationDataSetInfo &info)
It builds an ObservationDataSet from a given DataSet.
const te::da::DataSourceInfo & getDataSourceInfo() const
It returns information about the DataSource from which the DataSet comes.
std::auto_ptr< te::dt::DateTimePeriod > getTemporalExtent(const ObservationDataSetInfo &info)
It returns the temporal extent of the data set with observations.