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