Loading...
Searching...
No Matches
AttributeGroupingDataHandler.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 terralin/vp/AttributeGroupingDataHandler.h
22
23 \brief This class represents handler to help reading and writing data from/to a dataSource using unordered grouping defined by a fixed chuck size
24 */
25
26#ifndef __TERRALIB_VP_INTERNAL_ATTRIBUTEGROUPINGDATAHANDLER_H
27#define __TERRALIB_VP_INTERNAL_ATTRIBUTEGROUPINGDATAHANDLER_H
28
29
30#include "AbstractDataHandler.h"
31#include "Config.h"
32
33#include <memory>
34#include <vector>
35
36namespace te
37{
38 namespace da
39 {
40 class DataAccess;
41 class DataSet;
42 }
43
44 namespace gm
45 {
46 class Envelope;
47 }
48
49 namespace vp
50 {
51 class FeatureSet;
52 class AttributeGroupingDataHandlerImpl;
53
54 /*!
55 \class UorderedGroupingDataHandler
56
57 \brief This class represents handler to help reading and writing data from/to a dataSource using unordered grouping defined by a fixed chuck size
58 */
60 {
61 public:
62 /*! \brief Default constructor. */
64
65 /*! \brief Virtual destructor. */
67
68 //!< Initializes the data handler
69 virtual void initialize(te::vp::AbstractParameters* absParams, te::common::TaskProgress* taskProgress) override;
70
71 //!< Finalizes the data handler
72 virtual void finalize(te::common::TaskProgress* taskProgress) override;
73
74 //!< Returns the number of groups of the data handler
75 virtual std::size_t getGroupCount() const override;
76
77 //!< Returns the inputIndex-th featureSet og the groupIndex-th group considering the given filter
78 virtual te::vp::FeatureSet getFeatureSet(std::size_t groupIndex, std::size_t inputIndex, const te::gm::Envelope& filter) override;
79
80 //!< Adds a featureSet related to groupIndex-th group the to be added to the outputIndex-th output data access
81 virtual void addFeatureSet(std::size_t groupIndex, std::size_t outputIndex, const te::vp::FeatureSet& featureSet) override;
82
83 protected:
84
85 std::unique_ptr<AttributeGroupingDataHandlerImpl> m_impl;
86 };
87
89 {
90 public:
91
93
95
96 protected:
97
99 };
100 }
101}
102
103#endif //__TERRALIB_VP_INTERNAL_ATTRIBUTEGROUPINGDATAHANDLER_H
This class can be used to inform the progress of a task.
Definition: TaskProgress.h:54
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
This abstract class represents handler to help reading and writing data from/to a dataSource by divid...
Abstract class used to define the input/ ouptut parameters for TerraAmazon Operations.
virtual te::vp::AbstractDataHandler * build() override
Concrete factories (derived from this one) must implement this method in order to create objects.
virtual std::size_t getGroupCount() const override
Returns the inputIndex-th featureSet og the groupIndex-th group considering the given filter.
virtual void finalize(te::common::TaskProgress *taskProgress) override
Returns the number of groups of the data handler.
virtual ~AttributeGroupingDataHandler()
Virtual destructor.
virtual te::vp::FeatureSet getFeatureSet(std::size_t groupIndex, std::size_t inputIndex, const te::gm::Envelope &filter) override
Adds a featureSet related to groupIndex-th group the to be added to the outputIndex-th output data ac...
virtual void addFeatureSet(std::size_t groupIndex, std::size_t outputIndex, const te::vp::FeatureSet &featureSet) override
std::unique_ptr< AttributeGroupingDataHandlerImpl > m_impl
AttributeGroupingDataHandler()
Default constructor.
virtual void initialize(te::vp::AbstractParameters *absParams, te::common::TaskProgress *taskProgress) override
Finalizes the data handler.
An alias for a set of Features.
Definition: Feature.h:60
TerraLib.
#define TEVPEXPORT
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).