Profile.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 terralib/mnt/core/Profile.h
22 
23  \brief This file contains a class that represents the profile.
24 
25  \reference Adapted from TerraLib4.
26 */
27 
28 #ifndef __TERRALIB_MNT_INTERNAL_PROFILE_H
29 #define __TERRALIB_MNT_INTERNAL_PROFILE_H
30 
31 // Terralib Includes
32 #include "Config.h"
33 //#include "CreateIsolinesParams.h"
34 
35 #include "../../../../src/terralib/dataaccess.h"
36 #include "../../../../src/terralib/dataaccess/datasource/DataSourceFactory.h"
37 #include "../../../../src/terralib/memory/DataSet.h"
38 #include "../../../../src/terralib/common/Holder.h"
39 #include "../../../../src/terralib/statistics/core/Enums.h"
40 
41 // STL Includes
42 #include <map>
43 #include <memory>
44 
45 
46 namespace te
47 {
48  //forward declarations
49  namespace da { class DataSetType; }
50  namespace gm { class Geometry; }
51  namespace map { class AbstractLayer; }
52  namespace mem { class DataSet; }
53 }
54 
55 
56 namespace te
57 {
58  namespace mnt
59  {
61  {
62  /*!
63  \class CreateIsolines
64 
65  \brief Class used to execute the create isolines
66 
67  */
68 
69  public:
70 
71  /*! \brief Default constructor. */
72  Profile();
73 
74  /*! \brief Virtual destructor. */
75  ~Profile();
76 
77  /*! \brief Calculate Profile from raster */
78  bool runRasterProfile(std::vector<te::gm::LineString*> visadas, std::vector<te::gm::LineString*>& profileSet);
79 
80  /*! \brief Calculate Profile from isolines */
81  bool runIsolinesProfile(std::vector<te::gm::LineString*> visadas, std::vector<te::gm::LineString*>& profileSet);
82 
83  /*! \brief Calculate Profile from TIN */
84  bool runTINProfile(std::vector<te::gm::LineString*> visadas, std::vector<te::gm::LineString*>& profileSet);
85 
86  /*! \brief Reads raster */
87  std::auto_ptr<te::rst::Raster> getPrepareRaster();
88 
89  /*! \brief Sets input parameters to calculate profile */
90  void setInput(te::da::DataSourcePtr inDsrc, std::string inName, std::auto_ptr<te::da::DataSetType> inDsetType, double dummy, std::string zattr);
91 
92  /*! \brief Sets SRID */
93  void setSRID(int srid) { m_srid = srid; }
94 
95  private:
96  te::gm::LineString* calculateProfile(std::vector<te::gm::Geometry*> &isolines, te::gm::LineString &trajectory);
97 
98  int m_srid; //!< Attribute with spatial reference information
99  double m_dummy; //!< Nodata value
100  te::da::DataSourcePtr m_inDsrc; //!< Input Datasource
101  std::string m_inName; //!< Input data name
102  std::auto_ptr<te::da::DataSetType> m_inDsType; //!< Input datasettype
103  std::string m_attrZ; //!< Z attribute name
104 
105  };
106  }
107 }
108 
109 #endif //__TERRALIB_MNT_INTERNAL_CREATEISOLINES_H
std::auto_ptr< te::da::DataSetType > m_inDsType
Input datasettype.
Definition: Profile.h:102
std::string m_attrZ
Z attribute name.
Definition: Profile.h:103
te::da::DataSourcePtr m_inDsrc
Input Datasource.
Definition: Profile.h:100
int m_srid
Attribute with spatial reference information.
Definition: Profile.h:98
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1438
std::string m_inName
Input data name.
Definition: Profile.h:101
#define TEMNTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:41
void setSRID(int srid)
Sets SRID.
Definition: Profile.h:93
LineString is a curve with linear interpolation between points.
Definition: LineString.h:62
URI C++ Library.
double m_dummy
Nodata value.
Definition: Profile.h:99