SAGA API  v9.5
grid.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.h //
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 of Hamburg //
44 // Germany //
45 // //
46 // e-mail: oconrad@saga-gis.org //
47 // //
49 
50 //---------------------------------------------------------
51 #ifndef HEADER_INCLUDED__SAGA_API__grid_H
52 #define HEADER_INCLUDED__SAGA_API__grid_H
53 
54 
56 // //
57 // //
58 // //
60 
61 //---------------------------------------------------------
70 // //
72 // //
73 // //
75 
76 //---------------------------------------------------------
77 #include "table.h"
78 #include "grid_pyramid.h"
79 
80 
82 // //
83 // Grid File //
84 // //
86 
87 //---------------------------------------------------------
88 typedef enum
89 {
96 }
98 
99 //---------------------------------------------------------
100 typedef enum
101 {
119 }
121 
122 //---------------------------------------------------------
124 {
125  SG_T("NAME"),
126  SG_T("DESCRIPTION"),
127  SG_T("UNIT"),
128  SG_T("DATAFILE_NAME"),
129  SG_T("DATAFILE_OFFSET"),
130  SG_T("DATAFORMAT"),
131  SG_T("BYTEORDER_BIG"),
132  SG_T("POSITION_XMIN"),
133  SG_T("POSITION_YMIN"),
134  SG_T("CELLCOUNT_X"),
135  SG_T("CELLCOUNT_Y"),
136  SG_T("CELLSIZE"),
137  SG_T("Z_FACTOR"),
138  SG_T("Z_OFFSET"),
139  SG_T("NODATA_VALUE"),
140  SG_T("TOPTOBOTTOM")
141 };
142 
143 //---------------------------------------------------------
144 #define GRID_FILE_KEY_TRUE SG_T("TRUE")
145 #define GRID_FILE_KEY_FALSE SG_T("FALSE")
146 
147 
149 // //
150 // //
151 // //
153 
154 //---------------------------------------------------------
155 typedef enum
156 {
161 
167 
169 }
171 
172 //---------------------------------------------------------
173 typedef enum
174 {
179 }
181 
182 
184 // //
185 // CSG_Grid_System //
186 // //
188 
189 //---------------------------------------------------------
198 //---------------------------------------------------------
200 {
201 public:
202  CSG_Grid_System(void);
203 
204  CSG_Grid_System (const CSG_Grid_System &System, int Precision = -1);
205  bool Create (const CSG_Grid_System &System, int Precision = -1);
206 
207  CSG_Grid_System (double Cellsize, const CSG_Rect &Extent, int Precision = -1);
208  bool Create (double Cellsize, const CSG_Rect &Extent, int Precision = -1);
209 
210  CSG_Grid_System (double Cellsize, double xMin, double yMin, double xMax, double yMax, int Precision = -1);
211  bool Create (double Cellsize, double xMin, double yMin, double xMax, double yMax, int Precision = -1);
212 
213  CSG_Grid_System (double Cellsize, double xMin, double yMin, int NX, int NY, int Precision = -1);
214  bool Create (double Cellsize, double xMin, double yMin, int NX, int NY, int Precision = -1);
215 
216  ~CSG_Grid_System(void);
217 
218  bool Destroy (void);
219 
220  //-----------------------------------------------------
221  bool Assign (const CSG_Grid_System &System);
222  bool Assign (double Cellsize, const CSG_Rect &Extent);
223  bool Assign (double Cellsize, double xMin, double yMin, double xMax, double yMax);
224  bool Assign (double Cellsize, double xMin, double yMin, int NX, int NY);
225 
226  //-----------------------------------------------------
227  bool is_Valid (void) const;
228 
229  const SG_Char * Get_Name (bool bShort = true);
230 
231  double Get_Cellsize (void) const { return( m_Cellsize ); }
232  double Get_Cellarea (void) const { return( m_Cellarea ); }
233 
234  int Get_NX (void) const { return( m_NX ); }
235  int Get_NY (void) const { return( m_NY ); }
236  sLong Get_NCells (void) const { return( m_NCells ); }
237 
238  const CSG_Rect & Get_Extent (bool bCells = false) const { return( bCells ? m_Extent_Cells : m_Extent ); }
239 
240  double Get_XMin (bool bCells = false) const { return( bCells ? m_Extent_Cells.Get_XMin () : m_Extent.Get_XMin () ); }
241  double Get_XMax (bool bCells = false) const { return( bCells ? m_Extent_Cells.Get_XMax () : m_Extent.Get_XMax () ); }
242  double Get_XRange (bool bCells = false) const { return( bCells ? m_Extent_Cells.Get_XRange() : m_Extent.Get_XRange() ); }
243 
244  double Get_YMin (bool bCells = false) const { return( bCells ? m_Extent_Cells.Get_YMin () : m_Extent.Get_YMin () ); }
245  double Get_YMax (bool bCells = false) const { return( bCells ? m_Extent_Cells.Get_YMax () : m_Extent.Get_YMax () ); }
246  double Get_YRange (bool bCells = false) const { return( bCells ? m_Extent_Cells.Get_YRange() : m_Extent.Get_YRange() ); }
247 
248 
249  //-----------------------------------------------------
250  bool operator == (const CSG_Grid_System &System) const;
251  void operator = (const CSG_Grid_System &System);
252 
253  bool is_Equal (const CSG_Grid_System &System) const;
254  bool is_Equal (double Cellsize, const TSG_Rect &Extent) const;
255 
256 
257  //-----------------------------------------------------
259  double Fit_xto_Grid_System (double x) const { return( Get_XMin() + m_Cellsize * Get_xWorld_to_Grid(x) ); }
260 
262  double Fit_yto_Grid_System (double y) const { return( Get_YMin() + m_Cellsize * Get_yWorld_to_Grid(y) ); }
263 
266  {
267  ptWorld.x = Fit_xto_Grid_System(ptWorld.x);
268  ptWorld.y = Fit_yto_Grid_System(ptWorld.y);
269 
270  return( ptWorld );
271  }
272 
273 
274  //-----------------------------------------------------
275  double Get_xGrid_to_World (int xGrid) const { return( Get_XMin() + xGrid * m_Cellsize ); }
276  double Get_yGrid_to_World (int yGrid) const { return( Get_YMin() + yGrid * m_Cellsize ); }
277 
278  TSG_Point Get_Grid_to_World (int xGrid, int yGrid) const
279  {
280  TSG_Point pt;
281 
282  pt.x = Get_xGrid_to_World(xGrid);
283  pt.y = Get_yGrid_to_World(yGrid);
284 
285  return( pt );
286  }
287 
288 
289  //-----------------------------------------------------
290  int Get_xWorld_to_Grid (double xWorld) const { return( (int)floor(0.5 + (xWorld - Get_XMin()) / m_Cellsize) ); }
291  int Get_yWorld_to_Grid (double yWorld) const { return( (int)floor(0.5 + (yWorld - Get_YMin()) / m_Cellsize) ); }
292 
293  bool Get_World_to_Grid (int &xGrid, int &yGrid, double xWorld, double yWorld) const
294  {
295  return( is_InGrid(xGrid = Get_xWorld_to_Grid(xWorld), yGrid = Get_yWorld_to_Grid(yWorld)) );
296  }
297 
298  bool Get_World_to_Grid (int &xGrid, int &yGrid, TSG_Point ptWorld) const
299  {
300  return( is_InGrid(xGrid = Get_xWorld_to_Grid(ptWorld.x), yGrid = Get_yWorld_to_Grid(ptWorld.y)) );
301  }
302 
303 
304  //-----------------------------------------------------
305  bool Get_Neighbor_Pos (int Direction, int x, int y, int &xPos, int &yPos) const
306  {
307  return( is_InGrid(xPos = Get_xTo(Direction, x), yPos = Get_yTo(Direction, y)) );
308  }
309 
310  static int Get_xTo (int Direction, int x = 0)
311  {
312  static int ix[8] = { 0, 1, 1, 1, 0,-1,-1,-1 };
313 
314  Direction %= 8;
315 
316  if( Direction < 0 )
317  {
318  Direction += 8;
319  }
320 
321  return( x + ix[Direction] );
322  }
323 
324  static int Get_yTo (int Direction, int y = 0)
325  {
326  static int iy[8] = { 1, 1, 0,-1,-1,-1, 0, 1 };
327 
328  Direction %= 8;
329 
330  if( Direction < 0 )
331  {
332  Direction += 8;
333  }
334 
335  return( y + iy[Direction] );
336  }
337 
338  static int Get_xFrom (int Direction, int x = 0) { return( Get_xTo(Direction + 4, x) ); }
339  static int Get_yFrom (int Direction, int y = 0) { return( Get_yTo(Direction + 4, y) ); }
340 
341  int Get_xToSave (int Direction, int x) const { return( (x = Get_xTo (Direction, x)) < 0 ? 0 : (x >= m_NX ? m_NX - 1 : x) ); }
342  int Get_yToSave (int Direction, int y) const { return( (y = Get_yTo (Direction, y)) < 0 ? 0 : (y >= m_NY ? m_NY - 1 : y) ); }
343  int Get_xFromSave (int Direction, int x) const { return( (x = Get_xFrom(Direction, x)) < 0 ? 0 : (x >= m_NX ? m_NX - 1 : x) ); }
344  int Get_yFromSave (int Direction, int y) const { return( (y = Get_yFrom(Direction, y)) < 0 ? 0 : (y >= m_NY ? m_NY - 1 : y) ); }
345 
346  bool is_InGrid (int x, int y) const { return( x >= 0 && x < m_NX && y >= 0 && y < m_NY ); }
347  bool is_InGrid (int x, int y, int Rand) const { return( x >= Rand && x < m_NX - Rand && y >= Rand && y < m_NY - Rand ); }
348 
349  double Get_Length (int Direction) const { return( Direction % 2 ? m_Diagonal : m_Cellsize ); }
350  static double Get_UnitLength (int Direction) { return( Direction % 2 ? sqrt(2.0) : 1.0 ); }
351 
352  static int Set_Precision (int Decimals);
353  static int Get_Precision (void);
354 
355  sLong Get_IndexFromRowCol (int x, int y) const
356  {
357  if( m_NX > 0 )
358  {
359  return( (sLong)y * m_NX + x );
360  }
361 
362  return( -1 );
363  }
364 
365  bool Get_RowColFromIndex (int &x, int &y, sLong i) const
366  {
367  if( m_NX > 0 )
368  {
369  x = (int)(i % m_NX);
370  y = (int)(i / m_NX);
371 
372  return( true );
373  }
374 
375  return( false );
376  }
377 
378 
379 private:
380 
381  int m_NX, m_NY;
382 
383  sLong m_NCells;
384 
385  double m_Cellsize, m_Cellarea, m_Diagonal;
386 
387  CSG_Rect m_Extent, m_Extent_Cells;
388 
389  CSG_String m_Name;
390 
391  static int m_Precision;
392 
393 };
394 
395 
397 // //
398 // CSG_Grid //
399 // //
401 
402 //---------------------------------------------------------
406 //---------------------------------------------------------
408 {
409 //---------------------------------------------------------
410 public:
411 
412  //-----------------------------------------------------
413  CSG_Grid_File_Info(void);
414 
416  bool Create (const CSG_Grid_File_Info &Info);
417 
418  CSG_Grid_File_Info (const CSG_String &File);
419  bool Create (const CSG_String &File);
420 
421  CSG_Grid_File_Info (CSG_File &Stream);
422  bool Create (CSG_File &Stream);
423 
424  CSG_Grid_File_Info (const CSG_Grid &Grid);
425  bool Create (const CSG_Grid &Grid);
426 
427  bool Save (const CSG_String &File , bool bBinary = true);
428  bool Save (const CSG_File &Stream, bool bBinary = true);
429 
430  static bool Save (const CSG_String &File , const CSG_Grid &Grid, bool bBinary = true);
431  static bool Save (const CSG_File &Stream, const CSG_Grid &Grid, bool bBinary = true);
432 
433  bool Save_AUX_XML (const CSG_String &File);
434  bool Save_AUX_XML (CSG_File &Stream);
435 
436  //-----------------------------------------------------
437  bool m_bFlip, m_bSwapBytes;
438 
440 
441  double m_zScale, m_zOffset, m_NoData[2];
442 
444 
445  CSG_String m_Name, m_Description, m_Unit, m_Data_File;
446 
448 
450 
451 
452 private:
453 
454  void _On_Construction (void);
455 
456  int _Get_Key (CSG_File &Stream, CSG_String &Line);
457 
458 };
459 
460 
462 // //
463 // CSG_Grid //
464 // //
466 
467 //---------------------------------------------------------
471 //---------------------------------------------------------
473 {
474 //---------------------------------------------------------
475 public:
476 
477  //-----------------------------------------------------
478  CSG_Grid(void);
479 
480  CSG_Grid (const CSG_Grid &Grid);
481  bool Create (const CSG_Grid &Grid);
482 
483  CSG_Grid (const CSG_String &File , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false, bool bLoadData = true);
484  bool Create (const CSG_String &File , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false, bool bLoadData = true);
485  CSG_Grid (const char *File , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false, bool bLoadData = true);
486  bool Create (const char *File , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false, bool bLoadData = true);
487  CSG_Grid (const wchar_t *File , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false, bool bLoadData = true);
488  bool Create (const wchar_t *File , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false, bool bLoadData = true);
489 
490  CSG_Grid (CSG_Grid *pGrid , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false);
491  bool Create (CSG_Grid *pGrid , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false);
492 
493  CSG_Grid (const CSG_Grid_System &System, TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false);
494  bool Create (const CSG_Grid_System &System, TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false);
495 
496  CSG_Grid (TSG_Data_Type Type, int NX, int NY, double Cellsize = 1.0, double xMin = 0.0, double yMin = 0.0, bool bCached = false);
497  bool Create (TSG_Data_Type Type, int NX, int NY, double Cellsize = 1.0, double xMin = 0.0, double yMin = 0.0, bool bCached = false);
498 
499 
500  //-----------------------------------------------------
501  virtual ~CSG_Grid(void);
502 
503  virtual bool Destroy (void);
504 
505 
506  //-----------------------------------------------------
507  virtual bool Save (const char *File, int Format = 0) { return( Save(CSG_String(File), Format) ); }
508  virtual bool Save (const wchar_t *File, int Format = 0) { return( Save(CSG_String(File), Format) ); }
509  virtual bool Save (const CSG_String &File, int Format = 0);
510 
511  //-----------------------------------------------------
514  virtual TSG_Data_Object_Type Get_ObjectType (void) const { return( SG_DATAOBJECT_TYPE_Grid ); }
515 
516  //-----------------------------------------------------
517  // Data-Info...
518 
519  TSG_Data_Type Get_Type (void) const { return( m_Type ); }
520 
521  int Get_nValueBytes (void) const { return( (int)m_nBytes_Value ); }
522  int Get_nLineBytes (void) const { return( (int)m_nBytes_Line ); }
523 
524  void Set_Unit (const CSG_String &Unit);
525  const CSG_String & Get_Unit (void) const { return( m_Unit ); }
526 
527 
528  //-----------------------------------------------------
529  // Georeference...
530 
531  const CSG_Grid_System & Get_System (void) const { return( m_System ); }
532 
533  virtual const CSG_Rect & Get_Extent (void) { return( m_System.Get_Extent() ); }
534 
535  int Get_NX (void) const { return( m_System.Get_NX() ); }
536  int Get_NY (void) const { return( m_System.Get_NY() ); }
537  sLong Get_NCells (void) const { return( m_System.Get_NCells() ); }
538 
539  double Get_Cellsize (void) const { return( m_System.Get_Cellsize() ); }
540  double Get_Cellarea (void) const { return( m_System.Get_Cellarea() ); }
541 
542  const CSG_Rect & Get_Extent (bool bCells = false) const { return( m_System.Get_Extent(bCells) ); }
543 
544  double Get_XMin (bool bCells = false) const { return( m_System.Get_XMin (bCells) ); }
545  double Get_XMax (bool bCells = false) const { return( m_System.Get_XMax (bCells) ); }
546  double Get_XRange (bool bCells = false) const { return( m_System.Get_XRange(bCells) ); }
547 
548  double Get_YMin (bool bCells = false) const { return( m_System.Get_YMin (bCells) ); }
549  double Get_YMax (bool bCells = false) const { return( m_System.Get_YMax (bCells) ); }
550  double Get_YRange (bool bCells = false) const { return( m_System.Get_YRange(bCells) ); }
551 
552 
553  //-----------------------------------------------------
554  // Values...
555 
556  void Set_Scaling (double Scale = 1.0, double Offset = 0.0);
557  double Get_Scaling (void) const;
558  double Get_Offset (void) const;
559  bool is_Scaled (void) const { return( m_zScale != 1.0 || m_zOffset != 0.0 ); }
560 
561  double Get_Mean (void);
562  double Get_Min (void);
563  double Get_Max (void);
564  double Get_Range (void);
565  double Get_StdDev (void);
566  double Get_Variance (void);
567  double Get_Quantile (double Quantile, bool bFromHistogram = true);
568  double Get_Percentile (double Percentile, bool bFromHistogram = true);
569 
570  const CSG_Simple_Statistics & Get_Statistics (void);
571  bool Get_Statistics (const CSG_Rect &rWorld, CSG_Simple_Statistics &Statistics, bool bHoldValues = false) const;
572 
573  const CSG_Histogram & Get_Histogram (size_t nClasses = 0);
574  bool Get_Histogram (const CSG_Rect &rWorld, CSG_Histogram &Histogram, size_t nClasses = 0) const;
575 
576  sLong Get_Data_Count (void);
577  sLong Get_NoData_Count (void);
578 
579 
580  //-----------------------------------------------------
581  // Checks...
582 
583  virtual bool is_Valid (void) const;
584 
585  TSG_Intersection is_Intersecting (const CSG_Rect &Extent) const;
586  TSG_Intersection is_Intersecting (const TSG_Rect &Extent) const;
587  TSG_Intersection is_Intersecting (double xMin, double yMin, double xMax, double yMax) const;
588 
589  bool is_Compatible (CSG_Grid *pGrid) const;
590  bool is_Compatible (const CSG_Grid_System &System) const;
591  bool is_Compatible (int NX, int NY, double Cellsize, double xMin, double yMin) const;
592 
593  bool is_InGrid (int x, int y, bool bCheckNoData = true) const { return( m_System.is_InGrid(x, y) && (!bCheckNoData || !is_NoData(x, y)) ); }
594  bool is_InGrid_byPos (double x, double y, bool bCheckNoData = true) const { return( Get_Extent(true).Contains(x, y) && (!bCheckNoData || !is_NoData(m_System.Get_xWorld_to_Grid(x), m_System.Get_yWorld_to_Grid(y))) ); }
595  bool is_InGrid_byPos (const TSG_Point &p, bool bCheckNoData = true) const { return( is_InGrid_byPos(p.x, p.y, bCheckNoData) ); }
596 
597 
598  //-----------------------------------------------------
599  // Memory...
600 
601  sLong Get_Memory_Size (void) const { return( Get_NCells() * Get_nValueBytes() ); }
602  double Get_Memory_Size_MB (void) const { return( (double)Get_Memory_Size() / N_MEGABYTE_BYTES ); }
603 
604  bool Set_Cache (bool bOn);
605  bool is_Cached (void) const { return( m_Cache_Stream != NULL ); }
606 
607 
608  //-----------------------------------------------------
609  // Operations...
610 
611  void Assign_NoData (void);
612 
613  virtual bool Assign (double Value = 0.0);
614  virtual bool Assign (CSG_Data_Object *pObject);
615  virtual bool Assign (CSG_Grid *pGrid, TSG_Grid_Resampling Interpolation);
616 
617  void Flip (void);
618  void Mirror (void);
619  void Invert (void);
620 
621  bool Normalise (void);
622  bool DeNormalise (double Minimum, double Maximum);
623 
624  bool Standardise (void);
625  bool DeStandardise (double Mean, double StdDev);
626 
627  int Get_Gradient_NeighborDir (int x, int y, bool bDown = true, bool bNoEdges = true) const;
628  bool Get_Gradient (int x, int y , double &Slope, double &Aspect) const;
629  bool Get_Gradient (double x, double y, double &Slope, double &Aspect, TSG_Grid_Resampling Interpolation) const;
630  bool Get_Gradient (const TSG_Point &p, double &Slope, double &Aspect, TSG_Grid_Resampling Interpolation) const;
631 
632 
633  //-----------------------------------------------------
634  // Set update flag when modified...
635 
636  virtual void Set_Modified (bool bModified = true)
637  {
639 
640  if( bModified )
641  {
642  Set_Update_Flag();
643  }
644  }
645 
646 
647  //-----------------------------------------------------
648  // Index...
649 
650  bool Set_Index (bool bOn = true)
651  {
652  if( !bOn )
653  {
654  SG_FREE_SAFE(m_Index);
655 
656  return( true );
657  }
658 
659  return( _Get_Index() );
660  }
661 
662  sLong Get_Sorted (sLong Position, bool bDown = true, bool bCheckNoData = true)
663  {
664  if( Position >= 0 && Position < Get_NCells() && _Get_Index() )
665  {
666  Position = m_Index[bDown ? Get_NCells() - Position - 1 : Position];
667 
668  if( !bCheckNoData || !is_NoData(Position) )
669  {
670  return( Position );
671  }
672  }
673 
674  return( -1 );
675  }
676 
677  bool Get_Sorted (sLong Position, sLong &i, bool bDown = true, bool bCheckNoData = true)
678  {
679  return( (i = Get_Sorted(Position, bDown, bCheckNoData)) >= 0 );
680  }
681 
682  bool Get_Sorted (sLong Position, int &x, int &y, bool bDown = true, bool bCheckNoData = true)
683  {
684  if( (Position = Get_Sorted(Position, bDown, bCheckNoData)) >= 0 )
685  {
686  x = (int)(Position % Get_NX());
687  y = (int)(Position / Get_NX());
688 
689  return( true );
690  }
691 
692  return( false );
693  }
694 
695 
696  //-----------------------------------------------------
697  // No Data Value...
698 
699  virtual bool is_NoData (int x, int y) const { return( is_NoData_Value(asDouble(x, y, false)) ); }
700  virtual bool is_NoData (sLong i) const { return( is_NoData_Value(asDouble( i, false)) ); }
701 
702  virtual void Set_NoData (int x, int y) { Set_Value(x, y, Get_NoData_Value(), false); }
703  virtual void Set_NoData (sLong i) { Set_Value( i, Get_NoData_Value(), false); }
704 
705 
706  //-----------------------------------------------------
707  // Operators...
708 
709  virtual CSG_Grid & operator = (const CSG_Grid &Grid);
710  virtual CSG_Grid & operator = (double Value);
711 
712  virtual CSG_Grid operator + (const CSG_Grid &Grid) const;
713  virtual CSG_Grid operator + (double Value) const;
714  virtual CSG_Grid & operator += (const CSG_Grid &Grid);
715  virtual CSG_Grid & operator += (double Value);
716  virtual CSG_Grid & Add (const CSG_Grid &Grid);
717  virtual CSG_Grid & Add (double Value);
718 
719  virtual CSG_Grid operator - (const CSG_Grid &Grid) const;
720  virtual CSG_Grid operator - (double Value) const;
721  virtual CSG_Grid & operator -= (const CSG_Grid &Grid);
722  virtual CSG_Grid & operator -= (double Value);
723  virtual CSG_Grid & Subtract (const CSG_Grid &Grid);
724  virtual CSG_Grid & Subtract (double Value);
725 
726  virtual CSG_Grid operator * (const CSG_Grid &Grid) const;
727  virtual CSG_Grid operator * (double Value) const;
728  virtual CSG_Grid & operator *= (const CSG_Grid &Grid);
729  virtual CSG_Grid & operator *= (double Value);
730  virtual CSG_Grid & Multiply (const CSG_Grid &Grid);
731  virtual CSG_Grid & Multiply (double Value);
732 
733  virtual CSG_Grid operator / (const CSG_Grid &Grid) const;
734  virtual CSG_Grid operator / (double Value) const;
735  virtual CSG_Grid & operator /= (const CSG_Grid &Grid);
736  virtual CSG_Grid & operator /= (double Value);
737  virtual CSG_Grid & Divide (const CSG_Grid &Grid);
738  virtual CSG_Grid & Divide (double Value);
739 
740  virtual double operator () (int x, int y) const { return( asDouble(x, y) ); }
741 
742 
743  //-----------------------------------------------------
744  // Get Value...
745 
746  double Get_Value (double x, double y, TSG_Grid_Resampling Resampling = GRID_RESAMPLING_BSpline , bool bByteWise = false) const;
747  double Get_Value (const TSG_Point &p, TSG_Grid_Resampling Resampling = GRID_RESAMPLING_BSpline , bool bByteWise = false) const;
748  bool Get_Value (double x, double y, double &Value, TSG_Grid_Resampling Resampling = GRID_RESAMPLING_BSpline, bool bNoData = false, bool bByteWise = false) const;
749  bool Get_Value (const TSG_Point &p, double &Value, TSG_Grid_Resampling Resampling = GRID_RESAMPLING_BSpline, bool bNoData = false, bool bByteWise = false) const;
750 
751  virtual BYTE asByte (int x, int y, bool bScaled = true) const { return( SG_ROUND_TO_BYTE (asDouble(x, y, bScaled)) ); }
752  virtual BYTE asByte ( sLong i, bool bScaled = true) const { return( SG_ROUND_TO_BYTE (asDouble( i, bScaled)) ); }
753  virtual char asChar (int x, int y, bool bScaled = true) const { return( SG_ROUND_TO_CHAR (asDouble(x, y, bScaled)) ); }
754  virtual char asChar ( sLong i, bool bScaled = true) const { return( SG_ROUND_TO_CHAR (asDouble( i, bScaled)) ); }
755  virtual short asShort (int x, int y, bool bScaled = true) const { return( SG_ROUND_TO_SHORT(asDouble(x, y, bScaled)) ); }
756  virtual short asShort ( sLong i, bool bScaled = true) const { return( SG_ROUND_TO_SHORT(asDouble( i, bScaled)) ); }
757  virtual int asInt (int x, int y, bool bScaled = true) const { return( SG_ROUND_TO_INT (asDouble(x, y, bScaled)) ); }
758  virtual int asInt ( sLong i, bool bScaled = true) const { return( SG_ROUND_TO_INT (asDouble( i, bScaled)) ); }
759  virtual sLong asLong (int x, int y, bool bScaled = true) const { return( SG_ROUND_TO_SLONG(asDouble(x, y, bScaled)) ); }
760  virtual sLong asLong ( sLong i, bool bScaled = true) const { return( SG_ROUND_TO_SLONG(asDouble( i, bScaled)) ); }
761  virtual float asFloat (int x, int y, bool bScaled = true) const { return( (float) (asDouble(x, y, bScaled)) ); }
762  virtual float asFloat ( sLong i, bool bScaled = true) const { return( (float) (asDouble( i, bScaled)) ); }
763 
764  //-----------------------------------------------------
765  virtual double asDouble( sLong i, bool bScaled = true) const
766  {
767  return( asDouble((int)(i % Get_NX()), (int)(i / Get_NX()), bScaled) );
768  }
769 
770  virtual double asDouble(int x, int y, bool bScaled = true) const
771  {
772  double Value;
773 
774  if( is_Cached() )
775  {
776  Value = _Cache_Get_Value(x, y);
777  }
778  else switch( m_Type )
779  {
780  case SG_DATATYPE_Float : Value = (double)((float **)m_Values)[y][x]; break;
781  case SG_DATATYPE_Double: Value = (double)((double **)m_Values)[y][x]; break;
782  case SG_DATATYPE_Byte : Value = (double)((BYTE **)m_Values)[y][x]; break;
783  case SG_DATATYPE_Char : Value = (double)((char **)m_Values)[y][x]; break;
784  case SG_DATATYPE_Word : Value = (double)((WORD **)m_Values)[y][x]; break;
785  case SG_DATATYPE_Short : Value = (double)((short **)m_Values)[y][x]; break;
786  case SG_DATATYPE_DWord : Value = (double)((DWORD **)m_Values)[y][x]; break;
787  case SG_DATATYPE_Int : Value = (double)((int **)m_Values)[y][x]; break;
788  case SG_DATATYPE_Long : Value = (double)((sLong **)m_Values)[y][x]; break;
789  case SG_DATATYPE_ULong : Value = (double)((uLong **)m_Values)[y][x]; break;
790  case SG_DATATYPE_Bit : Value = (double)(((BYTE **)m_Values)[y][x / 8] & m_Bitmask[x % 8]) == 0 ? 0.0 : 1.0; break;
791 
792  default:
793  return( 0.0 );
794  }
795 
796  if( bScaled && is_Scaled() )
797  {
798  Value = m_zOffset + m_zScale * Value;
799  }
800 
801  return( Value );
802  }
803 
804 
805  //-----------------------------------------------------
806  // Set Value...
807 
808  virtual void Add_Value(int x, int y, double Value) { Set_Value(x, y, asDouble(x, y) + Value ); }
809  virtual void Add_Value(sLong i, double Value) { Set_Value( i, asDouble( i) + Value ); }
810 
811  virtual void Mul_Value(int x, int y, double Value) { Set_Value(x, y, asDouble(x, y) * Value ); }
812  virtual void Mul_Value(sLong i, double Value) { Set_Value( i, asDouble( i) * Value ); }
813 
814  //-----------------------------------------------------
815  virtual void Set_Value(sLong i, double Value, bool bScaled = true)
816  {
817  Set_Value((int)(i % Get_NX()), (int)(i / Get_NX()), Value, bScaled);
818  }
819 
820  virtual void Set_Value(int x, int y, double Value, bool bScaled = true)
821  {
822  if( bScaled && is_Scaled() )
823  {
824  Value = (Value - m_zOffset) / m_zScale;
825  }
826 
827  if( is_Cached() )
828  {
829  _Cache_Set_Value(x, y, Value);
830  }
831  else switch( m_Type )
832  {
833  case SG_DATATYPE_Float : ((float **)m_Values)[y][x] = (float )(Value); break;
834  case SG_DATATYPE_Double: ((double **)m_Values)[y][x] = (double )(Value); break;
835  case SG_DATATYPE_Byte : ((BYTE **)m_Values)[y][x] = SG_ROUND_TO_BYTE (Value); break;
836  case SG_DATATYPE_Char : ((char **)m_Values)[y][x] = SG_ROUND_TO_CHAR (Value); break;
837  case SG_DATATYPE_Word : ((WORD **)m_Values)[y][x] = SG_ROUND_TO_WORD (Value); break;
838  case SG_DATATYPE_Short : ((short **)m_Values)[y][x] = SG_ROUND_TO_SHORT(Value); break;
839  case SG_DATATYPE_DWord : ((DWORD **)m_Values)[y][x] = SG_ROUND_TO_DWORD(Value); break;
840  case SG_DATATYPE_Int : ((int **)m_Values)[y][x] = SG_ROUND_TO_INT (Value); break;
841  case SG_DATATYPE_Long : ((sLong **)m_Values)[y][x] = SG_ROUND_TO_SLONG(Value); break;
842  case SG_DATATYPE_ULong : ((uLong **)m_Values)[y][x] = SG_ROUND_TO_ULONG(Value); break;
843  case SG_DATATYPE_Bit : ((BYTE **)m_Values)[y][x / 8] = Value != 0.0
844  ? ((BYTE **)m_Values)[y][x / 8] | m_Bitmask[x % 8]
845  : ((BYTE **)m_Values)[y][x / 8] & (~m_Bitmask[x % 8]);
846  break;
847 
848  default:
849  return;
850  }
851 
852  Set_Modified();
853  }
854 
855  //-----------------------------------------------------
856  CSG_Vector Get_Row (int y) const;
857  bool Set_Row (int y, const CSG_Vector &Values);
858 
859 
860 //---------------------------------------------------------
861 protected:
862 
863  virtual bool On_Update (void);
864  virtual bool On_Reload (void);
865  virtual bool On_Delete (void);
866 
867 
868 //---------------------------------------------------------
869 private:
870 
871  void **m_Values;
872 
873  bool m_Cache_bTemp, m_Cache_bSwap, m_Cache_bFlip;
874 
875  size_t m_nBytes_Value, m_nBytes_Line;
876 
877  sLong *m_Index, m_Cache_Offset;
878 
879  double m_zOffset, m_zScale;
880 
881  FILE *m_Cache_Stream;
882 
883  TSG_Data_Type m_Type;
884 
885  CSG_String m_Unit, m_Cache_File;
886 
887  CSG_Simple_Statistics m_Statistics;
888 
889  CSG_Histogram m_Histogram;
890 
891  CSG_Grid_System m_System;
892 
893 
894  //-----------------------------------------------------
895  static BYTE m_Bitmask[8];
896 
897 
898  //-----------------------------------------------------
899  void _On_Construction (void);
900 
901  bool _Set_Index (void);
902  bool _Get_Index (void)
903  {
904  if( Get_Update_Flag() )
905  {
906  Update();
907  }
908 
909  return( m_Index || _Set_Index() );
910  }
911 
912 
913  //-----------------------------------------------------
914  // Memory handling...
915 
916  bool _Memory_Create (bool bCached);
917  void _Memory_Destroy (void);
918 
919  bool _Array_Create (void);
920  void _Array_Destroy (void);
921 
922  bool _Cache_Check (void);
923  bool _Cache_Create (const CSG_String &File, TSG_Data_Type Data_Type, sLong Offset, bool bSwap, bool bFlip);
924  bool _Cache_Create (void);
925  bool _Cache_Destroy (bool bMemory_Restore);
926  void _Cache_Set_Value (int x, int y, double Value);
927  double _Cache_Get_Value (int x, int y) const;
928 
929 
930  //-----------------------------------------------------
931  // File access...
932 
933  void _Swap_Bytes (char *Bytes, int nBytes) const;
934 
935  bool _Load_External (const CSG_String &File, bool bCached, bool bLoadData);
936  bool _Load_PGSQL (const CSG_String &File, bool bCached, bool bLoadData);
937 
938  bool _Load_Native (const CSG_String &File, bool bCached, bool bLoadData);
939  bool _Save_Native (const CSG_String &File, TSG_Grid_File_Format Format);
940 
941  bool _Load_Compressed (const CSG_String &File, bool bCached, bool bLoadData);
942  bool _Save_Compressed (const CSG_String &File);
943 
944  bool _Load_Binary (CSG_File &Stream, TSG_Data_Type File_Type, bool bFlip, bool bSwapBytes);
945  bool _Save_Binary (CSG_File &Stream, TSG_Data_Type File_Type, bool bFlip, bool bSwapBytes);
946  bool _Load_ASCII (CSG_File &Stream, bool bCached, bool bFlip = false);
947  bool _Save_ASCII (CSG_File &Stream, bool bFlip = false);
948 
949  bool _Load_Surfer (const CSG_String &File, bool bCached, bool bLoadData);
950 
951 
952  //-----------------------------------------------------
953  CSG_Grid & _Operation_Arithmetic (const CSG_Grid &Grid, TSG_Grid_Operation Operation);
954  CSG_Grid & _Operation_Arithmetic (double Value , TSG_Grid_Operation Operation);
955 
956  bool _Assign_Interpolated (CSG_Grid *pSource, TSG_Grid_Resampling Interpolation);
957  bool _Assign_MeanValue (CSG_Grid *pSource, bool bAreaProportional);
958  bool _Assign_ExtremeValue (CSG_Grid *pSource, bool bMaximum);
959  bool _Assign_Majority (CSG_Grid *pSource);
960 
961 
962  //-----------------------------------------------------
963  // Interpolation subroutines...
964 
965  bool _Get_ValAtPos_NearestNeighbour (double &Value, int x, int y, double dx, double dy ) const;
966  bool _Get_ValAtPos_BiLinear (double &Value, int x, int y, double dx, double dy, bool bByteWise) const;
967  bool _Get_ValAtPos_BiCubicSpline (double &Value, int x, int y, double dx, double dy, bool bByteWise) const;
968  bool _Get_ValAtPos_BSpline (double &Value, int x, int y, double dx, double dy, bool bByteWise) const;
969 
970  double _Get_ValAtPos_BiCubicSpline (double dx, double dy, double z_xy[4][4]) const;
971  double _Get_ValAtPos_BSpline (double dx, double dy, double z_xy[4][4]) const;
972 
973  bool _Get_ValAtPos_Fill4x4Submatrix (int x, int y, double z_xy[4][4] ) const;
974  bool _Get_ValAtPos_Fill4x4Submatrix (int x, int y, double z_xy[4][4][4]) const;
975 
976 };
977 
978 
980 // //
981 // Functions //
982 // //
984 
985 //---------------------------------------------------------
986 #define SG_GRID_PTR_SAFE_SET_NODATA(g, x, y) { if( g && g->is_InGrid(x, y, false) ) { g->Set_NoData(x, y ); } }
987 #define SG_GRID_PTR_SAFE_SET_VALUE(g, x, y, z) { if( g && g->is_InGrid(x, y, false) ) { g->Set_Value (x, y, z); } }
988 
989 //---------------------------------------------------------
992 
995 
997 SAGA_API_DLL_EXPORT CSG_Grid * SG_Create_Grid (const char *File , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false, bool bLoadData = true);
999 SAGA_API_DLL_EXPORT CSG_Grid * SG_Create_Grid (const wchar_t *File , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false, bool bLoadData = true);
1001 SAGA_API_DLL_EXPORT CSG_Grid * SG_Create_Grid (const CSG_String &File , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false, bool bLoadData = true);
1002 
1005 
1007 SAGA_API_DLL_EXPORT CSG_Grid * SG_Create_Grid (const CSG_Grid_System &System, TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false);
1008 
1010 SAGA_API_DLL_EXPORT CSG_Grid * SG_Create_Grid (TSG_Data_Type Type, int NX, int NY, double Cellsize = 0.0, double xMin = 0.0, double yMin = 0.0, bool bCached = false);
1011 
1012 //---------------------------------------------------------
1015 
1018 
1021 
1023 SAGA_API_DLL_EXPORT void SG_Grid_Cache_Set_Threshold_MB (double nMegabytes);
1026 
1027 //---------------------------------------------------------
1031 
1032 
1034 // //
1035 // //
1036 // //
1038 
1039 //---------------------------------------------------------
1041 {
1042 public:
1044 
1045  //-----------------------------------------------------
1046  const TSG_Point_Int & operator [] (size_t i) const { return( *((TSG_Point_Int *)Get_Record(i)) ); }
1047 
1048  //-----------------------------------------------------
1049  virtual bool Push (int x, int y)
1050  {
1052 
1053  if( pPoint )
1054  {
1055  pPoint->x = x;
1056  pPoint->y = y;
1057 
1058  return( true );
1059  }
1060 
1061  return( false );
1062  }
1063 
1064  //-----------------------------------------------------
1065  virtual bool Pop (int &x, int &y)
1066  {
1068 
1069  if( pPoint )
1070  {
1071  x = pPoint->x;
1072  y = pPoint->y;
1073 
1074  return( true );
1075  }
1076 
1077  return( false );
1078  }
1079 
1080 };
1081 
1082 
1084 // //
1085 // //
1086 // //
1088 
1089 //---------------------------------------------------------
1090 #define SG_GRIDCELLADDR_PARM_SQUARE 0x01
1091 #define SG_GRIDCELLADDR_PARM_CIRCLE 0x02
1092 #define SG_GRIDCELLADDR_PARM_ANNULUS 0x04
1093 #define SG_GRIDCELLADDR_PARM_SECTOR 0x08
1094 #define SG_GRIDCELLADDR_PARM_SIZEDBL 0x10
1095 #define SG_GRIDCELLADDR_PARM_MAPUNIT 0x20
1096 #define SG_GRIDCELLADDR_PARM_WEIGHTING 0x40
1097 #define SG_GRIDCELLADDR_PARM_DEFAULT (SG_GRIDCELLADDR_PARM_SQUARE|SG_GRIDCELLADDR_PARM_CIRCLE)
1098 
1099 //---------------------------------------------------------
1101 {
1102 public:
1104 
1105  bool Destroy (void);
1106 
1107  static bool Enable_Parameters (class CSG_Parameters &Parameters);
1108  static bool Add_Parameters (class CSG_Parameters &Parameters, const CSG_String &Parent = "", int Style = SG_GRIDCELLADDR_PARM_DEFAULT);
1109  bool Set_Parameters (class CSG_Parameters &Parameters, int Type = 0);
1110 
1111  bool Set_Square (class CSG_Parameters &Parameters);
1112  bool Set_Circle (class CSG_Parameters &Parameters);
1113  bool Set_Annulus (class CSG_Parameters &Parameters);
1114  bool Set_Sector (class CSG_Parameters &Parameters);
1115 
1116  CSG_Distance_Weighting & Get_Weighting (void) { return( m_Weighting ); }
1117 
1118  bool is_Square (void) const { return( m_Type == 0 ); }
1119  bool is_Circle (void) const { return( m_Type == 1 ); }
1120  bool is_Annulus (void) const { return( m_Type == 2 ); }
1121  bool is_Sector (void) const { return( m_Type == 3 ); }
1122 
1123  bool Set_Radius (double Radius, bool bSquare = false);
1124  bool Set_Square (double Radius);
1125  bool Set_Circle (double Radius);
1126  bool Set_Annulus (double Radius_Inner, double Radius_Outer);
1127  bool Set_Sector (double Radius, double Direction, double Tolerance);
1128 
1129  double Get_Radius (bool bOuter = true) const { return( bOuter ? m_Radius : m_Radius_0 ); }
1130  double Get_Radius_Inner (void) const { return( m_Radius_0 ); }
1131  double Get_Radius_Outer (void) const { return( m_Radius ); }
1132  double Get_Direction (void) const { return( m_Direction ); }
1133  double Get_Tolerance (void) const { return( m_Tolerance ); }
1134 
1135  int Get_Count (void) const { return( (int)m_Kernel.Get_Count() ); }
1136  int Get_X (int Index, int Offset = 0) const { return( Index >= 0 && Index < m_Kernel.Get_Count() ? m_Kernel[Index].asInt (0) + Offset : Offset ); }
1137  int Get_Y (int Index, int Offset = 0) const { return( Index >= 0 && Index < m_Kernel.Get_Count() ? m_Kernel[Index].asInt (1) + Offset : Offset ); }
1138  double Get_Distance (int Index ) const { return( Index >= 0 && Index < m_Kernel.Get_Count() ? m_Kernel[Index].asDouble(2) : -1. ); }
1139  double Get_Weight (int Index ) const { return( Index >= 0 && Index < m_Kernel.Get_Count() ? m_Kernel[Index].asDouble(3) : 0. ); }
1140  bool Get_Values (int Index, int &x, int &y, double &Distance, double &Weight, bool bOffset = false) const
1141  {
1142  if( Index >= 0 && Index < m_Kernel.Get_Count() )
1143  {
1144  CSG_Table_Record &Cell = m_Kernel[Index];
1145 
1146  x = bOffset ? x + Cell.asInt(0) : Cell.asInt(0);
1147  y = bOffset ? y + Cell.asInt(1) : Cell.asInt(1);
1148  Distance = Cell.asDouble(2);
1149  Weight = Cell.asDouble(3);
1150 
1151  return( true );
1152  }
1153 
1154  return( false );
1155  }
1156 
1157 
1158 private:
1159 
1160  int m_Type;
1161 
1162  double m_Radius, m_Radius_0, m_Direction, m_Tolerance;
1163 
1164  CSG_Distance_Weighting m_Weighting;
1165 
1166  CSG_Table m_Kernel;
1167 
1168 
1169  bool _Set_Kernel (int Type, double Radius, double Radius_Inner, double Direction, double Tolerance);
1170 
1171 };
1172 
1173 
1175 // //
1176 // //
1177 // //
1179 
1180 //---------------------------------------------------------
1181 #endif // #ifndef HEADER_INCLUDED__SAGA_API__grid_H
CSG_Grid_System::Get_IndexFromRowCol
sLong Get_IndexFromRowCol(int x, int y) const
Definition: grid.h:355
CSG_Grid::Get_Type
TSG_Data_Type Get_Type(void) const
Definition: grid.h:519
CSG_Grid_File_Info::m_Offset
sLong m_Offset
Definition: grid.h:439
CSG_Grid_System::Get_xGrid_to_World
double Get_xGrid_to_World(int xGrid) const
Definition: grid.h:275
CSG_Rect
Definition: geo_tools.h:471
SG_DATATYPE_Int
@ SG_DATATYPE_Int
Definition: api_core.h:1000
CSG_Table_Record::asDouble
double asDouble(int Field) const
Definition: table_record.cpp:527
CSG_Data_Object::Assign
virtual bool Assign(CSG_Data_Object *pObject)
Definition: dataobject.cpp:793
CSG_Grid::Add_Value
virtual void Add_Value(int x, int y, double Value)
Definition: grid.h:808
CSG_Grid::is_InGrid
bool is_InGrid(int x, int y, bool bCheckNoData=true) const
Definition: grid.h:593
CSG_Grid_System::Get_xTo
static int Get_xTo(int Direction, int x=0)
Definition: grid.h:310
SG_DATATYPE_Undefined
@ SG_DATATYPE_Undefined
Definition: api_core.h:1009
SG_FREE_SAFE
#define SG_FREE_SAFE(PTR)
Definition: api_core.h:205
GRID_RESAMPLING_NearestNeighbour
@ GRID_RESAMPLING_NearestNeighbour
Definition: grid.h:157
SG_T
#define SG_T(s)
Definition: api_core.h:537
TSG_Intersection
TSG_Intersection
Definition: geo_tools.h:101
CSG_Grid_System::Get_Cellsize
double Get_Cellsize(void) const
Definition: grid.h:231
GRID_FILE_KEY_DESCRIPTION
@ GRID_FILE_KEY_DESCRIPTION
Definition: grid.h:103
SG_Grid_Cache_Set_Mode
SAGA_API_DLL_EXPORT void SG_Grid_Cache_Set_Mode(int Mode)
Definition: grid_memory.cpp:104
SG_DATATYPE_DWord
@ SG_DATATYPE_DWord
Definition: api_core.h:999
CSG_Data_Object::On_Reload
virtual bool On_Reload(void)=0
CSG_Grid::Get_ObjectType
virtual TSG_Data_Object_Type Get_ObjectType(void) const
Definition: grid.h:514
CSG_Data_Object::On_Delete
virtual bool On_Delete(void)=0
CSG_Grid_Cell_Addressor::Get_Radius_Inner
double Get_Radius_Inner(void) const
Definition: grid.h:1130
CSG_Grid_Cell_Addressor::Get_Tolerance
double Get_Tolerance(void) const
Definition: grid.h:1133
CSG_Data_Object::Update
bool Update(bool bForce=false)
Definition: dataobject.cpp:773
SG_ROUND_TO_INT
#define SG_ROUND_TO_INT(x)
Definition: mat_tools.h:155
CSG_Grid::is_InGrid_byPos
bool is_InGrid_byPos(double x, double y, bool bCheckNoData=true) const
Definition: grid.h:594
GRID_FILE_KEY_Z_FACTOR
@ GRID_FILE_KEY_Z_FACTOR
Definition: grid.h:114
CSG_Grid::is_Scaled
bool is_Scaled(void) const
Definition: grid.h:559
GRID_RESAMPLING_BicubicSpline
@ GRID_RESAMPLING_BicubicSpline
Definition: grid.h:159
CSG_Grid::asDouble
virtual double asDouble(int x, int y, bool bScaled=true) const
Definition: grid.h:770
CSG_Grid::asChar
virtual char asChar(sLong i, bool bScaled=true) const
Definition: grid.h:754
CSG_Table_Record
Definition: table.h:130
CSG_Grid_System::Get_XMin
double Get_XMin(bool bCells=false) const
Definition: grid.h:240
SG_Create_Grid
SAGA_API_DLL_EXPORT CSG_Grid * SG_Create_Grid(void)
Definition: grid.cpp:72
CSG_Grid::Get_nLineBytes
int Get_nLineBytes(void) const
Definition: grid.h:522
CSG_Data_Object::Get_NoData_Value
double Get_NoData_Value(bool bUpper=false) const
Definition: dataobject.h:253
GRID_FILE_FORMAT_Compressed
@ GRID_FILE_FORMAT_Compressed
Definition: grid.h:94
CSG_Stack::Get_Record_Pop
void * Get_Record_Pop(void)
Definition: api_core.h:963
CSG_Stack
Definition: api_core.h:931
CSG_Grid_File_Info::m_bSwapBytes
bool m_bSwapBytes
Definition: grid.h:437
GRID_FILE_FORMAT_Undefined
@ GRID_FILE_FORMAT_Undefined
Definition: grid.h:90
CSG_Grid_System
Definition: grid.h:200
GRID_FILE_KEY_BYTEORDER_BIG
@ GRID_FILE_KEY_BYTEORDER_BIG
Definition: grid.h:108
TSG_Grid_Resampling
TSG_Grid_Resampling
Definition: grid.h:156
CSG_Histogram
Definition: mat_tools.h:1001
GRID_FILE_KEY_DATAFORMAT
@ GRID_FILE_KEY_DATAFORMAT
Definition: grid.h:107
CSG_Grid::Get_nValueBytes
int Get_nValueBytes(void) const
Definition: grid.h:521
GRID_FILE_FORMAT_GeoTIFF
@ GRID_FILE_FORMAT_GeoTIFF
Definition: grid.h:95
CSG_Grid_System::Get_yWorld_to_Grid
int Get_yWorld_to_Grid(double yWorld) const
Definition: grid.h:291
CSG_Data_Object::is_NoData_Value
bool is_NoData_Value(double Value) const
Definition: dataobject.h:255
GRID_FILE_KEY_POSITION_YMIN
@ GRID_FILE_KEY_POSITION_YMIN
Definition: grid.h:110
GRID_RESAMPLING_Undefined
@ GRID_RESAMPLING_Undefined
Definition: grid.h:168
CSG_Grid::is_InGrid_byPos
bool is_InGrid_byPos(const TSG_Point &p, bool bCheckNoData=true) const
Definition: grid.h:595
SG_DATATYPE_Byte
@ SG_DATATYPE_Byte
Definition: api_core.h:995
CSG_Data_Object::Save
virtual bool Save(const CSG_String &File, int Format=0)=0
GRID_OPERATION_Multiplication
@ GRID_OPERATION_Multiplication
Definition: grid.h:177
CSG_Grid_System::Get_yGrid_to_World
double Get_yGrid_to_World(int yGrid) const
Definition: grid.h:276
CSG_Grid_System::Get_yTo
static int Get_yTo(int Direction, int y=0)
Definition: grid.h:324
GRID_RESAMPLING_Maximum
@ GRID_RESAMPLING_Maximum
Definition: grid.h:165
CSG_Grid::is_NoData
virtual bool is_NoData(sLong i) const
Definition: grid.h:700
SG_ROUND_TO_SLONG
#define SG_ROUND_TO_SLONG(x)
Definition: mat_tools.h:158
CSG_Grid_File_Info::m_System
CSG_Grid_System m_System
Definition: grid.h:447
CSG_Grid::Mul_Value
virtual void Mul_Value(int x, int y, double Value)
Definition: grid.h:811
SG_Grid_Cache_Set_Directory
SAGA_API_DLL_EXPORT void SG_Grid_Cache_Set_Directory(const SG_Char *Directory)
Definition: grid_memory.cpp:87
GRID_FILE_KEY_CELLSIZE
@ GRID_FILE_KEY_CELLSIZE
Definition: grid.h:113
GRID_FILE_KEY_NODATA_VALUE
@ GRID_FILE_KEY_NODATA_VALUE
Definition: grid.h:116
GRID_OPERATION_Subtraction
@ GRID_OPERATION_Subtraction
Definition: grid.h:176
TSG_Grid_File_Format
TSG_Grid_File_Format
Definition: grid.h:89
SSG_Point
Definition: geo_tools.h:128
CSG_Grid_Cell_Addressor::Get_Weight
double Get_Weight(int Index) const
Definition: grid.h:1139
CSG_Grid_Cell_Addressor::is_Sector
bool is_Sector(void) const
Definition: grid.h:1121
CSG_Stack::Get_Record
void * Get_Record(size_t i) const
Definition: api_core.h:953
CSG_Data_Object::Set_Update_Flag
void Set_Update_Flag(bool bOn=true)
Definition: dataobject.h:285
CSG_Grid::Get_System
const CSG_Grid_System & Get_System(void) const
Definition: grid.h:531
CSG_Grid::Get_XRange
double Get_XRange(bool bCells=false) const
Definition: grid.h:546
CSG_File
Definition: api_core.h:1124
CSG_Grid_Cell_Addressor::Get_Count
int Get_Count(void) const
Definition: grid.h:1135
GRID_OPERATION_Addition
@ GRID_OPERATION_Addition
Definition: grid.h:175
SSG_Rect
Definition: geo_tools.h:464
CSG_Grid_System::Get_Cellarea
double Get_Cellarea(void) const
Definition: grid.h:232
SG_Grid_Cache_Set_Threshold_MB
SAGA_API_DLL_EXPORT void SG_Grid_Cache_Set_Threshold_MB(double nMegabytes)
Definition: grid_memory.cpp:133
CSG_Grid::Add_Value
virtual void Add_Value(sLong i, double Value)
Definition: grid.h:809
SG_GRIDCELLADDR_PARM_DEFAULT
#define SG_GRIDCELLADDR_PARM_DEFAULT
Definition: grid.h:1097
SG_Grid_Get_File_Format_Default
SAGA_API_DLL_EXPORT TSG_Grid_File_Format SG_Grid_Get_File_Format_Default(void)
Definition: grid_io.cpp:123
CSG_Grid::Get_YMin
double Get_YMin(bool bCells=false) const
Definition: grid.h:548
SG_DATATYPE_Long
@ SG_DATATYPE_Long
Definition: api_core.h:1002
CSG_Grid::Get_Cellsize
double Get_Cellsize(void) const
Definition: grid.h:539
CSG_Vector
Definition: mat_tools.h:360
CSG_Data_Object
Definition: dataobject.h:180
GRID_FILE_KEY_NAME
@ GRID_FILE_KEY_NAME
Definition: grid.h:102
gSG_Grid_File_Key_Names
const SG_Char gSG_Grid_File_Key_Names[GRID_FILE_KEY_Count][32]
Definition: grid.h:123
GRID_RESAMPLING_Bilinear
@ GRID_RESAMPLING_Bilinear
Definition: grid.h:158
CSG_Grid::Set_Index
bool Set_Index(bool bOn=true)
Definition: grid.h:650
CSG_Grid_Stack::CSG_Grid_Stack
CSG_Grid_Stack(void)
Definition: grid.h:1043
CSG_Grid::Get_Cellarea
double Get_Cellarea(void) const
Definition: grid.h:540
GRID_RESAMPLING_Mean_Cells
@ GRID_RESAMPLING_Mean_Cells
Definition: grid.h:163
CSG_Grid_System::Get_World_to_Grid
bool Get_World_to_Grid(int &xGrid, int &yGrid, TSG_Point ptWorld) const
Definition: grid.h:298
CSG_Grid_File_Info::m_Unit
CSG_String m_Unit
Definition: grid.h:445
CSG_Grid_System::Get_yToSave
int Get_yToSave(int Direction, int y) const
Definition: grid.h:342
GRID_FILE_KEY_DATAFILE_NAME
@ GRID_FILE_KEY_DATAFILE_NAME
Definition: grid.h:105
CSG_Grid_System::Get_YMax
double Get_YMax(bool bCells=false) const
Definition: grid.h:245
SG_Grid_Cache_Set_Threshold
SAGA_API_DLL_EXPORT void SG_Grid_Cache_Set_Threshold(int nBytes)
Definition: grid_memory.cpp:124
CSG_Grid_Cell_Addressor::Get_Weighting
CSG_Distance_Weighting & Get_Weighting(void)
Definition: grid.h:1116
SG_Grid_Get_File_Extension_Default
SAGA_API_DLL_EXPORT CSG_String SG_Grid_Get_File_Extension_Default(void)
Definition: grid_io.cpp:129
CSG_Grid::Get_Memory_Size
sLong Get_Memory_Size(void) const
Definition: grid.h:601
CSG_Grid::Set_Value
virtual void Set_Value(sLong i, double Value, bool bScaled=true)
Definition: grid.h:815
CSG_Grid_Cell_Addressor
Definition: grid.h:1101
CSG_Data_Object::Get_Extent
virtual const CSG_Rect & Get_Extent(void)=0
sLong
signed long long sLong
Definition: api_core.h:158
SG_Grid_Set_File_Format_Default
SAGA_API_DLL_EXPORT bool SG_Grid_Set_File_Format_Default(int Format)
Definition: grid_io.cpp:106
SG_ROUND_TO_CHAR
#define SG_ROUND_TO_CHAR(x)
Definition: mat_tools.h:151
SG_ROUND_TO_WORD
#define SG_ROUND_TO_WORD(x)
Definition: mat_tools.h:152
CSG_Grid_File_Info::m_Type
TSG_Data_Type m_Type
Definition: grid.h:443
CSG_Grid::Get_Sorted
bool Get_Sorted(sLong Position, int &x, int &y, bool bDown=true, bool bCheckNoData=true)
Definition: grid.h:682
CSG_Data_Object::On_Update
virtual bool On_Update(void)
Definition: dataobject.h:287
CSG_Grid::Get_Unit
const CSG_String & Get_Unit(void) const
Definition: grid.h:525
GRID_FILE_KEY_TOPTOBOTTOM
@ GRID_FILE_KEY_TOPTOBOTTOM
Definition: grid.h:117
CSG_Grid::Mul_Value
virtual void Mul_Value(sLong i, double Value)
Definition: grid.h:812
CSG_Distance_Weighting
Definition: geo_tools.h:710
CSG_Grid::Get_NY
int Get_NY(void) const
Definition: grid.h:536
SG_DATATYPE_Float
@ SG_DATATYPE_Float
Definition: api_core.h:1003
CSG_Grid::Get_XMin
double Get_XMin(bool bCells=false) const
Definition: grid.h:544
CSG_Grid::Save
virtual bool Save(const wchar_t *File, int Format=0)
Definition: grid.h:508
CSG_Grid_System::Get_Grid_to_World
TSG_Point Get_Grid_to_World(int xGrid, int yGrid) const
Definition: grid.h:278
GRID_FILE_FORMAT_Binary_old
@ GRID_FILE_FORMAT_Binary_old
Definition: grid.h:91
CSG_Grid_System::Get_UnitLength
static double Get_UnitLength(int Direction)
Definition: grid.h:350
CSG_Grid_Cell_Addressor::Get_Radius_Outer
double Get_Radius_Outer(void) const
Definition: grid.h:1131
CSG_Grid_File_Info::m_Projection
CSG_Projection m_Projection
Definition: grid.h:449
CSG_Stack::Get_Record_Push
void * Get_Record_Push(void)
Definition: api_core.h:958
SAGA_API_DLL_EXPORT
#define SAGA_API_DLL_EXPORT
Definition: api_core.h:94
CSG_Grid_System::is_InGrid
bool is_InGrid(int x, int y) const
Definition: grid.h:346
GRID_RESAMPLING_BSpline
@ GRID_RESAMPLING_BSpline
Definition: grid.h:160
CSG_Grid_System::Fit_yto_Grid_System
double Fit_yto_Grid_System(double y) const
Aligns the world coordinate y to the columns of the grid system and returns it.
Definition: grid.h:262
CSG_Data_Object::Set_Modified
virtual void Set_Modified(bool bOn=true)
Definition: dataobject.h:227
CSG_Grid::Get_Sorted
bool Get_Sorted(sLong Position, sLong &i, bool bDown=true, bool bCheckNoData=true)
Definition: grid.h:677
CSG_Grid::asShort
virtual short asShort(int x, int y, bool bScaled=true) const
Definition: grid.h:755
CSG_Grid::Get_Sorted
sLong Get_Sorted(sLong Position, bool bDown=true, bool bCheckNoData=true)
Definition: grid.h:662
SG_ROUND_TO_BYTE
#define SG_ROUND_TO_BYTE(x)
Definition: mat_tools.h:150
TSG_Grid_File_Key
TSG_Grid_File_Key
Definition: grid.h:101
CSG_Grid_File_Info::m_zScale
double m_zScale
Definition: grid.h:441
grid_pyramid.h
SG_DATATYPE_Word
@ SG_DATATYPE_Word
Definition: api_core.h:997
CSG_Grid_System::Get_Length
double Get_Length(int Direction) const
Definition: grid.h:349
SG_DATAOBJECT_TYPE_Grid
@ SG_DATAOBJECT_TYPE_Grid
Definition: dataobject.h:118
SG_ROUND_TO_ULONG
#define SG_ROUND_TO_ULONG(x)
Definition: mat_tools.h:157
CSG_Grid_System::Get_NY
int Get_NY(void) const
Definition: grid.h:235
CSG_Grid_System::Get_XMax
double Get_XMax(bool bCells=false) const
Definition: grid.h:241
CSG_Grid_System::Get_yFrom
static int Get_yFrom(int Direction, int y=0)
Definition: grid.h:339
SG_Grid_Cache_Get_Threshold_MB
SAGA_API_DLL_EXPORT double SG_Grid_Cache_Get_Threshold_MB(void)
Definition: grid_memory.cpp:145
CSG_Grid::Set_NoData
virtual void Set_NoData(sLong i)
Definition: grid.h:703
CSG_Projection
Definition: geo_tools.h:824
SG_Grid_Cache_Get_Directory
SAGA_API_DLL_EXPORT const SG_Char * SG_Grid_Cache_Get_Directory(void)
Definition: grid_memory.cpp:81
CSG_Grid_Cell_Addressor::Get_Direction
double Get_Direction(void) const
Definition: grid.h:1132
SG_Grid_Cache_Get_Mode
SAGA_API_DLL_EXPORT int SG_Grid_Cache_Get_Mode(void)
Definition: grid_memory.cpp:110
CSG_Grid_Stack::operator[]
const TSG_Point_Int & operator[](size_t i) const
Definition: grid.h:1046
CSG_Table
Definition: table.h:283
CSG_Grid_System::Get_xFromSave
int Get_xFromSave(int Direction, int x) const
Definition: grid.h:343
CSG_Grid::Set_NoData
virtual void Set_NoData(int x, int y)
Definition: grid.h:702
CSG_Data_Object::Get_Update_Flag
bool Get_Update_Flag(void)
Definition: dataobject.h:286
CSG_Grid::Get_YRange
double Get_YRange(bool bCells=false) const
Definition: grid.h:550
SG_ROUND_TO_DWORD
#define SG_ROUND_TO_DWORD(x)
Definition: mat_tools.h:154
CSG_Grid_Cell_Addressor::Get_Y
int Get_Y(int Index, int Offset=0) const
Definition: grid.h:1137
CSG_Table_Record::asInt
int asInt(int Field) const
Definition: table_record.cpp:494
CSG_Grid::Set_Value
virtual void Set_Value(int x, int y, double Value, bool bScaled=true)
Definition: grid.h:820
CSG_Grid::Save
virtual bool Save(const char *File, int Format=0)
Definition: grid.h:507
CSG_Grid_System::Get_Extent
const CSG_Rect & Get_Extent(bool bCells=false) const
Definition: grid.h:238
GRID_OPERATION_Division
@ GRID_OPERATION_Division
Definition: grid.h:178
SG_Char
#define SG_Char
Definition: api_core.h:536
TSG_Data_Object_Type
TSG_Data_Object_Type
Definition: dataobject.h:117
CSG_Grid_Cell_Addressor::Get_Values
bool Get_Values(int Index, int &x, int &y, double &Distance, double &Weight, bool bOffset=false) const
Definition: grid.h:1140
CSG_String
Definition: api_core.h:563
SG_Grid_Cache_Get_Threshold
SAGA_API_DLL_EXPORT sLong SG_Grid_Cache_Get_Threshold(void)
Definition: grid_memory.cpp:139
GRID_RESAMPLING_Majority
@ GRID_RESAMPLING_Majority
Definition: grid.h:166
CSG_Grid::asLong
virtual sLong asLong(int x, int y, bool bScaled=true) const
Definition: grid.h:759
GRID_RESAMPLING_Mean_Nodes
@ GRID_RESAMPLING_Mean_Nodes
Definition: grid.h:162
CSG_Grid::asDouble
virtual double asDouble(sLong i, bool bScaled=true) const
Definition: grid.h:765
SSG_Point_Int
Definition: geo_tools.h:418
CSG_Grid_Cell_Addressor::Get_X
int Get_X(int Index, int Offset=0) const
Definition: grid.h:1136
CSG_Grid::Get_NX
int Get_NX(void) const
Definition: grid.h:535
GRID_FILE_KEY_UNITNAME
@ GRID_FILE_KEY_UNITNAME
Definition: grid.h:104
CSG_Grid::asFloat
virtual float asFloat(int x, int y, bool bScaled=true) const
Definition: grid.h:761
CSG_Grid_System::Fit_to_Grid_System
TSG_Point Fit_to_Grid_System(TSG_Point ptWorld) const
Aligns the world coordinate ptWorld to the rows and columns of the grid system and returns it.
Definition: grid.h:265
SSG_Point::x
double x
Definition: geo_tools.h:129
CSG_Grid_Cell_Addressor::is_Square
bool is_Square(void) const
Definition: grid.h:1118
CSG_Grid::Get_Memory_Size_MB
double Get_Memory_Size_MB(void) const
Definition: grid.h:602
N_MEGABYTE_BYTES
#define N_MEGABYTE_BYTES
Definition: mat_tools.h:117
SG_DATATYPE_Short
@ SG_DATATYPE_Short
Definition: api_core.h:998
CSG_Grid_System::Get_xWorld_to_Grid
int Get_xWorld_to_Grid(double xWorld) const
Definition: grid.h:290
CSG_Grid_System::Get_xFrom
static int Get_xFrom(int Direction, int x=0)
Definition: grid.h:338
SG_ROUND_TO_SHORT
#define SG_ROUND_TO_SHORT(x)
Definition: mat_tools.h:153
GRID_FILE_KEY_CELLCOUNT_X
@ GRID_FILE_KEY_CELLCOUNT_X
Definition: grid.h:111
GRID_FILE_KEY_Z_OFFSET
@ GRID_FILE_KEY_Z_OFFSET
Definition: grid.h:115
CSG_Grid::Get_Extent
const CSG_Rect & Get_Extent(bool bCells=false) const
Definition: grid.h:542
SSG_Point_Int::y
int y
Definition: geo_tools.h:419
SSG_Point::y
double y
Definition: geo_tools.h:129
CSG_Grid::is_Cached
bool is_Cached(void) const
Definition: grid.h:605
CSG_Grid
Definition: grid.h:473
CSG_Grid_System::Get_World_to_Grid
bool Get_World_to_Grid(int &xGrid, int &yGrid, double xWorld, double yWorld) const
Definition: grid.h:293
CSG_Grid_Stack::Pop
virtual bool Pop(int &x, int &y)
Definition: grid.h:1065
SG_DATATYPE_Bit
@ SG_DATATYPE_Bit
Definition: api_core.h:994
CSG_Grid_System::Get_YRange
double Get_YRange(bool bCells=false) const
Definition: grid.h:246
GRID_RESAMPLING_Minimum
@ GRID_RESAMPLING_Minimum
Definition: grid.h:164
CSG_Grid_System::Get_XRange
double Get_XRange(bool bCells=false) const
Definition: grid.h:242
CSG_Grid_Cell_Addressor::Get_Distance
double Get_Distance(int Index) const
Definition: grid.h:1138
CSG_Grid::asFloat
virtual float asFloat(sLong i, bool bScaled=true) const
Definition: grid.h:762
CSG_Grid::asLong
virtual sLong asLong(sLong i, bool bScaled=true) const
Definition: grid.h:760
CSG_Grid_Cell_Addressor::is_Annulus
bool is_Annulus(void) const
Definition: grid.h:1120
CSG_Grid::asByte
virtual BYTE asByte(sLong i, bool bScaled=true) const
Definition: grid.h:752
CSG_Grid::asByte
virtual BYTE asByte(int x, int y, bool bScaled=true) const
Definition: grid.h:751
CSG_Grid_System::Get_NX
int Get_NX(void) const
Definition: grid.h:234
CSG_Grid_Stack::Push
virtual bool Push(int x, int y)
Definition: grid.h:1049
CSG_Grid_System::Get_RowColFromIndex
bool Get_RowColFromIndex(int &x, int &y, sLong i) const
Definition: grid.h:365
CSG_Grid::asChar
virtual char asChar(int x, int y, bool bScaled=true) const
Definition: grid.h:753
CSG_Grid_Cell_Addressor::Get_Radius
double Get_Radius(bool bOuter=true) const
Definition: grid.h:1129
CSG_Parameters
Definition: parameters.h:1690
CSG_Grid_Cell_Addressor::is_Circle
bool is_Circle(void) const
Definition: grid.h:1119
TSG_Data_Type
TSG_Data_Type
Definition: api_core.h:993
operator*
CSG_Vector operator*(double Scalar, const CSG_Vector &Vector)
Definition: mat_matrix.cpp:579
GRID_FILE_KEY_CELLCOUNT_Y
@ GRID_FILE_KEY_CELLCOUNT_Y
Definition: grid.h:112
CSG_Grid::asShort
virtual short asShort(sLong i, bool bScaled=true) const
Definition: grid.h:756
GRID_FILE_FORMAT_Binary
@ GRID_FILE_FORMAT_Binary
Definition: grid.h:92
GRID_FILE_KEY_Count
@ GRID_FILE_KEY_Count
Definition: grid.h:118
CSG_Grid_System::Get_yFromSave
int Get_yFromSave(int Direction, int y) const
Definition: grid.h:344
CSG_Grid::is_NoData
virtual bool is_NoData(int x, int y) const
Definition: grid.h:699
GRID_FILE_KEY_POSITION_XMIN
@ GRID_FILE_KEY_POSITION_XMIN
Definition: grid.h:109
SSG_Point_Int::x
int x
Definition: geo_tools.h:419
GRID_FILE_FORMAT_ASCII
@ GRID_FILE_FORMAT_ASCII
Definition: grid.h:93
CSG_Grid_System::Get_Neighbor_Pos
bool Get_Neighbor_Pos(int Direction, int x, int y, int &xPos, int &yPos) const
Definition: grid.h:305
CSG_Grid::Get_Extent
virtual const CSG_Rect & Get_Extent(void)
Definition: grid.h:533
CSG_Grid_System::Fit_xto_Grid_System
double Fit_xto_Grid_System(double x) const
Aligns the world coordinate x to the rows of the grid system and returns it.
Definition: grid.h:259
GRID_FILE_KEY_DATAFILE_OFFSET
@ GRID_FILE_KEY_DATAFILE_OFFSET
Definition: grid.h:106
CSG_Simple_Statistics
Definition: mat_tools.h:723
CSG_Grid_System::Get_YMin
double Get_YMin(bool bCells=false) const
Definition: grid.h:244
uLong
unsigned long long uLong
Definition: api_core.h:159
CSG_Grid_System::Get_xToSave
int Get_xToSave(int Direction, int x) const
Definition: grid.h:341
SG_DATATYPE_Char
@ SG_DATATYPE_Char
Definition: api_core.h:996
table.h
CSG_Data_Object::Destroy
virtual bool Destroy(void)
Definition: dataobject.cpp:281
CSG_Grid::asInt
virtual int asInt(int x, int y, bool bScaled=true) const
Definition: grid.h:757
SG_DATATYPE_ULong
@ SG_DATATYPE_ULong
Definition: api_core.h:1001
CSG_Grid_Stack
Definition: grid.h:1041
CSG_Data_Object::is_Valid
virtual bool is_Valid(void) const =0
CSG_Grid::Get_XMax
double Get_XMax(bool bCells=false) const
Definition: grid.h:545
CSG_Grid_System::Get_NCells
sLong Get_NCells(void) const
Definition: grid.h:236
CSG_Grid::asInt
virtual int asInt(sLong i, bool bScaled=true) const
Definition: grid.h:758
CSG_Grid::Get_NCells
sLong Get_NCells(void) const
Definition: grid.h:537
CSG_Grid_File_Info
Definition: grid.h:408
TSG_Grid_Operation
TSG_Grid_Operation
Definition: grid.h:174
CSG_Grid_System::is_InGrid
bool is_InGrid(int x, int y, int Rand) const
Definition: grid.h:347
CSG_Grid::Get_YMax
double Get_YMax(bool bCells=false) const
Definition: grid.h:549
CSG_Grid::Set_Modified
virtual void Set_Modified(bool bModified=true)
Definition: grid.h:636
SG_DATATYPE_Double
@ SG_DATATYPE_Double
Definition: api_core.h:1004
operator+
SAGA_API_DLL_EXPORT CSG_String operator+(const char *A, const CSG_String &B)
Definition: api_string.cpp:473