Union.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 Union.h
22 
23 \brief Union operation.
24 
25 \ingroup vp
26 */
27 
28 #ifndef __TERRALIB_VP_INTERNAL_UNION_H
29 #define __TERRALIB_VP_INTERNAL_UNION_H
30 
31 //Terralib
32 
33 #include "../dataaccess/dataset/DataSetType.h"
34 #include "../datatype/Property.h"
35 //
36 #include "Algorithm.h"
37 #include "AlgorithmParams.h"
38 #include "Config.h"
39 
40 namespace te
41 {
42  namespace vp
43  {
44  class TEVPEXPORT Union : public Algorithm
45  {
46  public:
47 
48  Union();
49 
50  virtual ~Union() {}
51 
52  bool executeMemory(te::vp::AlgorithmParams* mainParams);
53 
54  bool executeQuery(te::vp::AlgorithmParams* mainParams);
55 
56  protected:
57  std::vector<std::pair<std::string, std::string> > getProperties(
58  const std::map<std::string, te::dt::AbstractData*>& specificParams);
59 
60  bool isCollection(
61  const std::map<std::string, te::dt::AbstractData*>& specificParams);
62 
63  te::da::DataSetType* getOutputDataSetType(
64  te::vp::AlgorithmParams* mainParams);
65 
66  te::gm::GeomType setGeomResultType(const te::gm::GeomType& geomType,
67  const bool& isCollection);
68 
69  te::gm::Geometry* setGeomAsMulti(te::gm::Geometry* geom);
70 
71  std::vector<te::dt::Property*> getFirstSelectedProperties(
72  const te::da::DataSetType* dataSetType,
73  const std::map<std::string, te::dt::AbstractData*>& specificParams);
74 
75  std::vector<te::dt::Property*> getSecondSelectedProperties(
76  const te::da::DataSetType* dataSetType,
77  const std::map<std::string, te::dt::AbstractData*>& specificParams);
78 
79  te::gm::GeomType getGeomResultType(const te::gm::GeomType& firstGeom,
80  const te::gm::GeomType& secondGeom,
81  const bool& isCollection);
82 
83  private:
84 
85  std::map<std::string, std::string> m_firstAttrNameMap;
86 
87  std::map<std::string, std::string> m_secondAttrNameMap;
88 
89  };
90  }
91 }
92 #endif // __TERRALIB_VP_INTERNAL_UNION_H
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
Definition: Enums.h:41
virtual ~Union()
Definition: Union.h:50
A class that models the description of a dataset.
Definition: DataSetType.h:72
std::map< std::string, std::string > m_firstAttrNameMap
Definition: Union.h:85
Algorithm Parameters.
std::map< std::string, std::string > m_secondAttrNameMap
Definition: Union.h:87
Define input/output parameters for an operation.
Definition: Algorithm.h:44
URI C++ Library.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:74
Configuration flags for the Terrralib Vector Processing module.