GeometricOp.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 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 GeometricOp.h
22 
23  \brief Geometric operation.
24 
25  \ingroup vp
26  */
27 
28 #ifndef __TERRALIB_VP_INTERNAL_GEOMETRIC_OP_H
29 #define __TERRALIB_VP_INTERNAL_GEOMETRIC_OP_H
30 
31 //Terralib
32 
33 #include "../dataaccess/dataset/DataSetType.h"
34 #include "../dataaccess/dataset/DataSetTypeConverter.h"
35 #include "../dataaccess/datasource/DataSource.h"
36 
37 #include "Config.h"
38 #include "Enums.h"
39 
40 // STL
41 #include <string>
42 #include <vector>
43 
44 namespace te
45 {
46  namespace vp
47  {
49  {
50  public:
51 
53 
54  virtual ~GeometricOp() {}
55 
56  virtual bool run() = 0;
57 
58  virtual bool paramsAreValid();
59 
61  std::string inDsetName,
62  std::unique_ptr<te::da::DataSetTypeConverter> converter);
63 
64  void setParams(std::vector<std::string> selectedProps,
65  std::vector<te::vp::GeometricOperation> operations,
67  std::string attribute,
68  int newSRID);
69 
70  void setOutput(std::unique_ptr<da::DataSource> outDsrc,
71  std::string dsname);
72 
73  std::vector<std::string> GetOutputDSetNames();
74 
75  protected:
76 
78  bool MultiGeomColumns,
79  int geomOp = -1);
80 
82  std::string m_inDsetName;
83  std::unique_ptr<te::da::DataSetTypeConverter> m_converter;
84 
85  std::vector<std::string> m_selectedProps;
86  std::vector<te::vp::GeometricOperation> m_operations;
88  std::string m_attribute;
89  int m_newSRID;
90 
91  std::unique_ptr<te::da::DataSource> m_outDsrc;
92  std::string m_outDsetName;
93  std::vector<std::string> m_outDsetNameVec;
94  };
95  }
96 }
97 #endif // __TERRALIB_VP_INTERNAL_GEOMETRIC_OP_H
te::vp::GeometricOp::m_converter
std::unique_ptr< te::da::DataSetTypeConverter > m_converter
Definition: GeometricOp.h:83
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::vp::GeometricOp::paramsAreValid
virtual bool paramsAreValid()
te::vp::GeometricOp::setParams
void setParams(std::vector< std::string > selectedProps, std::vector< te::vp::GeometricOperation > operations, te::vp::GeometricOpObjStrategy objStrategy, std::string attribute, int newSRID)
te::vp::GeometricOp::m_outDsetNameVec
std::vector< std::string > m_outDsetNameVec
Definition: GeometricOp.h:93
te::vp::GeometricOp::setInput
void setInput(te::da::DataSourcePtr inDsrc, std::string inDsetName, std::unique_ptr< te::da::DataSetTypeConverter > converter)
te::vp::GeometricOp::setOutput
void setOutput(std::unique_ptr< da::DataSource > outDsrc, std::string dsname)
te::vp::GeometricOpObjStrategy
GeometricOpObjStrategy
Defines the strategy used for the processing of the input geometries.
Definition: Enums.h:116
te::vp::GeometricOp::m_outDsrc
std::unique_ptr< te::da::DataSource > m_outDsrc
Definition: GeometricOp.h:91
Enums.h
Enumerations of XML module.
TEVPEXPORT
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
te::vp::GeometricOp::GeometricOp
GeometricOp()
te::vp::GeometricOp::m_inDsrc
te::da::DataSourcePtr m_inDsrc
Definition: GeometricOp.h:81
te::vp::GeometricOp::m_attribute
std::string m_attribute
Definition: GeometricOp.h:88
te::vp::GeometricOp::~GeometricOp
virtual ~GeometricOp()
Definition: GeometricOp.h:54
te::vp::GeometricOp::m_operations
std::vector< te::vp::GeometricOperation > m_operations
Definition: GeometricOp.h:86
te::vp::GeometricOp::m_inDsetName
std::string m_inDsetName
Definition: GeometricOp.h:82
te::vp::GeometricOp::GetOutputDSetNames
std::vector< std::string > GetOutputDSetNames()
te::vp::GeometricOp::m_selectedProps
std::vector< std::string > m_selectedProps
Definition: GeometricOp.h:85
te::da::DataSourcePtr
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
te::vp::GeometricOp::run
virtual bool run()=0
Config.h
Proxy configuration file for TerraView (see terraview_config.h).
te::vp::GeometricOp::GetDataSetType
te::da::DataSetType * GetDataSetType(te::vp::GeometricOpObjStrategy, bool MultiGeomColumns, int geomOp=-1)
te::vp::GeometricOp::m_outDsetName
std::string m_outDsetName
Definition: GeometricOp.h:92
te::da::DataSetType
A class that models the description of a dataset.
Definition: DataSetType.h:73
te::vp::GeometricOp::m_objStrategy
te::vp::GeometricOpObjStrategy m_objStrategy
Definition: GeometricOp.h:87
te::qt::plugins::wtss::attribute
@ attribute
Definition: WtssDialog.h:83
te::vp::GeometricOp::m_newSRID
int m_newSRID
Definition: GeometricOp.h:89
te::vp::GeometricOp
Definition: GeometricOp.h:49