All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrajectoryDataSetType.cpp
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.cpp
22 
23  \brief This file contains a class called TrajectoryDataSetType
24 */
25 
26 //ST
27 #include "TrajectoryDataSetType.h"
28 #include "../observation/ObservationDataSetType.h"
29 
30 te::st::TrajectoryDataSetType::TrajectoryDataSetType(int tPropIdx, int gPropIdx, int idPropIdx,
31  const std::string& id)
32  : m_obsType(tPropIdx, gPropIdx, gPropIdx),
33  m_idPropIdx(idPropIdx),
34  m_id(id)
35 {
36 }
37 
38 te::st::TrajectoryDataSetType::TrajectoryDataSetType(const std::vector<int>& tPropIdxs, int gPropIdx,
39  int idPropIdx, const std::string& id)
40  : m_obsType(tPropIdxs, std::vector<int>(1,gPropIdx), gPropIdx),
41  m_idPropIdx(idPropIdx),
42  m_id(id)
43 {
44 }
45 
47  int idPropIdx, const std::string& id)
48  : m_obsType(type),
49  m_idPropIdx(idPropIdx),
50  m_id(id)
51 {
52 }
53 
56 {
57  return m_obsType;
58 }
59 
61 {
62  return m_obsType.getGeomPropIdx();
63 }
64 
66 {
67  return m_obsType.getBeginTimePropIdx();
68 }
69 
71 {
72  return m_obsType.getBeginTimePropIdx();
73 }
74 
76 {
77  return m_obsType.getEndTimePropIdx();
78 }
79 
81 {
82  return m_idPropIdx;
83 }
84 
86 {
87  m_idPropIdx=idx;
88 }
89 
90 
92 {
93  return m_id;
94 }
95 
96 void te::st::TrajectoryDataSetType::setId(const std::string& id)
97 {
98  m_id = id;
99 }
100 
102 {
103 }
104 
This file contains a class called TrajectoryDataSetType.
int getIdPropIdx() const
It returns the property index that contains the object identifications.
int getBeginTimePropIdx() const
It returns the property index that contains the begin time associated to the trajectory.
const ObservationDataSetType & getType() const
It returns the observation set type.
int getGeomPropIdx() const
It returns the property index that contains the trajectory geometries.
int getTimePropIdx() const
It returns the property index that contains the times associated to the trajectory.
std::string getId() const
It returns the trajectory id.
TrajectoryDataSetType(int tPropIdx, int gPropIdx, int idPropIdx, const std::string &id)
Constructor.
A class that contains complemental DataSetType information about a DataSet that holds observations...
void setId(const std::string &id)
It sets the trajectory id.
void setIdPropIdx(int idx)
It sets the property index that contains the object identifications.
int getEndTimePropIdx() const
It returns the property index that contains the final time associated to the trajectory.
virtual ~TrajectoryDataSetType()
Virtual destructor.