#include "../common/Translator.h"#include "../common/progress/TaskProgress.h"#include "../dataaccess/dataset/DataSet.h"#include "../dataaccess/dataset/DataSetAdapter.h"#include "../dataaccess/dataset/DataSetType.h"#include "../dataaccess/datasource/DataSourceCapabilities.h"#include "../dataaccess/datasource/DataSourceInfo.h"#include "../dataaccess/datasource/DataSourceManager.h"#include "../dataaccess/datasource/DataSourceFactory.h"#include "../dataaccess/dataset/DataSetTypeConverter.h"#include "../dataaccess/query_h.h"#include "../dataaccess/utils/Utils.h"#include "../datatype/Property.h"#include "../datatype/SimpleProperty.h"#include "../datatype/StringProperty.h"#include "../geometry/Geometry.h"#include "../geometry/GeometryCollection.h"#include "../geometry/GeometryProperty.h"#include "../geometry/Utils.h"#include "../memory/DataSet.h"#include "../memory/DataSetItem.h"#include "../statistics/core/SummaryFunctions.h"#include "../statistics/core/StringStatisticalSummary.h"#include "../statistics/core/NumericStatisticalSummary.h"#include "../statistics/core/Utils.h"#include "Aggregation.h"#include "Config.h"#include "Exception.h"#include "Utils.h"#include <map>#include <math.h>#include <string>#include <vector>#include <boost/lexical_cast.hpp>#include <boost/algorithm/string.hpp>Go to the source code of this file.
Functions | |
| bool | AggregationMemory (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, te::mem::DataSet *outputDataSet, te::gm::GeomType outGeoType) |
| bool | AggregationQuery (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, te::mem::DataSet *outputDataSet, te::gm::GeomType outGeoType) |
| te::da::DataSetType * | BuildOutputDataSetType (const std::string &name, const std::vector< te::dt::Property * > &properties, const std::map< te::dt::Property *, std::vector< te::stat::StatisticalSummary > > &statisticalSummary) |
| std::map< std::string, double > | CalculateDoubleGroupingFunctions (const std::map< te::dt::Property *, std::vector< te::stat::StatisticalSummary > > &statisticalSummary, const std::vector< te::mem::DataSetItem * > &items) |
| std::map< std::string, std::string > | CalculateStringGroupingFunctions (const std::map< te::dt::Property *, std::vector< te::stat::StatisticalSummary > > &statisticalSummary, const std::vector< te::mem::DataSetItem * > &items) |
| std::map< std::string, std::vector < te::mem::DataSetItem * > > | GetGroups (te::da::DataSet *inputDataSet, const std::vector< te::dt::Property * > &groupingProperties) |
| void | SetOutputDatasetQuery (const std::vector< te::dt::Property * > &groupingProperties, te::da::DataSet *dsQuery, te::mem::DataSet *outputDataSet, te::gm::GeomType outGeoType) |
| bool AggregationMemory | ( | 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, | ||
| te::mem::DataSet * | outputDataSet, | ||
| te::gm::GeomType | outGeoType | ||
| ) |
Definition at line 300 of file Aggregation.cpp.
References te::mem::DataSet::add(), CalculateDoubleGroupingFunctions(), CalculateStringGroupingFunctions(), te::da::DataSource::getDataSet(), te::da::DataSource::getDataSetType(), te::da::GetFirstGeomProperty(), te::vp::GetGeometryUnion(), GetGroups(), te::dt::Property::getName(), te::mem::DataSet::getNumProperties(), te::da::GetPropertyPos(), te::common::TaskProgress::isActive(), te::common::TaskProgress::pulse(), te::mem::DataSetItem::setDouble(), te::mem::DataSetItem::setGeometry(), te::mem::DataSetItem::setInt32(), te::mem::DataSetItem::setString(), te::common::TaskProgress::setTotalSteps(), TR_VP, and te::common::TaskProgress::useTimer().
Referenced by te::vp::Aggregation().
| bool AggregationQuery | ( | 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, | ||
| te::mem::DataSet * | outputDataSet, | ||
| te::gm::GeomType | outGeoType | ||
| ) |
Definition at line 171 of file Aggregation.cpp.
References te::da::DataSource::getDataSetType(), te::da::GetFirstGeomProperty(), te::da::PropertyName::getName(), te::dt::Property::getName(), te::da::DataSource::query(), te::da::Select::setGroupBy(), SetOutputDatasetQuery(), and te::dt::STRING_TYPE.
Referenced by te::vp::Aggregation().
| te::da::DataSetType * BuildOutputDataSetType | ( | const std::string & | name, |
| const std::vector< te::dt::Property * > & | properties, | ||
| const std::map< te::dt::Property *, std::vector< te::stat::StatisticalSummary > > & | statisticalSummary | ||
| ) |
Definition at line 439 of file Aggregation.cpp.
References te::da::DataSetType::add(), te::dt::DOUBLE_TYPE, te::stat::GetStatSummaryShortName(), te::dt::INT32_TYPE, te::stat::MODE, and te::dt::STRING_TYPE.
Referenced by te::vp::Aggregation().
| std::map< std::string, double > CalculateDoubleGroupingFunctions | ( | const std::map< te::dt::Property *, std::vector< te::stat::StatisticalSummary > > & | statisticalSummary, |
| const std::vector< te::mem::DataSetItem * > & | items | ||
| ) |
Definition at line 738 of file Aggregation.cpp.
References te::dt::DOUBLE_TYPE, te::dt::FLOAT_TYPE, te::stat::GetNumericStatisticalSummary(), te::da::GetPropertyPos(), te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::INT64_TYPE, te::stat::NumericStatisticalSummary::m_amplitude, te::stat::NumericStatisticalSummary::m_kurtosis, te::stat::NumericStatisticalSummary::m_maxVal, te::stat::NumericStatisticalSummary::m_mean, te::stat::NumericStatisticalSummary::m_median, te::stat::NumericStatisticalSummary::m_minVal, te::stat::NumericStatisticalSummary::m_mode, te::stat::NumericStatisticalSummary::m_skewness, te::stat::NumericStatisticalSummary::m_stdDeviation, te::stat::NumericStatisticalSummary::m_sum, te::stat::NumericStatisticalSummary::m_varCoeff, te::stat::NumericStatisticalSummary::m_variance, and te::dt::STRING_TYPE.
Referenced by AggregationMemory().
| std::map< std::string, std::string > CalculateStringGroupingFunctions | ( | const std::map< te::dt::Property *, std::vector< te::stat::StatisticalSummary > > & | statisticalSummary, |
| const std::vector< te::mem::DataSetItem * > & | items | ||
| ) |
Definition at line 703 of file Aggregation.cpp.
References te::da::GetPropertyPos(), te::stat::GetStringStatisticalSummary(), te::stat::StringStatisticalSummary::m_maxVal, te::stat::StringStatisticalSummary::m_minVal, and te::dt::STRING_TYPE.
Referenced by AggregationMemory().
| std::map< std::string, std::vector< te::mem::DataSetItem * > > GetGroups | ( | te::da::DataSet * | inputDataSet, |
| const std::vector< te::dt::Property * > & | groupingProperties | ||
| ) |
Definition at line 645 of file Aggregation.cpp.
References te::da::DataSet::getAsString(), te::da::DataSet::getNumProperties(), te::mem::DataSetItem::getParent(), te::da::GetPropertyPos(), te::da::DataSet::getValue(), te::da::DataSet::isNull(), te::da::DataSet::moveNext(), and te::mem::DataSetItem::setValue().
Referenced by AggregationMemory().
| void SetOutputDatasetQuery | ( | const std::vector< te::dt::Property * > & | groupingProperties, |
| te::da::DataSet * | dsQuery, | ||
| te::mem::DataSet * | outputDataSet, | ||
| te::gm::GeomType | outGeoType | ||
| ) |
Definition at line 494 of file Aggregation.cpp.
References te::mem::DataSet::add(), te::dt::DOUBLE_TYPE, te::dt::GEOMETRY_TYPE, te::vp::GeomOpResultType(), te::da::DataSet::getAsString(), te::da::DataSet::getDouble(), te::da::DataSet::getGeometry(), te::da::DataSet::getNumeric(), te::da::DataSet::getNumProperties(), te::mem::DataSetItem::getParent(), te::mem::DataSetItem::getPropertyDataType(), te::da::DataSet::getPropertyDataType(), te::da::DataSet::getPropertyName(), te::da::GetPropertyPos(), te::dt::INT32_TYPE, te::dt::INT64_TYPE, te::da::DataSet::moveBeforeFirst(), te::mem::DataSet::moveBeforeFirst(), te::da::DataSet::moveNext(), te::dt::NUMERIC_TYPE, te::mem::DataSetItem::setDouble(), te::mem::DataSetItem::setGeometry(), te::gm::GeometryCollection::setGeometryN(), te::mem::DataSetItem::setInt32(), te::mem::DataSetItem::setString(), and te::dt::STRING_TYPE.
Referenced by AggregationQuery().