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 #include "../Config.h"
26 #include "../../../dataaccess/datasource/DataSource.h"
27 #include "../../../maptools/AbstractLayer.h"
28 
29 //Qt
30 #include <QWizard>
31 
32 //STL
33 #include <memory>
34 
35 namespace te
36 {
37  //forward declarations
38  namespace da { class DataSetType; }
39  namespace mem { class DataSet; }
40  namespace rst { class BandProperty; }
41 
42  namespace qt
43  {
44  namespace widgets
45  {
46  //Forward declarations
47  class RasterizationWizardPage;
48  class LayerSearchWizardPage;
49 
50  class TEQTWIDGETSEXPORT RasterizationWizard : public QWizard
51  {
52  public:
53 
54  RasterizationWizard(QWidget* parent=0);
55 
57 
58  bool validateCurrentPage();
59 
60  void setList(std::list<te::map::AbstractLayerPtr>& layerList);
61 
62  te::map::AbstractLayerPtr getOutputLayer();
63 
64  protected:
65 
66  void addPages();
67 
68  bool execute();
69 
70  /*! Function used to create the output dataset type */
71  std::auto_ptr<te::da::DataSetType> createDataSetType(std::string dataSetName, int srid);
72 
73  /*! Function used to create the output data */
74  std::auto_ptr<te::mem::DataSet> createDataSet(te::da::DataSetType* dsType, std::vector<te::gm::Geometry*>& geoms);
75 
76  /*! Function used to save the output dataset */
77  void saveDataSet(te::mem::DataSet* dataSet, te::da::DataSetType* dsType, te::da::DataSourcePtr ds, std::string dataSetName);
78 
79  void setDummy(te::rst::Raster* rst, const double dummyValue);
80 
81  te::rst::BandProperty* createBandProperty(const std::size_t size);
82 
83  private:
84 
85  std::auto_ptr<te::qt::widgets::RasterizationWizardPage> m_vectorPage;
86  std::auto_ptr<te::qt::widgets::LayerSearchWizardPage> m_layerSearchPage;
87 
89 
91  };
92 
93  } // namespace widgets
94  } // namespace qt
95 } // namespace te
96 
97 #endif // TE_QT_WIDGETS_RASTERIZATIONWIZARD_H
te::map::AbstractLayerPtr m_outputLayer
std::auto_ptr< te::qt::widgets::LayerSearchWizardPage > m_layerSearchPage
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1435
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
URI C++ Library.
std::auto_ptr< te::qt::widgets::RasterizationWizardPage > m_vectorPage
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
te::map::AbstractLayerPtr m_inputLayer