Loading...
Searching...
No Matches
RasterizationWizard.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#ifndef TE_QT_WIDGETS_RASTERIZATIONWIZARD_H
22#define TE_QT_WIDGETS_RASTERIZATIONWIZARD_H
23
24//TerraLib
25#ifndef Q_MOC_RUN
26#include "../../../dataaccess/datasource/DataSource.h"
27#include "../../../maptools/AbstractLayer.h"
28#endif
29#include "../Config.h"
30
31//Qt
32#include <QWizard>
33
34//STL
35#include <memory>
36#include <vector>
37
38namespace te
39{
40 //forward declarations
41 namespace da { class DataSetType; }
42 namespace gm { class Geometry; }
43 namespace mem { class DataSet; }
44 namespace rst { class BandProperty; }
45
46 namespace qt
47 {
48 namespace widgets
49 {
50 //Forward declarations
51 class RasterizationWizardPage;
52 class LayerSearchWizardPage;
53
55 {
56 Q_OBJECT
57
58 public:
59
60 RasterizationWizard(QWidget* parent=0);
61
63
65
66 void setList(std::list<te::map::AbstractLayerPtr>& layerList);
67
69
70 protected:
71
72 void addPages();
73
74 bool execute();
75
76 /*! Function used to create the output dataset type */
77 std::unique_ptr<te::da::DataSetType> createDataSetType(std::string dataSetName, int srid);
78
79 /*! Function used to create the output data */
80 std::unique_ptr<te::mem::DataSet> createDataSet(te::da::DataSetType* dsType, const std::vector<te::gm::Geometry*>& geoms);
81
82 /*! Function used to save the output dataset */
83 void saveDataSet(te::mem::DataSet* dataSet, te::da::DataSetType* dsType, te::da::DataSourcePtr ds, std::string dataSetName);
84
85 void setDummy(te::rst::Raster* rst, const double dummyValue);
86
87 te::rst::BandProperty* createBandProperty(const std::size_t size);
88
89 protected slots:
90
91 void onPageChanged(int index);
92
93 private:
94
95 std::unique_ptr<te::qt::widgets::RasterizationWizardPage> m_vectorPage;
96 std::unique_ptr<te::qt::widgets::LayerSearchWizardPage> m_layerSearchPage;
97
99
101 };
102
103 } // namespace widgets
104 } // namespace qt
105} // namespace te
106
107#endif // TE_QT_WIDGETS_RASTERIZATIONWIZARD_H
A class that models the description of a dataset.
Definition: DataSetType.h:73
Implementation of a random-access dataset class for the TerraLib In-Memory Data Access driver.
Definition: DataSet.h:66
te::map::AbstractLayerPtr m_outputLayer
RasterizationWizard(QWidget *parent=0)
void setDummy(te::rst::Raster *rst, const double dummyValue)
void setList(std::list< te::map::AbstractLayerPtr > &layerList)
void saveDataSet(te::mem::DataSet *dataSet, te::da::DataSetType *dsType, te::da::DataSourcePtr ds, std::string dataSetName)
te::map::AbstractLayerPtr getOutputLayer()
std::unique_ptr< te::qt::widgets::LayerSearchWizardPage > m_layerSearchPage
std::unique_ptr< te::da::DataSetType > createDataSetType(std::string dataSetName, int srid)
te::map::AbstractLayerPtr m_inputLayer
std::unique_ptr< te::mem::DataSet > createDataSet(te::da::DataSetType *dsType, const std::vector< te::gm::Geometry * > &geoms)
std::unique_ptr< te::qt::widgets::RasterizationWizardPage > m_vectorPage
te::rst::BandProperty * createBandProperty(const std::size_t size)
A raster band description.
Definition: BandProperty.h:62
An abstract class for raster data strucutures.
Definition: Raster.h:72
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
TerraLib.
#define slots
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63