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 
52  GeometricOp();
53 
54  virtual ~GeometricOp() {}
55 
56  virtual bool run() = 0;
57 
58  virtual bool paramsAreValid();
59 
60  void setInput(te::da::DataSourcePtr inDsrc,
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 
69  void setOutput(std::unique_ptr<da::DataSource> outDsrc,
70  std::string dsname);
71 
72  std::vector<std::string> GetOutputDSetNames();
73 
74  protected:
75 
77  bool MultiGeomColumns,
78  int geomOp = -1);
79 
81  std::string m_inDsetName;
82  std::unique_ptr<te::da::DataSetTypeConverter> m_converter;
83 
84  std::vector<std::string> m_selectedProps;
85  std::vector<te::vp::GeometricOperation> m_operations;
87  std::string m_attribute;
88 
89  std::unique_ptr<te::da::DataSource> m_outDsrc;
90  std::string m_outDsetName;
91  std::vector<std::string> m_outDsetNameVec;
92  };
93  }
94 }
95 #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:91
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1438
Enumerations related to Vector Processing module.
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::unique_ptr< te::da::DataSource > m_outDsrc
Definition: GeometricOp.h:89
std::string m_inDsetName
Definition: GeometricOp.h:81
TEDATAACCESSEXPORT DataSetType * GetDataSetType(const std::string &name, const std::string &datasourceId)
std::string m_attribute
Definition: GeometricOp.h:87
virtual ~GeometricOp()
Definition: GeometricOp.h:54
te::da::DataSourcePtr m_inDsrc
Definition: GeometricOp.h:80
std::vector< std::string > m_selectedProps
Definition: GeometricOp.h:84
std::vector< te::vp::GeometricOperation > m_operations
Definition: GeometricOp.h:85
Configuration flags for the Terrralib Vector Processing module.
te::vp::GeometricOpObjStrategy m_objStrategy
Definition: GeometricOp.h:86
std::string m_outDsetName
Definition: GeometricOp.h:90
std::unique_ptr< te::da::DataSetTypeConverter > m_converter
Definition: GeometricOp.h:82