All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrajectoryDataSetType.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 TrajectoryDataSetType.h
22 
23  \brief This file contains a class called TrajectoryDataSetType
24 */
25 
26 #ifndef __TERRALIB_ST_INTERNAL_TRAJECTORYDATASETTYPE_H
27 #define __TERRALIB_ST_INTERNAL_TRAJECTORYDATASETTYPE_H
28 
29 //ST
30 #include "../observation/ObservationDataSetType.h"
31 
32 //STL
33 #include <string>
34 #include <vector>
35 
36 namespace te
37 {
38  namespace st
39  {
40  /*!
41  \class TrajectoryDataSetType
42 
43  \brief A class that contains complemental information
44  about a DataSet that holds observations of a trajectory.
45 
46  A trajectory represents the variation of spatial locations or extents of an
47  object over time.
48 
49  \sa ObservationDataSet ObservationDataSetType
50  */
52  {
53  public:
54 
55  /*!
56  \brief Constructor.
57 
58  \param tPropIdx The index of the property that contains the times of a trajectory.
59  \param gPropIdx The index of the property that contains the geometries of a trajectory.
60  \param idPropIdx The index of the property that contains the identity of the trajectory.
61  \param id The trajectory id.
62  */
63  TrajectoryDataSetType(int tPropIdx, int gPropIdx, int idPropIdx, const std::string& id);
64 
65  /*!
66  \brief Constructor.
67 
68  \param tPropIdxs The indexes of the properties that contains the beginning and final times of a trajectory.
69  \param gPropIdx The index of the property that contains the geometries of a trajectory.
70  \param idPropIdx The index of the property that contains the identity of the trajectory.
71  \param id The trajectory id.
72 
73  \note This constructor is used when each observation of a trajectory is associated to a period and
74  the DataSet uses two properties to store these periods.
75  */
76  TrajectoryDataSetType(const std::vector<int>& tPropIdxs, int gPropIdx, int idPropIdx,
77  const std::string& id);
78 
79  /*!
80  \brief Constructor.
81 
82  \param type The ObservationSetType
83  \param idPropIdx The property index that contains the object identification.
84  \param id The trajectory id.
85 
86  \note idPropIdx equal to "-1" means that the DataSet contains observations of only one trajectory.
87  */
88  TrajectoryDataSetType(const ObservationDataSetType& type, int idPropIdx, const std::string& id);
89 
90  /*!
91  \brief It returns the observation set type.
92 
93  \return The observation set type.
94  */
95  const ObservationDataSetType& getType() const;
96 
97  /*!
98  \brief It returns the property index that contains the trajectory geometries.
99 
100  \return The property index that contains the trajectory geometries.
101  */
102  int getGeomPropIdx() const;
103 
104  /*!
105  \brief It returns the property index that contains the times associated to the trajectory.
106 
107  \return The property index that contains the times associated to the trajectory.
108  */
109  int getTimePropIdx() const;
110 
111  /*!
112  \brief It returns the property index that contains the begin time associated to the trajectory.
113 
114  \return The property index that contains the begin times associated to the trajectory.
115  */
116  int getBeginTimePropIdx() const;
117 
118  /*!
119  \brief It returns the property index that contains the final time associated to the trajectory.
120 
121  \return The property index that contains the end time associated to the trajectory.
122  */
123  int getEndTimePropIdx() const;
124 
125  /*!
126  \brief It returns the property index that contains the object identifications.
127 
128  \return The property index that contains the object identifications.
129  */
130  int getIdPropIdx() const;
131 
132  /*!
133  \brief It sets the property index that contains the object identifications.
134 
135  \param idx The property index that contains the object identifications.
136  */
137  void setIdPropIdx(int idx);
138 
139  /*!
140  \brief It returns the trajectory id.
141 
142  \return The trajectory id.
143  */
144  std::string getId() const;
145 
146  /*!
147  \brief It sets the trajectory id.
148 
149  \param id The trajectory id.
150  */
151  void setId(const std::string& id);
152 
153  /*! \brief Virtual destructor. */
154  virtual ~TrajectoryDataSetType();
155 
156  protected:
157 
158  ObservationDataSetType m_obsType; //!< The internal observation set type
159  int m_idPropIdx; //!< The property index that contains the object identification.
160  std::string m_id; //!< The trajectory id
161  };
162  } // end namespace st
163 } // end namespace te
164 
165 #endif // __TERRALIB_ST_INTERNAL_TRAJECTORYDATASETTYPE_H
166 
int m_idPropIdx
The property index that contains the object identification.
ObservationDataSetType m_obsType
The internal observation set type.
A class that contains complemental information about a DataSet that holds observations of a trajector...
std::string m_id
The trajectory id.
#define TESTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:136
A class that contains complemental DataSetType information about a DataSet that holds observations...