SAGA API v9.10
Loading...
Searching...
No Matches
grid_system.cpp
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_system.cpp //
15// //
16// Copyright (C) 2005 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 Hamburg //
44// Germany //
45// //
46// e-mail: oconrad@saga-gis.org //
47// //
49
50//---------------------------------------------------------
51#include "grid.h"
52#include "shapes.h"
53#include "parameters.h"
54
55
57// //
58// //
59// //
61
62//---------------------------------------------------------
66//
67int CSG_Grid_System::m_Precision = 16;
68
69//---------------------------------------------------------
76{
77 m_Precision = Decimals;
78
79 return( m_Precision );
80}
81
82//---------------------------------------------------------
89{
90 return( m_Precision );
91}
92
93
95// //
97
98//---------------------------------------------------------
103
104//---------------------------------------------------------
106{
107 Create(System, Precision);
108}
109
110//---------------------------------------------------------
111CSG_Grid_System::CSG_Grid_System(double Cellsize, const CSG_Rect &Extent, int Precision)
112{
113 Create(Cellsize, Extent, Precision);
114}
115
116//---------------------------------------------------------
117CSG_Grid_System::CSG_Grid_System(double Cellsize, double xMin, double yMin, double xMax, double yMax, int Precision)
118{
119 Create(Cellsize, xMin, yMin, xMax, yMax, Precision);
120}
121
122//---------------------------------------------------------
123CSG_Grid_System::CSG_Grid_System(double Cellsize, double xMin, double yMin, int NX, int NY, int Precision)
124{
125 Create(Cellsize, xMin, yMin, NX, NY, Precision);
126}
127
128//---------------------------------------------------------
129CSG_Grid_System::CSG_Grid_System(const CSG_String &System, int Precision)
130{
131 Create(System, Precision);
132}
133
134//---------------------------------------------------------
139
140
142// //
144
145//---------------------------------------------------------
146bool CSG_Grid_System::Create(const CSG_Grid_System &System, int Precision)
147{
148 if( Precision >= 0 )
149 {
150 return( Create(System.Get_Cellsize(), System.Get_XMin(), System.Get_YMin(), System.Get_NX(), System.Get_NY(), Precision) );
151 }
152
153 m_NX = System.m_NX;
154 m_NY = System.m_NY;
155 m_NCells = System.m_NCells;
156
157 m_Cellsize = System.m_Cellsize;
158 m_Cellarea = System.m_Cellarea;
159 m_Diagonal = System.m_Diagonal;
160
161 m_Extent = System.m_Extent;
162 m_Extent_Cells = System.m_Extent_Cells;
163
164 return( is_Valid() );
165}
166
167//---------------------------------------------------------
168bool CSG_Grid_System::Create(double Cellsize, const CSG_Rect &Extent, int Precision)
169{
170 if( Cellsize > 0. && Extent.Get_XRange() >= 0. && Extent.Get_YRange() >= 0. )
171 {
172 int nx = 1 + (int)(0.5 + Extent.Get_XRange() / Cellsize);
173 int ny = 1 + (int)(0.5 + Extent.Get_YRange() / Cellsize);
174
175 double x = fabs(Cellsize - Extent.Get_XRange() / (nx - 1.)) <= 0. ? Extent.Get_XMin() : Extent.Get_Center().x - Cellsize * (nx - 1.) / 2.;
176 double y = fabs(Cellsize - Extent.Get_YRange() / (ny - 1.)) <= 0. ? Extent.Get_YMin() : Extent.Get_Center().y - Cellsize * (ny - 1.) / 2.;
177
178 return( Create(Cellsize, x, y, nx, ny, Precision) );
179 }
180
181 Destroy();
182
183 return( false );
184}
185
186//---------------------------------------------------------
187bool CSG_Grid_System::Create(double Cellsize, double xMin, double yMin, double xMax, double yMax, int Precision)
188{
189 return( Create(Cellsize, CSG_Rect(xMin, yMin, xMax, yMax), Precision) );
190}
191
192//---------------------------------------------------------
193bool CSG_Grid_System::Create(double Cellsize, double xMin, double yMin, int NX, int NY, int Precision)
194{
195 if( Cellsize > 0. && NX > 0 && NY > 0 )
196 {
197 Cellsize = SG_Get_Rounded(Cellsize, Precision == -1 ? m_Precision : Precision);
198 xMin = SG_Get_Rounded(xMin , Precision == -1 ? m_Precision : Precision);
199 yMin = SG_Get_Rounded(yMin , Precision == -1 ? m_Precision : Precision);
200
201 if( Cellsize > 0. )
202 {
203 m_NX = NX;
204 m_NY = NY;
205 m_NCells = (sLong)NY * NX;
206
207 m_Cellsize = Cellsize;
208 m_Cellarea = Cellsize * Cellsize;
209 m_Diagonal = Cellsize * sqrt(2.);
210
211 m_Extent.xMin = xMin;
212 m_Extent.yMin = yMin;
213 m_Extent.xMax = xMin + (NX - 1.) * Cellsize;
214 m_Extent.yMax = yMin + (NY - 1.) * Cellsize;
215
216 m_Extent_Cells = m_Extent;
217 m_Extent_Cells.Inflate(0.5 * Cellsize, false);
218
219 return( true );
220 }
221 }
222
223 Destroy();
224
225 return( false );
226}
227
228//---------------------------------------------------------
235bool CSG_Grid_System::Create(const CSG_String &System, int Precision)
236{
237 double Cellsize, xMin, yMin; int NX, NY; CSG_Strings Values;
238
239 // 1 2 3 4
240 // "%.*f; %d; %d; %.*f; %.*fy"
241 Values = SG_String_Tokenize(System, ";");
242
243 if( Values.Get_Count() == 5 && Values[0].asDouble(Cellsize) && Values[1].asInt(NX) && Values[2].asInt(NY) && Values[3].asDouble(xMin) && Values[4].asDouble(yMin) )
244 {
245 return( Create(Cellsize, xMin, yMin, NX, NY, Precision) );
246 }
247
248 // 1 2 3 4
249 // "%.*f; %dx %dy; %.*fx %.*fy"
250 Values = SG_String_Tokenize(System, ";x");
251
252 if( Values.Get_Count() == 5 && Values[0].asDouble(Cellsize) && Values[1].asInt(NX) && Values[2].asInt(NY) && Values[3].asDouble(xMin) && Values[4].asDouble(yMin) )
253 {
254 return( Create(Cellsize, xMin, yMin, NX, NY, Precision) );
255 }
256
257 // 1 2 3 4 5 6 7
258 // "%s: %f, %s: %dx/%dy, %s: %fx/%fy"
259 Values = SG_String_Tokenize(System, ":,/");
260
261 if( Values.Get_Count() == 8 && Values[1].asDouble(Cellsize) && Values[3].asInt(NX) && Values[4].asInt(NY) && Values[6].asDouble(xMin) && Values[7].asDouble(yMin) )
262 {
263 return( Create(Cellsize, xMin, yMin, NX, NY, Precision) );
264 }
265
266 return( false );
267}
268
269//---------------------------------------------------------
271{
272 m_NX = 0;
273 m_NY = 0;
274 m_NCells = 0;
275
276 m_Cellsize = 0.;
277 m_Cellarea = 0.;
278 m_Diagonal = 0.;
279
280 m_Extent .Create(0., 0., 0., 0.);
281 m_Extent_Cells.Create(0., 0., 0., 0.);
282
283 return( true );
284}
285
286//---------------------------------------------------------
288{ return( Create(System) ); }
289
290bool CSG_Grid_System::Assign(double Cellsize, const CSG_Rect &Extent)
291{ return( Create(Cellsize, Extent) ); }
292
293bool CSG_Grid_System::Assign(double Cellsize, double xMin, double yMin, double xMax, double yMax)
294{ return( Create(Cellsize, xMin, yMin, xMax, yMax) ); }
295
296bool CSG_Grid_System::Assign(double Cellsize, double xMin, double yMin, int NX, int NY)
297{ return( Create(Cellsize, xMin, yMin, NX, NY) ); }
298
299
301// //
303
304//---------------------------------------------------------
306{
307 return( m_Cellsize > 0. && m_NX > 0 && m_NY > 0 );
308}
309
310//---------------------------------------------------------
312{
313 if( is_Valid() )
314 {
315 if( bShort )
316 {
317 m_Name.Printf("%.*f; %dx %dy; %.*fx %.*fy",
318 SG_Get_Significant_Decimals(m_Cellsize ), m_Cellsize, m_NX, m_NY,
319 SG_Get_Significant_Decimals(m_Extent.xMin), m_Extent.xMin,
320 SG_Get_Significant_Decimals(m_Extent.yMin), m_Extent.yMin
321 );
322 }
323 else
324 {
325 m_Name.Printf("%s: %f, %s: %dx/%dy, %s: %fx/%fy",
326 _TL("Cell size" ), m_Cellsize,
327 _TL("Number of cells" ), m_NX, m_NY,
328 _TL("Lower left cell center"), m_Extent.xMin, m_Extent.yMin
329 );
330 }
331 }
332 else
333 {
334 m_Name = _TL("<not set>");
335 }
336
337 return( m_Name );
338}
339
340//---------------------------------------------------------
342{
343 m_Name.Printf("%.*f; %d; %d; %.*f; %.*f",
344 SG_Get_Significant_Decimals(m_Cellsize ), m_Cellsize, m_NX, m_NY,
345 SG_Get_Significant_Decimals(m_Extent.xMin), m_Extent.xMin,
346 SG_Get_Significant_Decimals(m_Extent.yMin), m_Extent.yMin
347 );
348
349 return( m_Name );
350}
351
352
354// //
356
357//---------------------------------------------------------
359{
360 Create(System);
361
362 return( *this );
363}
364
365//---------------------------------------------------------
367{
368 return( pSystem != NULL && is_Equal(*pSystem) == true );
369}
370
372{
373 return( pSystem == NULL || is_Equal(*pSystem) == false );
374}
375
376//---------------------------------------------------------
378{
379 return( is_Equal(System) == true );
380}
381
383{
384 return( is_Equal(System) == false );
385}
386
387
389// //
391
392//---------------------------------------------------------
394{
395 return( m_Cellsize == System.m_Cellsize
396 && m_NX == System.m_NX
397 && m_NY == System.m_NY
398 && m_Extent.xMin == System.m_Extent.xMin
399 && m_Extent.yMin == System.m_Extent.yMin
400 );
401}
402
403//---------------------------------------------------------
404bool CSG_Grid_System::is_Equal(double Cellsize, const TSG_Rect &Extent) const
405{
406 return( m_Cellsize == Cellsize && m_Extent == Extent );
407}
408
409
411// //
412// //
413// //
415
416//---------------------------------------------------------
418{
419 m_Kernel.Add_Field("X", SG_DATATYPE_Int );
420 m_Kernel.Add_Field("Y", SG_DATATYPE_Int );
421 m_Kernel.Add_Field("D", SG_DATATYPE_Double);
422 m_Kernel.Add_Field("W", SG_DATATYPE_Double);
423}
424
425//---------------------------------------------------------
427{
428 m_Kernel.Del_Records();
429
430 m_Radius = 1.;
431 m_Radius_0 = 0.;
432 m_Direction = 0.;
433 m_Tolerance = 0.;
434
435 return( true );
436}
437
438
440// //
442
443//---------------------------------------------------------
444bool CSG_Grid_Cell_Addressor::Add_Parameters(CSG_Parameters &Parameters, const CSG_String &Parent, int Style)
445{
446 CSG_String Types;
447
448 if( (Style & SG_GRIDCELLADDR_PARM_SQUARE ) != 0 )
449 {
450 Types += CSG_String::Format("{%d}%s|", SG_GRIDCELLADDR_PARM_SQUARE , _TL("Square" ));
451 }
452
453 if( (Style & SG_GRIDCELLADDR_PARM_CIRCLE ) != 0 )
454 {
455 Types += CSG_String::Format("{%d}%s|", SG_GRIDCELLADDR_PARM_CIRCLE , _TL("Circle" ));
456 }
457
458 if( (Style & SG_GRIDCELLADDR_PARM_ANNULUS) != 0 )
459 {
460 Types += CSG_String::Format("{%d}%s|", SG_GRIDCELLADDR_PARM_ANNULUS, _TL("Annulus"));
461 }
462
463 if( (Style & SG_GRIDCELLADDR_PARM_SECTOR ) != 0 )
464 {
465 Types += CSG_String::Format("{%d}%s|", SG_GRIDCELLADDR_PARM_SECTOR , _TL("Sector" ));
466 }
467
468 Parameters.Add_Choice(Parent, "KERNEL_TYPE", _TL("Kernel Type"),
469 _TL("The kernel's shape."),
470 Types, 1
471 );
472
473 Parameters.Set_Enabled("KERNEL_TYPE", Parameters("KERNEL_TYPE")->asChoice()->Get_Count() > 1);
474
475 //-----------------------------------------------------
476 CSG_String Unit_Radius((Style & SG_GRIDCELLADDR_PARM_MAPUNIT) == 0 ? _TL("cells") : _TL("map units"));
477
478 if( (Style & SG_GRIDCELLADDR_PARM_SIZEDBL) != 0 )
479 {
480 if( (Style & SG_GRIDCELLADDR_PARM_ANNULUS) != 0 )
481 {
482 Parameters.Add_Double("KERNEL_TYPE", "KERNEL_INNER" , _TL("Inner Radius"), Unit_Radius, 0., 0., true);
483 }
484
485 Parameters .Add_Double("KERNEL_TYPE", "KERNEL_RADIUS", _TL( "Radius"), Unit_Radius, 1., 0., true);
486 }
487 else
488 {
489 if( (Style & SG_GRIDCELLADDR_PARM_ANNULUS) != 0 )
490 {
491 Parameters.Add_Int ("KERNEL_TYPE", "KERNEL_INNER" , _TL("Inner Radius"), Unit_Radius, 0 , 0 , true);
492 }
493
494 Parameters .Add_Int ("KERNEL_TYPE", "KERNEL_RADIUS", _TL( "Radius"), Unit_Radius, 2 , 0 , true);
495 }
496
497 //-----------------------------------------------------
498 if( (Style & SG_GRIDCELLADDR_PARM_SECTOR) != 0 )
499 {
500 Parameters.Add_Double("KERNEL_TYPE", "KERNEL_DIRECTION", _TL("Direction"), _TL("degree"), 0., -360., true, 360., true);
501 Parameters.Add_Double("KERNEL_TYPE", "KERNEL_TOLERANCE", _TL("Tolerance"), _TL("degree"), 5., 0., true, 180., true);
502 }
503
504 if( (Style & SG_GRIDCELLADDR_PARM_WEIGHTING) != 0 )
505 {
507 Parameters("KERNEL_TYPE")->is_Enabled() ? CSG_String("KERNEL_TYPE") : Parent
508 );
509 }
510
511 return( true );
512}
513
514//---------------------------------------------------------
516{
517 if( Type == 0 && Parameters("KERNEL_TYPE") )
518 {
519 Parameters("KERNEL_TYPE")->asChoice()->Get_Data(Type);
520 }
521
522 switch( Type )
523 {
525 return( Set_Radius(
526 Parameters("KERNEL_RADIUS" )->asDouble(),
527 true
528 ));
529
531 return( Set_Radius(
532 Parameters("KERNEL_RADIUS" )->asDouble(),
533 false
534 ));
535
537 return( Set_Annulus(
538 Parameters("KERNEL_INNER" )->asDouble(),
539 Parameters("KERNEL_RADIUS" )->asDouble()
540 ));
541
543 return( Set_Sector(
544 Parameters("KERNEL_RADIUS" )->asDouble(),
545 Parameters("KERNEL_DIRECTION")->asDouble() * M_DEG_TO_RAD,
546 Parameters("KERNEL_TOLERANCE")->asDouble() * M_DEG_TO_RAD
547 ));
548 }
549
550 return( false );
551}
552
553//---------------------------------------------------------
558
559
561// //
563
564//---------------------------------------------------------
566{
567 if( Parameters("KERNEL_TYPE") )
568 {
569 int Type = Parameters("KERNEL_TYPE")->asChoice()->Get_Item_Data(Parameters("KERNEL_TYPE")->asInt()).asInt();
570
571 Parameters.Set_Enabled("KERNEL_INNER" , Type == SG_GRIDCELLADDR_PARM_ANNULUS);
572 Parameters.Set_Enabled("KERNEL_DIRECTION", Type == SG_GRIDCELLADDR_PARM_SECTOR );
573 Parameters.Set_Enabled("KERNEL_TOLERANCE", Type == SG_GRIDCELLADDR_PARM_SECTOR );
574 }
575
577
578 return( true );
579}
580
581
583// //
585
586//---------------------------------------------------------
587bool CSG_Grid_Cell_Addressor::_Set_Kernel(int Type, double Radius, double Radius_Inner, double Direction, double Tolerance)
588{
589 Destroy();
590
591 m_Type = Type;
592 m_Radius = Radius;
593 m_Radius_0 = Radius_Inner;
594 m_Direction = fmod(Direction, M_PI_360); if( Direction < 0. ) Direction += M_PI_360;
595 m_Tolerance = fmod(Tolerance, M_PI_180); if( Tolerance < 0. ) Tolerance += M_PI_180;
596
597 if( m_Radius < 0. || m_Radius < m_Radius_0 )
598 {
599 return( false );
600 }
601
602 CSG_Vector Sector(2);
603
604 if( m_Type == 3 ) // sector
605 {
606 Sector[0] = fmod(Direction - Tolerance, M_PI_360); if( Sector[0] < 0. ) Sector[0] += M_PI_360;
607 Sector[1] = fmod(Direction + Tolerance, M_PI_360); if( Sector[1] < 0. ) Sector[1] += M_PI_360;
608 }
609
610 //-----------------------------------------------------
611 #define ADD_CELL(x, y, Distance) {\
612 CSG_Table_Record &Cell = *Kernel.Add_Record();\
613 Cell.Set_Value(0, x);\
614 Cell.Set_Value(1, y);\
615 Cell.Set_Value(2, Distance);\
616 Cell.Set_Value(3, m_Weighting.Get_Weight(d));\
617 }
618
619 CSG_Table Kernel(&m_Kernel);
620
621 int Size = (int)ceil(m_Radius);
622
623 //-----------------------------------------------------
624 for(int y=-Size; y<=Size; y++)
625 {
626 if( abs(y) > m_Radius )
627 continue;
628
629 for(int x=-Size; x<=Size; x++)
630 {
631 if( abs(x) > m_Radius )
632 continue;
633
634 double d = SG_Get_Length(x, y);
635
636 switch( m_Type )
637 {
638 default: // square
639 ADD_CELL(x, y, d);
640 break;
641
642 case 1: // circle
643 if( d <= m_Radius )
644 {
645 ADD_CELL(x, y, d);
646 }
647 break;
648
649 case 2: // annulus
650 if( d <= m_Radius && d >= m_Radius_0 )
651 {
652 ADD_CELL(x, y, d);
653 }
654 break;
655
656 case 3: // sector
657 if( d <= m_Radius && d >= m_Radius_0 && ((x == 0 && y == 0) || SG_is_Angle_Between(SG_Get_Angle_Of_Direction(x, y), Sector[0], Sector[1], false)) )
658 {
659 ADD_CELL(x, y, d);
660 }
661 break;
662 }
663 }
664 }
665
666 //-----------------------------------------------------
667 if( Kernel.Get_Count() < 1 )
668 {
669 return( false );
670 }
671
672 Kernel.Set_Index(2, TABLE_INDEX_Ascending);
673
674 for(int i=0; i<Kernel.Get_Count(); i++)
675 {
676 m_Kernel.Add_Record(Kernel.Get_Record_byIndex(i));
677 }
678
679 return( true );
680}
681
682//---------------------------------------------------------
683bool CSG_Grid_Cell_Addressor::Set_Radius(double Radius, bool bSquare)
684{
685 return( bSquare ? Set_Square(Radius) : Set_Circle(Radius) );
686}
687
688//---------------------------------------------------------
690{
691 return( _Set_Kernel(0, Radius, 0., 0., 0.) );
692}
693
694//---------------------------------------------------------
696{
697 return( _Set_Kernel(1, Radius, 0., 0., 0.) );
698}
699
700//---------------------------------------------------------
701bool CSG_Grid_Cell_Addressor::Set_Annulus(double Radius_Inner, double Radius_Outer)
702{
703 return( _Set_Kernel(2, Radius_Outer, Radius_Inner, 0., 0.) );
704}
705
706//---------------------------------------------------------
707bool CSG_Grid_Cell_Addressor::Set_Sector(double Radius, double Direction, double Tolerance)
708{
709 return( _Set_Kernel(3, Radius, 0., Direction, Tolerance) );
710}
711
712
714// //
715// //
716// //
718
719//---------------------------------------------------------
signed long long sLong
Definition api_core.h:158
SAGA_API_DLL_EXPORT CSG_Strings SG_String_Tokenize(const CSG_String &String, const CSG_String &Delimiters=SG_DEFAULT_DELIMITERS, TSG_String_Tokenizer_Mode Mode=SG_TOKEN_DEFAULT)
@ SG_DATATYPE_Double
Definition api_core.h:1008
@ SG_DATATYPE_Int
Definition api_core.h:1004
#define SG_Char
Definition api_core.h:536
#define _TL(s)
Definition api_core.h:1568
SAGA_API_DLL_EXPORT int SG_Get_Significant_Decimals(double Value, int maxDecimals=6)
static bool Add_Parameters(class CSG_Parameters &Parameters, const CSG_String &Parent="", bool bIDW_Offset=false)
static bool Enable_Parameters(class CSG_Parameters &Parameters)
bool Set_Circle(class CSG_Parameters &Parameters)
bool Set_Annulus(class CSG_Parameters &Parameters)
int Get_Count(void) const
Definition grid.h:1163
static bool Add_Parameters(class CSG_Parameters &Parameters, const CSG_String &Parent="", int Style=SG_GRIDCELLADDR_PARM_DEFAULT)
bool Set_Parameters(class CSG_Parameters &Parameters, int Type=0)
static bool Enable_Parameters(class CSG_Parameters &Parameters)
bool Set_Radius(double Radius, bool bSquare=false)
bool Set_Sector(class CSG_Parameters &Parameters)
bool Set_Square(class CSG_Parameters &Parameters)
double Get_XMin(bool bCells=false) const
Definition grid.h:264
bool Destroy(void)
double Get_YMin(bool bCells=false) const
Definition grid.h:268
CSG_Grid_System & operator=(const CSG_Grid_System &System)
double Get_Cellsize(void) const
Definition grid.h:255
const SG_Char * Get_Name(bool bShort=true)
bool operator!=(const CSG_Grid_System *pSystem) const
static int Set_Precision(int Decimals)
bool is_Equal(const CSG_Grid_System &System) const
int Get_NX(void) const
Definition grid.h:258
bool Assign(const CSG_Grid_System &System)
const SG_Char * asString(void)
static int Get_Precision(void)
bool operator==(const CSG_Grid_System *pSystem) const
int Get_NY(void) const
Definition grid.h:259
bool Create(const CSG_Grid_System &System, int Precision=-1)
bool is_Valid(void) const
CSG_Parameter * Add_Choice(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const CSG_String &Items, int Default=0)
void Set_Enabled(bool bEnabled=true)
CSG_Parameter * Add_Double(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Value=0.0, double Minimum=0.0, bool bMinimum=false, double Maximum=0.0, bool bMaximum=false)
CSG_Parameter * Add_Int(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Value=0, int Minimum=0, bool bMinimum=false, int Maximum=0, bool bMaximum=false)
double Get_YRange(void) const
Definition geo_tools.h:511
double Get_XRange(void) const
Definition geo_tools.h:510
double Get_XMin(void) const
Definition geo_tools.h:505
double Get_YMin(void) const
Definition geo_tools.h:507
CSG_Point Get_Center(void) const
Definition geo_tools.h:519
static CSG_String Format(const char *Format,...)
int Get_Count(void) const
Definition api_core.h:714
double SG_Get_Length(double dx, double dy)
bool SG_is_Angle_Between(double Angle, double Angle_Min, double Angle_Max, bool bCheckRange)
double SG_Get_Angle_Of_Direction(double dx, double dy)
struct SSG_Rect TSG_Rect
#define SG_GRIDCELLADDR_PARM_CIRCLE
Definition grid.h:1119
#define SG_GRIDCELLADDR_PARM_SIZEDBL
Definition grid.h:1122
#define SG_GRIDCELLADDR_PARM_SECTOR
Definition grid.h:1121
#define SG_GRIDCELLADDR_PARM_WEIGHTING
Definition grid.h:1124
#define SG_GRIDCELLADDR_PARM_SQUARE
Definition grid.h:1118
#define SG_GRIDCELLADDR_PARM_ANNULUS
Definition grid.h:1120
#define SG_GRIDCELLADDR_PARM_MAPUNIT
Definition grid.h:1123
#define ADD_CELL(x, y, Distance)
double SG_Get_Rounded(double Value, int Decimals)
Definition mat_tools.cpp:83
#define M_PI_360
Definition mat_tools.h:106
#define M_PI_180
Definition mat_tools.h:102
#define M_DEG_TO_RAD
Definition mat_tools.h:109
double x
Definition geo_tools.h:129
double y
Definition geo_tools.h:129
double xMin
Definition geo_tools.h:468
double yMin
Definition geo_tools.h:468
@ TABLE_INDEX_Ascending
Definition table.h:105