Loading...
Searching...
No Matches
Volume.h
Go to the documentation of this file.
1/*!
2\file terralib/mnt/core/Volume.h
3
4\brief This file contains a class to calculate volume.
5Adapted from SPRING
6*/
7
8#ifndef __TERRALIB_MNT_INTERNAL_VOLUME_H
9#define __TERRALIB_MNT_INTERNAL_VOLUME_H
10
11// Terralib Includes
12#include "Config.h"
13#include "Enums.h"
14
15#include "../../dataaccess/dataset/DataSet.h"
16#include "../../dataaccess/dataset/DataSetType.h"
17#include "../../dataaccess/datasource/DataSource.h"
18
19namespace te
20{
21 namespace mnt
22 {
24 {
25 public:
28
30 std::string inrstDsetName,
31 std::unique_ptr<te::da::DataSetType> inrstDsetType,
32 te::da::DataSourcePtr invecDsrc,
33 std::string invecDsetName,
34 std::unique_ptr<te::da::DataSetType> invecDsetType,
35 const te::da::ObjectIdSet* OidSet);
36
37 void setParams(double quota, std::string &attr, double dummy);
38
39 /*! Function used to set the Spatial Reference System ID */
40 void setSRID(int srid) { m_srid = srid; }
41
42 bool run();
43
44 void getResults(std::vector<std::string> &polyvec,
45 std::vector<std::string> &cortevec,
46 std::vector<std::string> &aterrovec,
47 std::vector<std::string> &areavec,
48 std::vector<std::string> &iquotavec);
49
50 protected:
51
52 // Find the polygon bounding box.
53 bool DefLC(te::gm::Polygon *pol, int& flin, int& llin, int& fcol, int& lcol);
54
55 bool CVGrd(te::gm::Polygon *pol, int flin, int llin, int fcol, int lcol, std::string &polid);
56
58 std::string m_inrstDsetName;
59 std::unique_ptr<te::da::DataSetType> m_inrstDsetType;
60
62 std::string m_invecDsetName;
63 std::unique_ptr<te::da::DataSetType> m_invecDsetType;
64
66
67 std::unique_ptr<te::rst::Raster> m_raster;
68
69 double m_quota;
70 std::string m_attr;
71 double m_dummy;
72
73 int m_srid; //!< Attribute with spatial reference information
74
75 std::vector<std::string> m_polyvec; //!< Attribute with structure to save results
76 std::vector<std::string> m_cortevec; //!< Attribute with structure to save results
77 std::vector<std::string> m_aterrovec; //!< Attribute with structure to save results
78 std::vector<std::string> m_areavec; //!< Attribute with structure to save results
79 std::vector<std::string> m_iquotavec; //!< Attribute with structure to save results
80
81 };
82 }
83}
84#endif //__TERRALIB_MNT_INTERNAL_VOLUME_H
This class represents a set of unique ids created in the same context. i.e. from the same data set.
Definition: ObjectIdSet.h:56
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
Definition: Polygon.h:51
double m_dummy
Definition: Volume.h:71
std::vector< std::string > m_iquotavec
Attribute with structure to save results.
Definition: Volume.h:79
te::da::DataSourcePtr m_inrstDsrc
Definition: Volume.h:57
std::string m_attr
Definition: Volume.h:70
void getResults(std::vector< std::string > &polyvec, std::vector< std::string > &cortevec, std::vector< std::string > &aterrovec, std::vector< std::string > &areavec, std::vector< std::string > &iquotavec)
int m_srid
Attribute with spatial reference information.
Definition: Volume.h:73
std::string m_invecDsetName
Definition: Volume.h:62
double m_quota
Definition: Volume.h:69
void setInput(te::da::DataSourcePtr inrstDsrc, std::string inrstDsetName, std::unique_ptr< te::da::DataSetType > inrstDsetType, te::da::DataSourcePtr invecDsrc, std::string invecDsetName, std::unique_ptr< te::da::DataSetType > invecDsetType, const te::da::ObjectIdSet *OidSet)
te::da::DataSourcePtr m_invecDsrc
Definition: Volume.h:61
const te::da::ObjectIdSet * m_OidSet
Definition: Volume.h:65
void setParams(double quota, std::string &attr, double dummy)
std::unique_ptr< te::da::DataSetType > m_invecDsetType
Definition: Volume.h:63
std::string m_inrstDsetName
Definition: Volume.h:58
void setSRID(int srid)
Definition: Volume.h:40
std::unique_ptr< te::da::DataSetType > m_inrstDsetType
Definition: Volume.h:59
std::vector< std::string > m_aterrovec
Attribute with structure to save results.
Definition: Volume.h:77
std::unique_ptr< te::rst::Raster > m_raster
Definition: Volume.h:67
std::vector< std::string > m_polyvec
Attribute with structure to save results.
Definition: Volume.h:75
bool DefLC(te::gm::Polygon *pol, int &flin, int &llin, int &fcol, int &lcol)
std::vector< std::string > m_cortevec
Attribute with structure to save results.
Definition: Volume.h:76
std::vector< std::string > m_areavec
Attribute with structure to save results.
Definition: Volume.h:78
bool CVGrd(te::gm::Polygon *pol, int flin, int llin, int fcol, int lcol, std::string &polid)
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
TerraLib.
#define TEMNTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:41
Proxy configuration file for TerraView (see terraview_config.h).
Enumerations of XML module.