Loading...
Searching...
No Matches
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"
35#include "../memory/DataSet.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
50namespace 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.*/
68
69 /*! \brief Destructor. */
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() ;
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 const int& sourceSRID);
101
102 /*!
103 \brief It prepare the dataset to be persisted with dissolved geometries.
104
105 \param vecDissolvedGeom A vecter with dissolved geometries by level.
106 \param outputDataSet The dataSet prepared to be persisted.
107 \param distance The buffer distance.
108
109 \note The outDSet is updated with dissolved buffers.
110 */
111 void prepareDataSet(std::vector<std::vector<te::gm::Geometry*> > vecDissolvedGeom,
112 te::mem::DataSet* outputDataSet,
113 const int& sourceSRID,
114 const double &distance);
115
116 }; // end class
117 } // end namespace vp
118} // end namespace te
119
120#endif // __TERRALIB_VP_INTERNAL_BUFFER_QUERY_H
121
Buffer operation.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
It models a property definition.
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition DataSet.h:114
Implementation of a random-access dataset class for the TerraLib In-Memory Data Access driver.
Definition DataSet.h:66
BufferOp()
Default constructor that can be called by subclasses.
~BufferQuery()
Destructor.
std::vector< std::vector< te::gm::Geometry * > > dissolveQuery(te::da::DataSet *dsQuery, const int &levels)
It dissolves the bounders between buffers.
void prepareDataSet(te::da::DataSet *dataSetQuery, te::mem::DataSet *outputDataSet, const int &sourceSRID)
It prepare the dataset to be persisted.
bool run()
It executes the operation.
BufferQuery()
Default constructor.
void prepareDataSet(std::vector< std::vector< te::gm::Geometry * > > vecDissolvedGeom, te::mem::DataSet *outputDataSet, const int &sourceSRID, const double &distance)
It prepare the dataset to be persisted with dissolved geometries.
This class is designed to declare objects to be thrown as exceptions by TerraLib.
Implementation of a random-access dataset class for the TerraLib In-Memory Data Access driver.
Namespace for Vector Processing module of TerraLib.
Definition vp.h:118
TerraLib.
Enumerations related to Vector Processing module.
Configuration flags for the Terrralib Vector Processing module.
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition Config.h:61
Enumerations related to Vector Processing module.
An exception class for the Vector processing module.