Utils.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 terralib/tools/rastermanager/core/Utils.h
22 
23  \brief Terralib Raster Manager Tool Utils
24 */
25 
26 #ifndef __TERRALIB_TOOLS_RASTERMANAGER_UTILS_H
27 #define __TERRALIB_TOOLS_RASTERMANAGER_UTILS_H
28 
29 // STL
30 #include <string>
31 
32 namespace te
33 {
34  // Forward declarations
35  namespace rst
36  {
37  class Raster;
38  }
39 
40  namespace tools
41  {
42  namespace rastermanager
43  {
44  /*!
45  \class Utils
46 
47  \brief Class with help methods for the application
48  */
49  class Utils
50  {
51  public:
52 
53  /*!
54  \brief Check input raster path
55 
56  \param inputPath String with the input raster path to check
57  \param errorMessage String that receive methods errors description
58 
59  \return True if successfully
60  */
61  static bool checkInputPath(std::string inputPath, std::string & errorMessage);
62 
63  /*!
64  \brief Check output raster path
65 
66  \param outputPath String with the output raster path to check
67  \param errorMessage String that receive methods errors description
68 
69  \return True if successfully
70  */
71  static bool checkOutputPath(std::string outputPath, std::string & errorMessage);
72 
73  /*!
74  \brief Get a raster based in the path
75 
76  \param path String with the input raster path
77  \param raster Raster pointer reference that gives the raster for the caller
78  \param errorMessage String that receive methods errors description
79 
80  \return True if successfully
81  */
82  static bool getRaster(std::string path, te::rst::Raster* & raster, std::string & errorMessage);
83 
84  /*!
85  \brief Load Terralib modules
86 
87  \param errorMessage String that receive methods errors description
88 
89  \return True if successfully
90  */
91  static bool loadModules(std::string & errorMessage);
92  };
93  }
94  }
95 }
96 
97 
98 
99 #endif // __TERRALIB_TOOLS_RASTERMANAGER_UTILS_H
Class with help methods for the application.
Definition: Utils.h:49
static bool checkOutputPath(std::string outputPath, std::string &errorMessage)
Check output raster path.
static bool checkInputPath(std::string inputPath, std::string &errorMessage)
Check input raster path.
An abstract class for raster data strucutures.
Definition: Raster.h:71
static bool getRaster(std::string path, te::rst::Raster *&raster, std::string &errorMessage)
Get a raster based in the path.
URI C++ Library.
static bool loadModules(std::string &errorMessage)
Load Terralib modules.