STDataLoaderFromDS.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18 */
19 
20 /*!
21  \file STDataLoaderFromDS.h
22 
23  \brief This file contains a class responsible for loading spatiotemporal data
24  from a DataSource using query capabilities.
25 */
26 
27 #ifndef __TERRALIB_ST_INTERNAL_STDATALOADERFROMDS_H
28 #define __TERRALIB_ST_INTERNAL_STDATALOADERFROMDS_H
29 
30 //ST
31 #include "../Config.h"
32 #include "STDataLoaderImpl.h"
33 
34 namespace te { namespace da { class DataSet; class DataSourceInfo; } }
35 
36 namespace te
37 {
38  namespace st
39  {
40  /*!
41  \class STDataLoaderFromDS
42 
43  \brief A class responsible for loading spatiotemporal data
44  from a DataSource using query capabilities.
45  */
47  {
48  public:
49 
51 
52  /*! \name Inhered methods*/
53  //@{
54 
55  std::auto_ptr<ObservationDataSet> getDataSet(const ObservationDataSetInfo& info,
57 
58  std::auto_ptr<ObservationDataSet> getDataSet(const ObservationDataSetInfo& info, const te::gm::Envelope& e,
61 
62  std::auto_ptr<ObservationDataSet> getDataSet(const ObservationDataSetInfo& info, const te::gm::Geometry& geom,
65 
66  std::auto_ptr<ObservationDataSet> getDataSet(const ObservationDataSetInfo& info,
69 
70  std::auto_ptr<ObservationDataSet> getDataSet(const ObservationDataSetInfo& info,
71  const te::dt::DateTime& dt,
73  const te::gm::Envelope& e,
76 
77  std::auto_ptr<ObservationDataSet> getDataSet(const ObservationDataSetInfo& info,
81 
82  void getInfo( const TrajectoryDataSetInfo& input, std::vector<TrajectoryDataSetInfo>& output);
83 
84  std::auto_ptr<TrajectoryDataSet> getDataSet(const TrajectoryDataSetInfo& info,
86 
87  std::auto_ptr<TrajectoryDataSet> getDataSet(const TrajectoryDataSetInfo& info,
90 
91  std::auto_ptr<TrajectoryDataSet> getDataSet(const TrajectoryDataSetInfo& info,
94 
95  std::auto_ptr<TrajectoryDataSet> getDataSet(const TrajectoryDataSetInfo& info,
98 
99  std::auto_ptr<TrajectoryDataSet> getDataSet(const TrajectoryDataSetInfo& info,
100  const te::dt::DateTime& dt,
102  const te::gm::Envelope& e,
105 
106  std::auto_ptr<TrajectoryDataSet> getDataSet(const TrajectoryDataSetInfo& info,
110 
111  void getInfo( const TimeSeriesDataSetInfo& input, std::vector<TimeSeriesDataSetInfo>& output);
112 
113  std::auto_ptr<TimeSeriesDataSet> getDataSet(const TimeSeriesDataSetInfo& info,
115 
116  std::auto_ptr<TimeSeriesDataSet> getDataSet(const TimeSeriesDataSetInfo& info,
119 
120  std::auto_ptr<TimeSeriesDataSet> getDataSet(const TimeSeriesDataSetInfo& info, const te::gm::Envelope& e,
123 
124  std::auto_ptr<TimeSeriesDataSet> getDataSet(const TimeSeriesDataSetInfo& info, const te::gm::Geometry& geom,
127 
128  std::auto_ptr<TimeSeriesDataSet> getDataSet(const TimeSeriesDataSetInfo& info,
129  const te::dt::DateTime& dt,
131  const te::gm::Envelope& e,
134 
135  std::auto_ptr<TimeSeriesDataSet> getDataSet(const TimeSeriesDataSetInfo& info,
139 
140  std::auto_ptr<te::dt::DateTimePeriod> getTemporalExtent(const ObservationDataSetInfo& info);
141 
142  std::auto_ptr<te::dt::DateTimePeriod> getTemporalExtent(const TrajectoryDataSetInfo& info);
143 
144  std::auto_ptr<te::dt::DateTimePeriod> getTemporalExtent(const TimeSeriesDataSetInfo& info);
145 
146  te::gm::Envelope getSpatialExtent(const ObservationDataSetInfo& info);
147 
148  te::gm::Envelope getSpatialExtent(const TrajectoryDataSetInfo& info);
149  //@}
150 
151  protected:
152 
153  /*! \brief It builds an ObservationDataSet from a given DataSet */
154  std::auto_ptr<ObservationDataSet> buildDataSet(te::da::DataSet* ds, const ObservationDataSetInfo& info);
155 
156  /*! \brief It builds an TrajectoryDataSet from a given DataSet */
157  std::auto_ptr<TrajectoryDataSet> buildDataSet(te::da::DataSet* ds, const TrajectoryDataSetInfo& info);
158 
159  /*! \brief It builds an TimeSeriesDataSet from a given DataSet */
160  std::auto_ptr<TimeSeriesDataSet> buildDataSet(te::da::DataSet* ds, const TimeSeriesDataSetInfo& info);
161 
162  virtual ~STDataLoaderFromDS();
163  };
164  } // end namespace st
165 } // end namespace te
166 
167 #endif // __TERRALIB_ST_INTERNAL_STDATALOADERFROMDS_H
168 
169 
170 
#define TESTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:88
An abstract class responsible for loading spatiotemporal data from data sources.
A class that contains infos about a DataSet that contains observations.
This file contains an abstract class responsible for loading spatiotemporal data from data sources...
TemporalRelation
Temporal relations between date and time (Source: Allen, 1991).
Definition: Enums.h:140
SpatialRelation
Spatial relations between geometric objects.
Definition: Enums.h:127
TraverseType
A dataset can be traversed in two ways:
Definition: Enums.h:53
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
URI C++ Library.
A class responsible for loading spatiotemporal data from a DataSource using query capabilities...
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:73
A class that contains infos about a DataSet that contains observations of one or more trajectories...
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:112
A class that contains infos about a DataSet that contains observations of one or more time series...