SAGA API  v9.6
grid_pyramid.h
Go to the documentation of this file.
1 
3 // //
4 // SAGA //
5 // //
6 // System for Automated Geoscientific Analyses //
7 // //
8 // Application Programming Interface //
9 // //
10 // Library: SAGA_API //
11 // //
12 //-------------------------------------------------------//
13 // //
14 // grid_pyramids.h //
15 // //
16 // Copyright (C) 2009 by Olaf Conrad //
17 // //
18 //-------------------------------------------------------//
19 // //
20 // This file is part of 'SAGA - System for Automated //
21 // Geoscientific Analyses'. //
22 // //
23 // This library is free software; you can redistribute //
24 // it and/or modify it under the terms of the GNU Lesser //
25 // General Public License as published by the Free //
26 // Software Foundation, either version 2.1 of the //
27 // License, or (at your option) any later version. //
28 // //
29 // This library is distributed in the hope that it will //
30 // be useful, but WITHOUT ANY WARRANTY; without even the //
31 // implied warranty of MERCHANTABILITY or FITNESS FOR A //
32 // PARTICULAR PURPOSE. See the GNU Lesser General Public //
33 // License for more details. //
34 // //
35 // You should have received a copy of the GNU Lesser //
36 // General Public License along with this program; if //
37 // not, see <http://www.gnu.org/licenses/>. //
38 // //
39 //-------------------------------------------------------//
40 // //
41 // contact: Olaf Conrad //
42 // Institute of Geography //
43 // University of Hamburg //
44 // Bundesstr. 55 //
45 // 20146 Hamburg //
46 // Germany //
47 // //
48 // e-mail: oconrad@saga-gis.org //
49 // //
51 
52 //---------------------------------------------------------
53 #ifndef HEADER_INCLUDED__SAGA_API__grid_pyramid_H
54 #define HEADER_INCLUDED__SAGA_API__grid_pyramid_H
55 
56 
58 // //
59 // //
60 // //
62 
63 //---------------------------------------------------------
72 // //
74 // //
75 // //
77 
78 //---------------------------------------------------------
79 #include "grid.h"
80 
81 
83 // //
84 // //
85 // //
87 
88 //---------------------------------------------------------
89 typedef enum
90 {
95 }
97 
98 //---------------------------------------------------------
99 typedef enum
100 {
103 }
105 
106 
108 // //
109 // //
110 // //
112 
113 //---------------------------------------------------------
115 {
116 public:
117  CSG_Grid_Pyramid(void);
118 
120  bool Create (class CSG_Grid *pGrid, double Grow = 2.0, TSG_Grid_Pyramid_Generalisation Generalisation = GRID_PYRAMID_Mean, TSG_Grid_Pyramid_Grow_Type Grow_Type = GRID_PYRAMID_Geometric);
121 
122  CSG_Grid_Pyramid (class CSG_Grid *pGrid, double Grow, double Start, int nMaxLevels, TSG_Grid_Pyramid_Generalisation Generalisation = GRID_PYRAMID_Mean, TSG_Grid_Pyramid_Grow_Type Grow_Type = GRID_PYRAMID_Geometric);
123  bool Create (class CSG_Grid *pGrid, double Grow, double Start, int nMaxLevels, TSG_Grid_Pyramid_Generalisation Generalisation = GRID_PYRAMID_Mean, TSG_Grid_Pyramid_Grow_Type Grow_Type = GRID_PYRAMID_Geometric);
124 
125  virtual ~CSG_Grid_Pyramid(void);
126 
127  bool Destroy (void);
128 
129 
130  int Get_Count (void) { return( m_nLevels ); }
131  class CSG_Grid * Get_Grid (int iLevel) { return( iLevel >= 0 && iLevel < m_nLevels ? m_pLevels[iLevel] : m_pGrid ); }
132 
133 
134 private:
135 
136  int m_nLevels, m_nMaxLevels;
137 
138  double m_Grow;
139 
140  TSG_Grid_Pyramid_Generalisation m_Generalisation;
141 
142  TSG_Grid_Pyramid_Grow_Type m_Grow_Type;
143 
144  class CSG_Grid **m_pLevels, *m_pGrid;
145 
146 
147  bool _Get_Next_Level (class CSG_Grid *pGrid);
148  bool _Get_Next_Level (class CSG_Grid *pGrid, double Cellsize);
149 
150 };
151 
152 
154 // //
155 // //
156 // //
158 
159 //---------------------------------------------------------
160 #endif // #ifndef HEADER_INCLUDED__SAGA_API__grid_pyramid_H
GRID_PYRAMID_Min
@ GRID_PYRAMID_Min
Definition: grid_pyramid.h:93
CSG_Grid_Pyramid::Get_Grid
class CSG_Grid * Get_Grid(int iLevel)
Definition: grid_pyramid.h:131
CSG_Grid_Pyramid::Get_Count
int Get_Count(void)
Definition: grid_pyramid.h:130
GRID_PYRAMID_Geometric
@ GRID_PYRAMID_Geometric
Definition: grid_pyramid.h:102
TSG_Grid_Pyramid_Generalisation
TSG_Grid_Pyramid_Generalisation
Definition: grid_pyramid.h:90
grid.h
GRID_PYRAMID_Mean
@ GRID_PYRAMID_Mean
Definition: grid_pyramid.h:91
CSG_Grid_Pyramid
Definition: grid_pyramid.h:115
TSG_Grid_Pyramid_Grow_Type
TSG_Grid_Pyramid_Grow_Type
Definition: grid_pyramid.h:100
SAGA_API_DLL_EXPORT
#define SAGA_API_DLL_EXPORT
Definition: api_core.h:94
CSG_Grid
Definition: grid.h:475
GRID_PYRAMID_MaxCount
@ GRID_PYRAMID_MaxCount
Definition: grid_pyramid.h:94
GRID_PYRAMID_Arithmetic
@ GRID_PYRAMID_Arithmetic
Definition: grid_pyramid.h:101
GRID_PYRAMID_Max
@ GRID_PYRAMID_Max
Definition: grid_pyramid.h:92