All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PointCoverageDataSetInfo.h
Go to the documentation of this file.
1 /* Copyright (C) 2001-2009 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 PointCoverageDataSetInfo.h
22 
23  \brief This file contains a class called PointCoverageDataSetInfo
24 */
25 
26 #ifndef __TERRALIB_ST_INTERNAL_POINTCOVERAGEDATASETINFO_H
27 #define __TERRALIB_ST_INTERNAL_POINTCOVERAGEDATASETINFO_H
28 
29 //ST
30 #include "../../Config.h"
31 #include "../observation/ObservationDataSetInfo.h"
32 #include "CoverageDataSetInfo.h"
33 
34 //Forward declarations
35 namespace te { namespace dt { class DateTime; } }
36 
37 namespace te
38 {
39  namespace st
40  {
41 
42  /*!
43  \class PointCoverageDataSetInfo
44 
45  \brief A class that contains infos about a DataSource and DataSet
46  that contains observations of a point coverage.
47 
48  \sa ObservationDataSetInfo
49  */
51  {
52  public:
53 
54  /*!
55  \brief Constructor.
56 
57  A user must use this constructor when the DataSet has a property that contain a date and time
58  associated to each observation.
59 
60  \param dsinfo Infos about the DataSource.
61  \param dsName The DataSet name.
62  \param tPropIdx The property index that contains the times associated to the coverage observations.
63  \param ptPropIdx The property index that contains the points associated to the coverage observations.
64  \param vlPropIdx The property index that contains the values of the coverage.
65  \param time The date and time associated to the entire point coverage.
66  */
67  PointCoverageDataSetInfo(const te::da::DataSourceInfo& dsinfo, const std::string& dsName,
68  int tPropIdx, int ptPropIdx, int vlPropIdx, te::dt::DateTime* time);
69 
70  /*!
71  \brief Constructor.
72 
73  A user must use this constructor when the DataSet has NOT a property that contain a date and time
74  associated to each observation.
75 
76  \param dsinfo Infos about the DataSource.
77  \param dsName The DataSet name.
78  \param ptPropIdx The property index that contains the points associated to the coverage.
79  \param vlPropIdx The property index that contains the values of the coverage.
80  \param time The date and time associated to the entire point coverage.
81 
82  \note It will take the ownership of the given pointers.
83  */
84  PointCoverageDataSetInfo(const te::da::DataSourceInfo& dsinfo, const std::string& dsName,
85  int ptPropIdx, int vlPropIdx, te::dt::DateTime* time);
86 
87  /*!
88  \brief Constructor.
89 
90  A user must use this constructor when the DataSet has a property that contain a date and time
91  associated to each observation.
92 
93  \param dsinfo Infos about the DataSource.
94  \param dsName The DataSet name.
95  \param tPropIdx The property indexes that contains the times associated to the coverage observations.
96  \param ptPropIdx The property index that contains the points associated to the coverage observations.
97  \param vlPropIdx The property index that contains the values of the coverage observations.
98  \param time The date and time associated to the entire point coverage.
99  */
100  PointCoverageDataSetInfo(const te::da::DataSourceInfo& dsinfo, const std::string& dsName,
101  const std::vector<int>& tPropIdx, int ptPropIdx, const std::vector<int>& vlPropIdx, te::dt::DateTime* time);
102 
103  /*!
104  \brief Constructor.
105 
106  A user must use this constructor when the DataSet has NOT a property that contain a date and time
107  associated to each observation.
108 
109  \param dsinfo Infos about the DataSource.
110  \param dsName The DataSet name.
111  \param ptPropIdx The property index that contains the points associated to the coverage observations.
112  \param vlPropIdx The property index that contains the values of the coverage observations.
113  \param time The date and time associated to the entire point coverage.
114 
115  \note It will take the ownership of the given pointers.
116  */
117  PointCoverageDataSetInfo(const te::da::DataSourceInfo& dsinfo, const std::string& dsName,
118  int ptPropIdx, const std::vector<int>& vlPropIdx, te::dt::DateTime* time);
119 
120  /*!
121  \brief Constructor.
122 
123  \param info Infos about the DataSource and DataSet that contains the coverage observations
124  \param vlPropIdx The property index that contains the values of the coverage.
125  \param time The date and time associated to the entire point coverage.
126 
127  \note It will take the ownership of the given pointers.
128  */
129  PointCoverageDataSetInfo( const ObservationDataSetInfo& info, const std::vector<int>& vlPropIdxs,
130  te::dt::DateTime* time);
131 
132  /*! \name Inhered methods*/
133  //@{
134  te::st::CoverageType getCoverageType() const ;
135 
136  const ObservationDataSetInfo& getObservationDataSetInfo() const;
137 
138  const te::da::DataSourceInfo& getDataSourceInfo() const;
139 
140  const std::vector<int>& getTimePropIdxs() const;
141  //@}
142 
143  /*!
144  \brief It returns the property index that contains the points of the coverage.
145 
146  \return The property index that contains the points of the coverage.
147  */
148  int getPointPropIdx() const;
149 
150  /*!
151  \brief It returns the property indexes that contains the values of the coverage.
152 
153  \return The property indexes that contains the values of the coverage.
154  */
155  const std::vector<int>& getValuePropIdxs() const;
156 
157  /*!
158  \brief It returns the date and time associated to the entire point coverage.
159 
160  \return The date and time associated to the point coverage.
161  */
162  std::auto_ptr<te::dt::DateTime> getTime() const;
163 
164 
165  /*! \brief Virtual destructor. */
166  virtual ~PointCoverageDataSetInfo();
167 
168  protected:
169 
170  ObservationDataSetInfo m_obsDsInfo; //!< Infos about the DataSource and DataSet that contains the point coverage observations
171  std::vector<int> m_vlPropIdx; //!< The indexes of the properties that contain the point coverage values.
172  std::auto_ptr<te::dt::DateTime> m_time; //! The date and time associated to this point coverage, when this information is not in the DataSet
173  };
174  } // end namespace st
175 } // end namespace te
176 
177 #endif // __TERRALIB_ST_INTERNAL_POINTCOVERAGEDATASETINFO_H
178 
A class that contains infos about a DataSet that contains observations.
An abstract class that contains infos about a DataSource and DataSet that contains observations of a ...
A class that represents a data source component.
std::auto_ptr< te::dt::DateTime > m_time
#define TESTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:136
This file contains an abstract class called CoverageDataSetInfo.
ObservationDataSetInfo m_obsDsInfo
Infos about the DataSource and DataSet that contains the point coverage observations.
CoverageType
An enum for the types of coverage.
Definition: Enums.h:43
A class that contains infos about a DataSource and DataSet that contains observations of a point cove...
std::vector< int > m_vlPropIdx
The indexes of the properties that contain the point coverage values.