All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Aggregation.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 "../datatype/Property.h"
33 #include "../geometry/Geometry.h"
34 #include "../memory/DataSet.h"
35 #include "../statistics/core/Enums.h"
36 #include "Config.h"
37 #include "Enums.h"
38 #include "Exception.h"
39 
40 // STL
41 #include <map>
42 #include <vector>
43 
44 namespace te
45 {
46  namespace da { class DataSource; }
47 
48  namespace vp
49  {
50  /*!
51  \brief Executes the Aggregation Geographical Operation and persists the result as a dataset in a given output datasource.
52 
53  \param inDataset 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 groupingProperties Selected properties based on selected layer.
56  \param statisticalSummary Map of selected functions based on input dataset properties.
57  \param outDataset The name for the resulting datasource. It should not exists in the output datasource.
58  \param outDatasource Pointer to the datasource to persist the resulting dataset. Do not pass null.
59 
60  \return True if the it succeeds and false otherwise.
61 
62  This algorithm assums that the input dataset exists in the datasource.
63  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.
64  */
65  TEVPEXPORT bool Aggregation(const std::string& inDataset,
66  te::da::DataSource* inDatasource,
67  const std::vector<te::dt::Property*>& groupingProperties,
68  const std::map<te::dt::Property*, std::vector<te::stat::StatisticalSummary> >& statisticalSummary,
69  const std::string& outDataset,
70  te::da::DataSource* outDatasource);
71  } // end namespace vp
72 } // end namespace te
73 
74 #endif // __TERRALIB_VP_CORE_INTERNAL_AGGREGATION_H
75 
Enumerations related to Vector Processing module.
TEVPEXPORT bool Aggregation(const std::string &inDataset, te::da::DataSource *inDatasource, const std::vector< te::dt::Property * > &groupingProperties, const std::map< te::dt::Property *, std::vector< te::stat::StatisticalSummary > > &statisticalSummary, const std::string &outDataset, te::da::DataSource *outDatasource)
Executes the Aggregation Geographical Operation and persists the result as a dataset in a given outpu...
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
It models a property definition.
Definition: Property.h:59