SAGA API
Version 9.14
Loading...
Searching...
No Matches
map_classify.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
// map_classify.h //
15
// //
16
// Copyright (C) 2025 by //
17
// Olaf Conrad //
18
// //
19
//-------------------------------------------------------//
20
// //
21
// This file is part of 'SAGA - System for Automated //
22
// Geoscientific Analyses'. SAGA is free software; you //
23
// can redistribute it and/or modify it under the terms //
24
// of the GNU General Public License as published by the //
25
// Free Software Foundation, either version 2 of the //
26
// License, or (at your option) any later version. //
27
// //
28
// SAGA is distributed in the hope that it will be //
29
// useful, but WITHOUT ANY WARRANTY; without even the //
30
// implied warranty of MERCHANTABILITY or FITNESS FOR A //
31
// PARTICULAR PURPOSE. See the GNU General Public //
32
// License for more details. //
33
// //
34
// You should have received a copy of the GNU General //
35
// Public License along with this program; if not, see //
36
// <http://www.gnu.org/licenses/>. //
37
// //
38
//-------------------------------------------------------//
39
// //
40
// contact: Olaf Conrad //
41
// Institute of Geography //
42
// University of Hamburg //
43
// Germany //
44
// //
45
// e-mail: oconrad@saga-gis.org //
46
// //
48
49
//---------------------------------------------------------
50
#ifndef _HEADER_INCLUDED__SAGA_GDI__Map_Classify_H
51
#define _HEADER_INCLUDED__SAGA_GDI__Map_Classify_H
52
53
55
// //
56
// //
57
// //
59
60
//---------------------------------------------------------
61
#include "
../table.h
"
62
63
65
// //
66
// //
67
// //
69
70
//---------------------------------------------------------
71
class
SAGA_API_DLL_EXPORT
CSG_Map_Classify
72
{
73
public
:
74
75
enum class
Classifier
76
{
77
Unique
= 0,
Equal
,
Defined
,
Quantile
,
Geometric
,
Natural
,
StdDev
,
NotSet
78
};
79
80
enum class
LUT_Fields
81
{
82
Color
= 0,
Name
,
Description
,
Minimum
,
Maximum
83
};
84
85
//-----------------------------------------------------
86
CSG_Map_Classify
(
void
);
87
virtual
~CSG_Map_Classify
(
void
);
88
89
CSG_Map_Classify
(
CSG_Data_Object
*pObject);
90
bool
Create (
CSG_Data_Object
*pObject);
91
92
CSG_Map_Classify
(
CSG_Table
*pTable,
int
Field,
int
Normalize = -1,
bool
bPercent =
false
);
93
bool
Create (
CSG_Table
*pTable,
int
Field,
int
Normalize = -1,
bool
bPercent =
false
);
94
95
bool
Destroy (
void
);
96
97
//-----------------------------------------------------
98
const
CSG_String
& Get_Name (Classifier Classifier)
const
;
99
100
bool
is_Okay
(
void
)
const
{
return
( m_pObject && m_nValues > 0 ); }
101
bool
is_Classified
(
void
)
const
{
return
( m_Classifier !=
Classifier::NotSet
); }
102
Classifier
Get_Classifier
(
void
)
const
{
return
( m_Classifier ); }
103
104
bool
Set_LUT (
CSG_Table
&LUT,
CSG_Colors
Colors,
int
Labeling,
int
NumPrecision = -2)
const
;
105
106
bool
Classify_Unique (
int
maxCount = 1024);
107
bool
Classify_Equal (
int
Count,
double
Minimum
,
double
Maximum
);
108
bool
Classify_Equal (
int
Count);
109
bool
Classify_Defined (
double
Interval,
double
Offset);
110
bool
Classify_Defined (
double
Interval);
111
bool
Classify_Quantile (
int
Count,
bool
bHistogram =
true
);
112
bool
Classify_Geometric (
int
Count,
bool
bIncreasing =
true
);
113
bool
Classify_Natural (
int
Count);
114
bool
Classify_StdDev (
double
StdDev,
double
StdDev_Max = 4.);
115
116
bool
m_Show_Progress
=
false
;
117
118
119
private
:
120
121
bool
m_bPercent =
false
;
122
123
int
m_Field = -1;
124
125
sLong
m_nValues = 0;
126
127
CSG_Data_Object
*m_pObject = NULL;
128
129
CSG_Table
m_Normalized, m_Classes;
130
131
Classifier
m_Classifier =
Classifier::NotSet
;
132
133
134
bool
_is_Numeric (
void
)
const
;
135
bool
_Create_Classes (
void
);
136
137
bool
_Set_Progress (
sLong
i)
const
;
138
139
bool
_Get_Value (
sLong
i,
double
&Value,
bool
bIndexed =
false
)
const
;
140
bool
_Get_Value (
sLong
i,
CSG_String
&Value,
bool
bIndexed =
false
)
const
;
141
142
bool
_Get_Statistics (
CSG_Simple_Statistics
&Statistics)
const
;
143
bool
_Get_Histogram (
CSG_Histogram
&Histogram )
const
;
144
bool
_Set_Index (
void
);
145
146
};
147
148
150
// //
151
// //
152
// //
154
155
//---------------------------------------------------------
156
#endif
// #ifndef _HEADER_INCLUDED__SAGA_GDI__Map_Classify_H
sLong
signed long long sLong
Definition
api_core.h:158
SAGA_API_DLL_EXPORT
#define SAGA_API_DLL_EXPORT
Definition
api_core.h:94
CSG_Colors
Definition
api_core.h:1460
CSG_Data_Object
Definition
dataobject.h:180
CSG_Histogram
Definition
mat_tools.h:1013
CSG_Map_Classify
Definition
map_classify.h:72
CSG_Map_Classify::Classifier
Classifier
Definition
map_classify.h:76
CSG_Map_Classify::Classifier::Natural
@ Natural
Definition
map_classify.h:77
CSG_Map_Classify::Classifier::StdDev
@ StdDev
Definition
map_classify.h:77
CSG_Map_Classify::Classifier::Quantile
@ Quantile
Definition
map_classify.h:77
CSG_Map_Classify::Classifier::Geometric
@ Geometric
Definition
map_classify.h:77
CSG_Map_Classify::Classifier::Defined
@ Defined
Definition
map_classify.h:77
CSG_Map_Classify::Classifier::Unique
@ Unique
Definition
map_classify.h:77
CSG_Map_Classify::Classifier::Equal
@ Equal
Definition
map_classify.h:77
CSG_Map_Classify::Classifier::NotSet
@ NotSet
Definition
map_classify.h:77
CSG_Map_Classify::m_Show_Progress
bool m_Show_Progress
Definition
map_classify.h:116
CSG_Map_Classify::is_Okay
bool is_Okay(void) const
Definition
map_classify.h:100
CSG_Map_Classify::is_Classified
bool is_Classified(void) const
Definition
map_classify.h:101
CSG_Map_Classify::LUT_Fields
LUT_Fields
Definition
map_classify.h:81
CSG_Map_Classify::LUT_Fields::Name
@ Name
Definition
map_classify.h:82
CSG_Map_Classify::LUT_Fields::Maximum
@ Maximum
Definition
map_classify.h:82
CSG_Map_Classify::LUT_Fields::Minimum
@ Minimum
Definition
map_classify.h:82
CSG_Map_Classify::LUT_Fields::Description
@ Description
Definition
map_classify.h:82
CSG_Map_Classify::LUT_Fields::Color
@ Color
Definition
map_classify.h:82
CSG_Map_Classify::CSG_Map_Classify
CSG_Map_Classify(void)
Definition
map_classify.cpp:62
CSG_Map_Classify::Get_Classifier
Classifier Get_Classifier(void) const
Definition
map_classify.h:102
CSG_Simple_Statistics
Definition
mat_tools.h:725
CSG_String
Definition
api_core.h:563
CSG_Table
Definition
table.h:295
CSG_Grid_Resampling::Maximum
@ Maximum
Definition
grid.h:166
CSG_Grid_Resampling::Minimum
@ Minimum
Definition
grid.h:165
table.h
saga_core
saga_api
map
map_classify.h
Generated on
for SAGA API by
1.14.0