SubdivideOperation.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 terralib/vp/SubdivideOperation.h
22 
23  \brief This operation subdivides geometries ensuring that they don't have more than the given number of coordinates
24  */
25 
26 #ifndef __TERRALIB_VP_INTERNAL_SUBDIVIDEOPERATION_H
27 #define __TERRALIB_VP_INTERNAL_SUBDIVIDEOPERATION_H
28 
29  //Terralib include files
30 #include "Config.h"
31 
32 #include "AbstractOperation.h"
33 
34 #include <mutex>
35 #include <vector>
36 
37 namespace te
38 {
39  namespace vp
40  {
41  class FeatureSet;
42 
44  {
45  public:
46  SubdivideOperationParameters(std::size_t maxCoordinates = 0);
48 
49  void setMaxCoordinates(std::size_t maxCoordinates);
50 
51  std::size_t getMaxCoordinates() const;
52 
53  private:
54  std::size_t m_maxCoordinates;
55  };
56 
57  /*!
58  \class SubdivideOperation
59  \brief This operation subdivides geometries ensuring that they don't have more than the given number of coordinates
60  */
62  {
63  public:
64 
65  /*!
66  * \brief Constructor
67  */
69 
70  //!< Destructor
71  virtual ~SubdivideOperation();
72 
73  virtual std::unique_ptr<te::vp::AbstractOperationCapabilities> getCapabilities() const override;
74 
75  std::vector<te::vp::FeatureSet> executeImpl(const std::vector<te::vp::FeatureSet>& vecInput) override;
76 
77  te::da::DataSetType* createBasicOutputDataSetType(const std::string& dataSetName, int srid, te::gm::GeomType geometryType, const std::string& geometryColumnName) const override;
78 
79  protected:
80 
81  std::size_t safeCreateParentId();
82 
83  protected:
84 
85  mutable std::size_t m_parentIdColumnIndex;
86  std::size_t m_parentId;
87  std::mutex m_mutex;
88  };
89 
91  {
92  public:
93 
95 
96  virtual ~SubdivideOperationFactory();
97 
98  protected:
99 
100  virtual te::vp::AbstractOperation* build() override;
101  };
102 
103  }//end namespace vp
104 }// end namespace te
105 
106 #endif // __TERRALIB_VP_INTERNAL_MAKEVALIDOPERATION_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
This operation subdivides geometries ensuring that they don&#39;t have more than the given number of coor...
A class that models the description of a dataset.
Definition: DataSetType.h:72
Abstract class used to define an operation.
TerraLib.
Abstract class used to define the input/ ouptut parameters for TerraAmazon Operations.
Abstract factory used to create Operations.
Abstract Class to represent an abstract vector operation.
Configuration flags for the Terrralib Vector Processing module.