Loading...
Searching...
No Matches
Utils.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/statistics/core/Utils.h
22
23 \brief Utility functions for Statistics.
24*/
25
26#ifndef __TERRALIB_STATISTICAL_CORE_INTERNAL_UTILS_H
27#define __TERRALIB_STATISTICAL_CORE_INTERNAL_UTILS_H
28
29// Terralib
30#include "../../maptools/DataSetLayer.h"
31#include "Config.h"
32#include "Enums.h"
33
34// STL
35#include <list>
36#include <string>
37#include <vector>
38
39namespace te
40{
41 namespace stat
42 {
43 /*!
44 \brief Get the statistical parameter short name from its enumerator.
45
46 \param e The enumerator.
47
48 \return The short name for the statistical parameter.
49 */
50 TESTATEXPORT std::string GetStatSummaryShortName(const int& e);
51
52 /*!
53 \brief Get the statistical parameter full name ffrom its enumerator.
54
55 \param e The enumerator.
56
57 \return The statistical parameter full name of enum.
58 */
59 TESTATEXPORT std::string GetStatSummaryFullName(const int& e);
60
61 /*!
62 \brief Returns the values of a string type property in a vector of values.
63
64 It returns only the non-empty values.
65
66 \param dataSet A pointer to the dataset. Do not pass null.
67 \param propName The propoerty name. Do not pass empty.
68
69 \return The vector of string values.
70 */
71 TESTATEXPORT std::vector<std::string> GetStringData(te::da::DataSet* dataSet, const std::string propName);
72
73 /*!
74 \brief Returns the values of a numeric type property in a vector of values.
75
76 It returns only the non-empty values.
77
78 \param dataSet A pointer to the dataset. Do not pass null.
79 \param propName The propoerty name. Do not pass empty.
80
81 \return The vector of numeric values (double).
82 */
83 TESTATEXPORT std::vector<double> GetNumericData(te::da::DataSet* dataSet, const std::string propName);
84
85 } // end namespace vp
86} // end namespace te
87
88#endif // __TERRALIB_STATISTICAL_CORE_INTERNAL_UTILS_H
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:114
TESTATEXPORT std::vector< double > GetNumericData(te::da::DataSet *dataSet, const std::string propName)
Returns the values of a numeric type property in a vector of values.
TESTATEXPORT std::string GetStatSummaryShortName(const int &e)
Get the statistical parameter short name from its enumerator.
TESTATEXPORT std::string GetStatSummaryFullName(const int &e)
Get the statistical parameter full name ffrom its enumerator.
TESTATEXPORT std::vector< std::string > GetStringData(te::da::DataSet *dataSet, const std::string propName)
Returns the values of a string type property in a vector of values.
TerraLib.
#define TESTATEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
Proxy configuration file for TerraView (see terraview_config.h).
Enumerations of XML module.