IGridFeature.hpp
1 #ifndef OPALS_IGRIDFEATURE_HPP_INCLUDED
2 #define OPALS_IGRIDFEATURE_HPP_INCLUDED
3 
4 #include <opals/IModuleBase.hpp>
5 #include <opals/GridFeature.hpp>
6 #include <opals/GridLimit.hpp>
7 
8 #if !defined(OPALS_EXPORTS) && !defined(OPALS_MODULE_EXPORTS)
9  #if defined _DEBUG && !defined OPALS_NO_DEBUG
10  #pragma comment(lib, "opalsGridFeature_d.lib")
11  #else
12  #pragma comment(lib, "opalsGridFeature.lib")
13  #endif
14 #endif
15 
16 #include <opals/Path.hpp>
17 #include <opals/Vector.hpp>
18 #include <opals/String.hpp>
19 #include <opals/KernelShape.hpp>
20 
21 namespace opals {
22 
23  namespace opts
24  {
25  namespace GridFeature
26  {
27  /// Options of \ref ModuleGridFeature
28  typedef IGroup< Names::_, false, Cons<
29  ILeaf< Names::inFile, false, opals::Path >, Cons<
30  ILeaf< Names::outFile, false, opals::Vector<opals::Path> >, Cons<
31  ILeaf< Names::oFormat, false, opals::String >, Cons<
32  ILeaf< Names::feature, false, opals::Vector<opals::GridFeature::Type> >, Cons<
33  ILeaf< Names::kernelShape, false, opals::KernelShape::Type >, Cons<
34  ILeaf< Names::kernelSize, false, int >, Cons<
35  ILeaf< Names::limit, false, opals::GridLimit >, Cons<
36  ILeaf< Names::noData, false, float >
37  > > > > > > > > > Options;
38  }
39  }
40 
41  /// Derives feature models (slope, curvature, roughness, etc.) from grid models based on the local grid neighbourhood defined by a kernel.
42  /** The module opalsGridFeature reads a raster image in GDAL suppurted format and produces
43  one or more output rasters containing specified grid features like slope, expositionm, differenct
44  curvature measures, etc. For each output raster pixel the respective grid feature is calculated
45  based on a kernel neighbourhood. */
46  /// \see \ref ModuleGridFeature
47  class OPALS_API IGridFeature : virtual public IModuleBase
48  {
49 
50  public:
51  static IGridFeature* New();
52  static IGridFeature* New( IControlObject &controlObject );
53  static IGridFeature* New( const IModuleBase &parent );
54  static IGridFeature* New( const IModuleBase &parent, IControlObject &controlObject );
55 
56  virtual ~IGridFeature() {}
57 
58  /// \name Access to module-specific options.
59  ///@{
61  virtual Options& opts() = 0;
62  virtual const Options& opts() const = 0;
63  ///}@
64 
65  };
66 
67 };
68 
69 #endif