All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RasterCoverageDataSetInfo.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 RasterCoverageDataSetInfo.cpp
22 
23  \brief This file contains a class called RasterCoverageDataSetInfo
24 */
25 //TerraLib
26 #include "../../../datatype/DateTime.h"
27 
28 //ST
30 
32  const std::string& dsName, int tPropIdx, int rstPropIdx)
33  : m_obsDsInfo(dsinfo, dsName, tPropIdx, rstPropIdx),
34  m_rstPropIdx(rstPropIdx),
35  m_time(0)
36 {
37 }
38 
40  const std::string& dsName, int rstPropIdx, te::dt::DateTime* time)
41  : m_obsDsInfo(dsinfo, dsName, -1, rstPropIdx),
42  m_rstPropIdx(rstPropIdx),
43  m_time(time)
44 {
45 }
46 
48  : m_obsDsInfo(info),
49  m_rstPropIdx(rstPropIdx),
50  m_time(0)
51 {
52 }
53 
55  te::dt::DateTime* time)
56  : m_obsDsInfo(info),
57  m_rstPropIdx(rstPropIdx),
58  m_time(time)
59 {
60 }
61 
63  : m_obsDsInfo(rcinfo.m_obsDsInfo),
64  m_rstPropIdx(rcinfo.m_rstPropIdx),
65  m_time(static_cast<te::dt::DateTime*> (rcinfo.m_time->clone()))
66 {
67 }
68 
71 {
72  if(this != &other)
73  {
74  m_obsDsInfo = other.m_obsDsInfo;
75  m_rstPropIdx = other.m_rstPropIdx;
76  m_time.reset(static_cast<te::dt::DateTime*> (other.m_time->clone()));
77  }
78  return *this;
79 }
80 
82 {
84 }
85 
87 {
88  return m_obsDsInfo;
89 }
90 
92 {
93  return m_obsDsInfo.getDataSourceInfo();
94 }
95 
97 {
98  return m_obsDsInfo.getTimePropIdxs();
99 }
100 
102 {
103  return m_rstPropIdx;
104 }
105 
106 std::auto_ptr<te::dt::DateTime> te::st::RasterCoverageDataSetInfo::getTime() const
107 {
108  return std::auto_ptr<te::dt::DateTime>(static_cast<te::dt::DateTime*>(m_time->clone()));
109 }
110 
112 {
113 }
114 
115 
116 
RasterCoverageDataSetInfo(const te::da::DataSourceInfo &dsinfo, const std::string &dsName, int tPropIdx, int rstPropIdx)
Constructor.
int m_rstPropIdx
The property index that contains the raster.
A class that contains infos about a DataSet that contains observations.
CoverageType
An enum for the types of coverage.
Definition: Enums.h:43
te::st::CoverageType getCoverageType() const
It returns the type of the coverage.
std::auto_ptr< te::dt::DateTime > getTime() const
It returns the date and time associated to the raster coverage, when this information is not in the D...
const ObservationDataSetInfo & getObservationDataSetInfo() const
It returns information about the DataSet that contains the coverage observations. ...
std::auto_ptr< te::dt::DateTime > m_time
virtual ~RasterCoverageDataSetInfo()
Virtual destructor.
const te::da::DataSourceInfo & getDataSourceInfo() const
It returns information about the DataSource from which the DataSet comes.
This file contains a class called RasterCoverageDataSetInfo.
ObservationDataSetInfo m_obsDsInfo
Infos about the DataSource and DataSet that contains the point coverage observations.
const std::vector< int > & getTimePropIdxs() const
It returns the indexes of the DataSet properties that contains the times associated to the coverage...
A class that contains infos about a DataSource and DataSet that contains observations of a raster cov...
A class that represents a data source component.
RasterCoverageDataSetInfo & operator=(const RasterCoverageDataSetInfo &other)
Copy assignment operator.
int getRasterPropIdx() const
It returns the property index that contains the raster of the coverage.