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/DataSet.h"
34 #include "../dataaccess/dataset/DataSetTypeConverter.h"
35 #include "../dataaccess/datasource/DataSource.h"
36 
37 #include "../datatype/Property.h"
38 
39 #include "../memory/DataSet.h"
40 #include "../statistics/core/Enums.h"
41 
42 #include "Config.h"
43 #include "Enums.h"
44 
45 // STL
46 #include <map>
47 #include <memory>
48 #include <string>
49 #include <vector>
50 
51 namespace te
52 {
53  namespace vp
54  {
56  {
57  public:
58 
59  GeometricOp();
60 
61  virtual ~GeometricOp() {}
62 
63  virtual bool run() = 0;
64 
65  virtual bool paramsAreValid();
66 
67  void setInput(te::da::DataSourcePtr inDsrc,
68  std::string inDsetName,
69  std::auto_ptr<te::da::DataSetTypeConverter> converter);
70 
71  void setParams(std::vector<std::string> selectedProps,
72  std::vector<te::vp::GeometricOperation> operations,
74  std::string attribute,
75  bool outputLayer);
76 
77  void setOutput(std::auto_ptr<te::da::DataSource> outDsrc, std::string dsname);
78 
79  std::vector<std::string> GetOutputDSetNames();
80 
81  protected:
82 
84  bool MultiGeomColumns,
85  int geomOp = -1);
86 
88  std::string m_inDsetName;
89  std::auto_ptr<te::da::DataSetTypeConverter> m_converter;
90 
91  std::vector<std::string> m_selectedProps;
92  std::vector<te::vp::GeometricOperation> m_operations;
94  std::string m_attribute;
96 
97  std::auto_ptr<te::da::DataSource> m_outDsrc;
98  std::string m_outDsetName;
99  std::vector<std::string> m_outDsetNameVec;
100  };
101  }
102 }
103 #endif // __TERRALIB_VP_INTERNAL_GEOMETRIC_OP_H
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
std::vector< std::string > m_outDsetNameVec
Definition: GeometricOp.h:99
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1435
A class that models the description of a dataset.
Definition: DataSetType.h:72
GeometricOpObjStrategy
Defines the strategy used for the processing of the input geometries.
Definition: Enums.h:115
URI C++ Library.
std::string m_inDsetName
Definition: GeometricOp.h:88
Enumerations related to Vector Processing module.
TEDATAACCESSEXPORT DataSetType * GetDataSetType(const std::string &name, const std::string &datasourceId)
std::string m_attribute
Definition: GeometricOp.h:94
virtual ~GeometricOp()
Definition: GeometricOp.h:61
std::auto_ptr< te::da::DataSource > m_outDsrc
Definition: GeometricOp.h:97
te::da::DataSourcePtr m_inDsrc
Definition: GeometricOp.h:87
std::vector< std::string > m_selectedProps
Definition: GeometricOp.h:91
std::auto_ptr< te::da::DataSetTypeConverter > m_converter
Definition: GeometricOp.h:89
std::vector< te::vp::GeometricOperation > m_operations
Definition: GeometricOp.h:92
Configuration flags for the Terrralib Vector Processing module.
te::vp::GeometricOpObjStrategy m_objStrategy
Definition: GeometricOp.h:93
std::string m_outDsetName
Definition: GeometricOp.h:98