BufferQuery.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 BufferQuery.h
22 
23  \brief
24 
25  \ingroup vp
26 */
27 
28 #ifndef __TERRALIB_VP_INTERNAL_BUFFER_QUERY_H
29 #define __TERRALIB_VP_INTERNAL_BUFFER_QUERY_H
30 
31 //Terralib
32 #include "../common/Exception.h"
33 #include "../datatype/Property.h"
34 #include "../geometry/Geometry.h"
35 #include "../memory/DataSet.h"
36 #include "../statistics/core/Enums.h"
37 
38 #include "BufferOp.h"
39 #include "Config.h"
40 #include "Enums.h"
41 #include "Exception.h"
42 
43 
44 // STL
45 #include <map>
46 #include <memory>
47 #include <string>
48 #include <vector>
49 
50 namespace te
51 {
52  namespace vp
53  {
54  /*!
55  \class BufferQuery
56 
57  \brief A concrete class to compute the buffer operation.
58 
59  \ingroup vp
60  */
62  {
63 
64  public:
65 
66  /*! \brief Default constructor.*/
67  BufferQuery();
68 
69  /*! \brief Destructor. */
70  ~BufferQuery();
71 
72  /*!
73  \brief It executes the operation.
74 
75  \return A Boolean value that means if the operation successfully completed or not.
76  */
77  bool run() throw(te::common::Exception);
78 
79  protected:
80 
81  /*!
82  \brief It dissolves the bounders between buffers.
83 
84  \param outDSet The dataSet with buffers.
85  \param levels The number of levels the dataset has.
86 
87  \note The outDSet is updated with dissolved buffers.
88  */
89  std::vector<std::vector<te::gm::Geometry*> > dissolveQuery( te::da::DataSet* dsQuery,
90  const int& levels);
91 
92  /*!
93  \brief It prepare the dataset to be persisted.
94 
95  \param dataSetQuery The dataSet that was returned by query.
96  \param outputDataSet The dataSet prepared to be persisted.
97  */
98  void prepareDataSet(te::da::DataSet* dataSetQuery,
99  te::mem::DataSet* outputDataSet);
100 
101  /*!
102  \brief It prepare the dataset to be persisted with dissolved geometries.
103 
104  \param vecDissolvedGeom A vecter with dissolved geometries by level.
105  \param outputDataSet The dataSet prepared to be persisted.
106  \param distance The buffer distance.
107 
108  \note The outDSet is updated with dissolved buffers.
109  */
110  void prepareDataSet(std::vector<std::vector<te::gm::Geometry*> > vecDissolvedGeom,
111  te::mem::DataSet* outputDataSet,
112  const double &distance);
113 
114  }; // end class
115  } // end namespace vp
116 } // end namespace te
117 
118 #endif // __TERRALIB_VP_INTERNAL_BUFFER_QUERY_H
119 
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
Buffer operation.
An abstract class to compute the buffer memory and buffer query operation.
Definition: BufferOp.h:61
Implementation of a random-access dataset class for the TerraLib In-Memory Data Access driver...
Definition: DataSet.h:65
URI C++ Library.
Enumerations related to Vector Processing module.
A concrete class to compute the buffer operation.
Definition: BufferQuery.h:61
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
Definition: Exception.h:58
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:112
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
Configuration flags for the Terrralib Vector Processing module.