SAGA API v9.10
Loading...
Searching...
No Matches
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//---------------------------------------------------------
70
71
73// //
74// //
75// //
77
78//---------------------------------------------------------
79#include "grid.h"
80
81
83// //
84// //
85// //
87
88//---------------------------------------------------------
97
98//---------------------------------------------------------
105
106
108// //
109// //
110// //
112
113//---------------------------------------------------------
115{
116public:
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
134private:
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
#define SAGA_API_DLL_EXPORT
Definition api_core.h:94
int Get_Count(void)
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)
class CSG_Grid * Get_Grid(int iLevel)
TSG_Grid_Pyramid_Generalisation
@ GRID_PYRAMID_Min
@ GRID_PYRAMID_MaxCount
@ GRID_PYRAMID_Max
@ GRID_PYRAMID_Mean
TSG_Grid_Pyramid_Grow_Type
@ GRID_PYRAMID_Geometric
@ GRID_PYRAMID_Arithmetic