All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Buffer.h
Go to the documentation of this file.
1 /* Copyright (C) 2001-2009 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 Aggregation.h
22 
23  \brief Aggregation Vector Processing functions.
24 
25  \ingroup vp
26 */
27 
28 #ifndef __TERRALIB_VP_CORE_INTERNAL_AGGREGATION_H
29 #define __TERRALIB_VP_CORE_INTERNAL_AGGREGATION_H
30 
31 //Terralib
32 #include "../dataaccess/datasource/DataSourceInfo.h"
33 #include "../datatype/Property.h"
34 #include "../geometry/Geometry.h"
35 #include "../maptools/AbstractLayer.h"
36 #include "../memory/DataSet.h"
37 #include "../memory/DataSetItem.h"
38 #include "Config.h"
39 #include "Enums.h"
40 #include "Exception.h"
41 
42 // STL
43 #include <map>
44 #include <vector>
45 
46 namespace te
47 {
48  namespace vp
49  {
50  /*!
51  \brief Executes the Buffer Geographical Operation and persists the result as a dataset in a given output datasource.
52 
53  \param inDatasetName The name of the dataset to be used in aggregation operation. It must exists in the input datasource.
54  \param inDatasource Pointer to the datasource that contains the input dataset. Do not pass null.
55  \param bufferPolygonRule The buffer rule for all geometries (enum RuleForBuffer)
56  \param bufferBoundariesRule The buffer boundaries rule for all geometries (enum BoundariesBetweenBuffers)
57  \param copyInputColumns If boudaries between geometries was not dissolved, the user has the option to Copy de columns from the InputLayer.
58  \param levels The number of levels.
59  \param outDatasetName The name for the resulting datasource. It should not exists in the output datasource.
60  \param outDatasource Pointer to the datasource to persist the resulting dataset. Do not pass null.
61  \param fixedDistance The buffer distance for each geometry with the fixed value.
62  \param fromAttDistance The buffer distance for each geometry is related with a value from one property.
63 
64  \return True if the it succeeds and false otherwise.
65 
66  This algorithm assums that the input dataset exists in the datasource.
67  It generates a new dataset in the ouput datasource, do it can not exists a dataset with the same name prior to the calling of this algorithm.
68  */
69  TEVPEXPORT bool Buffer(const std::string& inDataset,
70  te::da::DataSource* inDatasource,
71  const int& bufferPolygonRule,
72  const int& bufferBoundariesRule,
73  const bool& copyInputColumns,
74  const int& levels,
75  const std::string& outDataset,
76  te::da::DataSource* outDatasource,
77  const double& fixedDistance = 0,
78  const std::string& fromAttDistance = "");
79 
80  } // end namespace vp
81 } // end namespace te
82 
83 #endif // __TERRALIB_VP_CORE_INTERNAL_AGGREGATION_H
84 
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:99
An exception class for the Vector processing module.
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
Definition: DataSource.h:116
Enumerations related to Vector Processing module.
TEVPEXPORT bool Buffer(const std::string &inDataset, te::da::DataSource *inDatasource, const int &bufferPolygonRule, const int &bufferBoundariesRule, const bool &copyInputColumns, const int &levels, const std::string &outDataset, te::da::DataSource *outDatasource, const double &fixedDistance=0, const std::string &fromAttDistance="")
Executes the Buffer Geographical Operation and persists the result as a dataset in a given output dat...
Definition: Buffer.cpp:134