SAGA API  v9.6
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  CSG_Grid_System & operator = (const CSG_Grid_System &System);
251 
252  bool operator == (const CSG_Grid_System &System) const;
253  bool operator != (const CSG_Grid_System &System) const;
254 
255  bool is_Equal (const CSG_Grid_System &System) const;
256  bool is_Equal (double Cellsize, const TSG_Rect &Extent) const;
257 
258 
259  //-----------------------------------------------------
261  double Fit_xto_Grid_System (double x) const { return( Get_XMin() + m_Cellsize * Get_xWorld_to_Grid(x) ); }
262 
264  double Fit_yto_Grid_System (double y) const { return( Get_YMin() + m_Cellsize * Get_yWorld_to_Grid(y) ); }
265 
268  {
269  ptWorld.x = Fit_xto_Grid_System(ptWorld.x);
270  ptWorld.y = Fit_yto_Grid_System(ptWorld.y);
271 
272  return( ptWorld );
273  }
274 
275 
276  //-----------------------------------------------------
277  double Get_xGrid_to_World (int xGrid) const { return( Get_XMin() + xGrid * m_Cellsize ); }
278  double Get_yGrid_to_World (int yGrid) const { return( Get_YMin() + yGrid * m_Cellsize ); }
279 
280  TSG_Point Get_Grid_to_World (int xGrid, int yGrid) const
281  {
282  TSG_Point pt;
283 
284  pt.x = Get_xGrid_to_World(xGrid);
285  pt.y = Get_yGrid_to_World(yGrid);
286 
287  return( pt );
288  }
289 
290 
291  //-----------------------------------------------------
292  int Get_xWorld_to_Grid (double xWorld) const { return( (int)floor(0.5 + (xWorld - Get_XMin()) / m_Cellsize) ); }
293  int Get_yWorld_to_Grid (double yWorld) const { return( (int)floor(0.5 + (yWorld - Get_YMin()) / m_Cellsize) ); }
294 
295  bool Get_World_to_Grid (int &xGrid, int &yGrid, double xWorld, double yWorld) const
296  {
297  return( is_InGrid(xGrid = Get_xWorld_to_Grid(xWorld), yGrid = Get_yWorld_to_Grid(yWorld)) );
298  }
299 
300  bool Get_World_to_Grid (int &xGrid, int &yGrid, TSG_Point ptWorld) const
301  {
302  return( is_InGrid(xGrid = Get_xWorld_to_Grid(ptWorld.x), yGrid = Get_yWorld_to_Grid(ptWorld.y)) );
303  }
304 
305 
306  //-----------------------------------------------------
307  bool Get_Neighbor_Pos (int Direction, int x, int y, int &xPos, int &yPos) const
308  {
309  return( is_InGrid(xPos = Get_xTo(Direction, x), yPos = Get_yTo(Direction, y)) );
310  }
311 
312  static int Get_xTo (int Direction, int x = 0)
313  {
314  static int ix[8] = { 0, 1, 1, 1, 0,-1,-1,-1 };
315 
316  Direction %= 8;
317 
318  if( Direction < 0 )
319  {
320  Direction += 8;
321  }
322 
323  return( x + ix[Direction] );
324  }
325 
326  static int Get_yTo (int Direction, int y = 0)
327  {
328  static int iy[8] = { 1, 1, 0,-1,-1,-1, 0, 1 };
329 
330  Direction %= 8;
331 
332  if( Direction < 0 )
333  {
334  Direction += 8;
335  }
336 
337  return( y + iy[Direction] );
338  }
339 
340  static int Get_xFrom (int Direction, int x = 0) { return( Get_xTo(Direction + 4, x) ); }
341  static int Get_yFrom (int Direction, int y = 0) { return( Get_yTo(Direction + 4, y) ); }
342 
343  int Get_xToSave (int Direction, int x) const { return( (x = Get_xTo (Direction, x)) < 0 ? 0 : (x >= m_NX ? m_NX - 1 : x) ); }
344  int Get_yToSave (int Direction, int y) const { return( (y = Get_yTo (Direction, y)) < 0 ? 0 : (y >= m_NY ? m_NY - 1 : y) ); }
345  int Get_xFromSave (int Direction, int x) const { return( (x = Get_xFrom(Direction, x)) < 0 ? 0 : (x >= m_NX ? m_NX - 1 : x) ); }
346  int Get_yFromSave (int Direction, int y) const { return( (y = Get_yFrom(Direction, y)) < 0 ? 0 : (y >= m_NY ? m_NY - 1 : y) ); }
347 
348  bool is_InGrid (int x, int y) const { return( x >= 0 && x < m_NX && y >= 0 && y < m_NY ); }
349  bool is_InGrid (int x, int y, int Rand) const { return( x >= Rand && x < m_NX - Rand && y >= Rand && y < m_NY - Rand ); }
350 
351  double Get_Length (int Direction) const { return( Direction % 2 ? m_Diagonal : m_Cellsize ); }
352  static double Get_UnitLength (int Direction) { return( Direction % 2 ? sqrt(2.0) : 1.0 ); }
353 
354  static int Set_Precision (int Decimals);
355  static int Get_Precision (void);
356 
357  sLong Get_IndexFromRowCol (int x, int y) const
358  {
359  if( m_NX > 0 )
360  {
361  return( (sLong)y * m_NX + x );
362  }
363 
364  return( -1 );
365  }
366 
367  bool Get_RowColFromIndex (int &x, int &y, sLong i) const
368  {
369  if( m_NX > 0 )
370  {
371  x = (int)(i % m_NX);
372  y = (int)(i / m_NX);
373 
374  return( true );
375  }
376 
377  return( false );
378  }
379 
380 
381 private:
382 
383  int m_NX, m_NY;
384 
385  sLong m_NCells;
386 
387  double m_Cellsize, m_Cellarea, m_Diagonal;
388 
389  CSG_Rect m_Extent, m_Extent_Cells;
390 
391  CSG_String m_Name;
392 
393  static int m_Precision;
394 
395 };
396 
397 
399 // //
400 // CSG_Grid //
401 // //
403 
404 //---------------------------------------------------------
408 //---------------------------------------------------------
410 {
411 //---------------------------------------------------------
412 public:
413 
414  //-----------------------------------------------------
415  CSG_Grid_File_Info(void);
416 
418  bool Create (const CSG_Grid_File_Info &Info);
419 
420  CSG_Grid_File_Info (const CSG_String &File);
421  bool Create (const CSG_String &File);
422 
423  CSG_Grid_File_Info (CSG_File &Stream);
424  bool Create (CSG_File &Stream);
425 
426  CSG_Grid_File_Info (const CSG_Grid &Grid);
427  bool Create (const CSG_Grid &Grid);
428 
429  bool Save (const CSG_String &File , bool bBinary = true);
430  bool Save (const CSG_File &Stream, bool bBinary = true);
431 
432  static bool Save (const CSG_String &File , const CSG_Grid &Grid, bool bBinary = true);
433  static bool Save (const CSG_File &Stream, const CSG_Grid &Grid, bool bBinary = true);
434 
435  bool Save_AUX_XML (const CSG_String &File);
436  bool Save_AUX_XML (CSG_File &Stream);
437 
438  //-----------------------------------------------------
439  bool m_bFlip, m_bSwapBytes;
440 
442 
443  double m_zScale, m_zOffset, m_NoData[2];
444 
446 
447  CSG_String m_Name, m_Description, m_Unit, m_Data_File;
448 
450 
452 
453 
454 private:
455 
456  void _On_Construction (void);
457 
458  int _Get_Key (CSG_File &Stream, CSG_String &Line);
459 
460 };
461 
462 
464 // //
465 // CSG_Grid //
466 // //
468 
469 //---------------------------------------------------------
473 //---------------------------------------------------------
475 {
476 //---------------------------------------------------------
477 public:
478 
479  //-----------------------------------------------------
480  CSG_Grid(void);
481 
482  CSG_Grid (const CSG_Grid &Grid);
483  bool Create (const CSG_Grid &Grid);
484 
485  CSG_Grid (const CSG_String &File , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false, bool bLoadData = true);
486  bool Create (const CSG_String &File , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false, bool bLoadData = true);
487  CSG_Grid (const char *File , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false, bool bLoadData = true);
488  bool Create (const char *File , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false, bool bLoadData = true);
489  CSG_Grid (const wchar_t *File , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false, bool bLoadData = true);
490  bool Create (const wchar_t *File , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false, bool bLoadData = true);
491 
492  CSG_Grid (CSG_Grid *pGrid , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false);
493  bool Create (CSG_Grid *pGrid , TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false);
494 
495  CSG_Grid (const CSG_Grid_System &System, TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false);
496  bool Create (const CSG_Grid_System &System, TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false);
497 
498  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);
499  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);
500 
501 
502  //-----------------------------------------------------
503  virtual ~CSG_Grid(void);
504 
505  virtual bool Destroy (void);
506 
507 
508  //-----------------------------------------------------
509  virtual bool Save (const char *File, int Format = 0) { return( Save(CSG_String(File), Format) ); }
510  virtual bool Save (const wchar_t *File, int Format = 0) { return( Save(CSG_String(File), Format) ); }
511  virtual bool Save (const CSG_String &File, int Format = 0);
512 
513  //-----------------------------------------------------
516  virtual TSG_Data_Object_Type Get_ObjectType (void) const { return( SG_DATAOBJECT_TYPE_Grid ); }
517 
518  //-----------------------------------------------------
519  // Data-Info...
520 
521  TSG_Data_Type Get_Type (void) const { return( m_Type ); }
522 
523  int Get_nValueBytes (void) const { return( (int)m_nBytes_Value ); }
524  int Get_nLineBytes (void) const { return( (int)m_nBytes_Line ); }
525 
526  void Set_Unit (const CSG_String &Unit);
527  const CSG_String & Get_Unit (void) const { return( m_Unit ); }
528 
529 
530  //-----------------------------------------------------
531  // Georeference...
532 
533  const CSG_Grid_System & Get_System (void) const { return( m_System ); }
534 
535  virtual const CSG_Rect & Get_Extent (void) { return( m_System.Get_Extent() ); }
536 
537  int Get_NX (void) const { return( m_System.Get_NX() ); }
538  int Get_NY (void) const { return( m_System.Get_NY() ); }
539  sLong Get_NCells (void) const { return( m_System.Get_NCells() ); }
540 
541  double Get_Cellsize (void) const { return( m_System.Get_Cellsize() ); }
542  double Get_Cellarea (void) const { return( m_System.Get_Cellarea() ); }
543 
544  const CSG_Rect & Get_Extent (bool bCells = false) const { return( m_System.Get_Extent(bCells) ); }
545 
546  double Get_XMin (bool bCells = false) const { return( m_System.Get_XMin (bCells) ); }
547  double Get_XMax (bool bCells = false) const { return( m_System.Get_XMax (bCells) ); }
548  double Get_XRange (bool bCells = false) const { return( m_System.Get_XRange(bCells) ); }
549 
550  double Get_YMin (bool bCells = false) const { return( m_System.Get_YMin (bCells) ); }
551  double Get_YMax (bool bCells = false) const { return( m_System.Get_YMax (bCells) ); }
552  double Get_YRange (bool bCells = false) const { return( m_System.Get_YRange(bCells) ); }
553 
554 
555  //-----------------------------------------------------
556  // Values...
557 
558  void Set_Scaling (double Scale = 1.0, double Offset = 0.0);
559  double Get_Scaling (void) const;
560  double Get_Offset (void) const;
561  bool is_Scaled (void) const { return( m_zScale != 1.0 || m_zOffset != 0.0 ); }
562 
563  double Get_Mean (void);
564  double Get_Min (void);
565  double Get_Max (void);
566  double Get_Range (void);
567  double Get_StdDev (void);
568  double Get_Variance (void);
569  double Get_Quantile (double Quantile, bool bFromHistogram = true);
570  double Get_Percentile (double Percentile, bool bFromHistogram = true);
571 
572  const CSG_Simple_Statistics & Get_Statistics (void);
573  bool Get_Statistics (const CSG_Rect &rWorld, CSG_Simple_Statistics &Statistics, bool bHoldValues = false) const;
574 
575  const CSG_Histogram & Get_Histogram (size_t nClasses = 0);
576  bool Get_Histogram (const CSG_Rect &rWorld, CSG_Histogram &Histogram, size_t nClasses = 0) const;
577 
578  sLong Get_Data_Count (void);
579  sLong Get_NoData_Count (void);
580 
581 
582  //-----------------------------------------------------
583  // Checks...
584 
585  virtual bool is_Valid (void) const;
586 
587  TSG_Intersection is_Intersecting (const CSG_Rect &Extent) const;
588  TSG_Intersection is_Intersecting (const TSG_Rect &Extent) const;
589  TSG_Intersection is_Intersecting (double xMin, double yMin, double xMax, double yMax) const;
590 
591  bool is_Compatible (CSG_Grid *pGrid) const;
592  bool is_Compatible (const CSG_Grid_System &System) const;
593  bool is_Compatible (int NX, int NY, double Cellsize, double xMin, double yMin) const;
594 
595  bool is_InGrid (int x, int y, bool bCheckNoData = true) const { return( m_System.is_InGrid(x, y) && (!bCheckNoData || !is_NoData(x, y)) ); }
596  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))) ); }
597  bool is_InGrid_byPos (const TSG_Point &p, bool bCheckNoData = true) const { return( is_InGrid_byPos(p.x, p.y, bCheckNoData) ); }
598 
599 
600  //-----------------------------------------------------
601  // Memory...
602 
603  sLong Get_Memory_Size (void) const { return( Get_NCells() * Get_nValueBytes() ); }
604  double Get_Memory_Size_MB (void) const { return( (double)Get_Memory_Size() / N_MEGABYTE_BYTES ); }
605 
606  bool Set_Cache (bool bOn);
607  bool is_Cached (void) const { return( m_Cache_Stream != NULL ); }
608 
609 
610  //-----------------------------------------------------
611  // Operations...
612 
613  void Assign_NoData (void);
614 
615  virtual bool Assign (double Value = 0.0);
616  virtual bool Assign (CSG_Data_Object *pObject);
617  virtual bool Assign (CSG_Grid *pGrid, TSG_Grid_Resampling Interpolation);
618 
619  void Flip (void);
620  void Mirror (void);
621  void Invert (void);
622 
623  bool Normalise (void);
624  bool DeNormalise (double Minimum, double Maximum);
625 
626  bool Standardise (void);
627  bool DeStandardise (double Mean, double StdDev);
628 
629  int Get_Gradient_NeighborDir (int x, int y, bool bDown = true, bool bNoEdges = true) const;
630  bool Get_Gradient (int x, int y , double &Slope, double &Aspect) const;
631  bool Get_Gradient (double x, double y, double &Slope, double &Aspect, TSG_Grid_Resampling Interpolation) const;
632  bool Get_Gradient (const TSG_Point &p, double &Slope, double &Aspect, TSG_Grid_Resampling Interpolation) const;
633 
634 
635  //-----------------------------------------------------
636  // Set update flag when modified...
637 
638  virtual void Set_Modified (bool bModified = true)
639  {
641 
642  if( bModified )
643  {
644  Set_Update_Flag();
645  }
646  }
647 
648 
649  //-----------------------------------------------------
650  // Index...
651 
652  bool Set_Index (bool bOn = true)
653  {
654  if( !bOn )
655  {
656  SG_FREE_SAFE(m_Index);
657 
658  return( true );
659  }
660 
661  return( _Get_Index() );
662  }
663 
664  sLong Get_Sorted (sLong Position, bool bDown = true, bool bCheckNoData = true)
665  {
666  if( Position >= 0 && Position < Get_NCells() && _Get_Index() )
667  {
668  Position = m_Index[bDown ? Get_NCells() - Position - 1 : Position];
669 
670  if( !bCheckNoData || !is_NoData(Position) )
671  {
672  return( Position );
673  }
674  }
675 
676  return( -1 );
677  }
678 
679  bool Get_Sorted (sLong Position, sLong &i, bool bDown = true, bool bCheckNoData = true)
680  {
681  return( (i = Get_Sorted(Position, bDown, bCheckNoData)) >= 0 );
682  }
683 
684  bool Get_Sorted (sLong Position, int &x, int &y, bool bDown = true, bool bCheckNoData = true)
685  {
686  if( (Position = Get_Sorted(Position, bDown, bCheckNoData)) >= 0 )
687  {
688  x = (int)(Position % Get_NX());
689  y = (int)(Position / Get_NX());
690 
691  return( true );
692  }
693 
694  return( false );
695  }
696 
697 
698  //-----------------------------------------------------
699  // No Data Value...
700 
701  virtual bool is_NoData (int x, int y) const { return( is_NoData_Value(asDouble(x, y, false)) ); }
702  virtual bool is_NoData (sLong i) const { return( is_NoData_Value(asDouble( i, false)) ); }
703 
704  virtual void Set_NoData (int x, int y) { Set_Value(x, y, Get_NoData_Value(), false); }
705  virtual void Set_NoData (sLong i) { Set_Value( i, Get_NoData_Value(), false); }
706 
707 
708  //-----------------------------------------------------
709  // Operators...
710 
711  virtual CSG_Grid & operator = (const CSG_Grid &Grid);
712  virtual CSG_Grid & operator = (double Value);
713 
714  virtual CSG_Grid operator + (const CSG_Grid &Grid) const;
715  virtual CSG_Grid operator + (double Value) const;
716  virtual CSG_Grid & operator += (const CSG_Grid &Grid);
717  virtual CSG_Grid & operator += (double Value);
718  virtual CSG_Grid & Add (const CSG_Grid &Grid);
719  virtual CSG_Grid & Add (double Value);
720 
721  virtual CSG_Grid operator - (const CSG_Grid &Grid) const;
722  virtual CSG_Grid operator - (double Value) const;
723  virtual CSG_Grid & operator -= (const CSG_Grid &Grid);
724  virtual CSG_Grid & operator -= (double Value);
725  virtual CSG_Grid & Subtract (const CSG_Grid &Grid);
726  virtual CSG_Grid & Subtract (double Value);
727 
728  virtual CSG_Grid operator * (const CSG_Grid &Grid) const;
729  virtual CSG_Grid operator * (double Value) const;
730  virtual CSG_Grid & operator *= (const CSG_Grid &Grid);
731  virtual CSG_Grid & operator *= (double Value);
732  virtual CSG_Grid & Multiply (const CSG_Grid &Grid);
733  virtual CSG_Grid & Multiply (double Value);
734 
735  virtual CSG_Grid operator / (const CSG_Grid &Grid) const;
736  virtual CSG_Grid operator / (double Value) const;
737  virtual CSG_Grid & operator /= (const CSG_Grid &Grid);
738  virtual CSG_Grid & operator /= (double Value);
739  virtual CSG_Grid & Divide (const CSG_Grid &Grid);
740  virtual CSG_Grid & Divide (double Value);
741 
742  virtual double operator () (int x, int y) const { return( asDouble(x, y) ); }
743 
744 
745  //-----------------------------------------------------
746  // Get Value...
747 
748  double Get_Value (double x, double y, TSG_Grid_Resampling Resampling = GRID_RESAMPLING_BSpline , bool bByteWise = false) const;
749  double Get_Value (const TSG_Point &p, TSG_Grid_Resampling Resampling = GRID_RESAMPLING_BSpline , bool bByteWise = false) const;
750  bool Get_Value (double x, double y, double &Value, TSG_Grid_Resampling Resampling = GRID_RESAMPLING_BSpline, bool bNoData = false, bool bByteWise = false) const;
751  bool Get_Value (const TSG_Point &p, double &Value, TSG_Grid_Resampling Resampling = GRID_RESAMPLING_BSpline, bool bNoData = false, bool bByteWise = false) const;
752 
753  virtual BYTE asByte (int x, int y, bool bScaled = true) const { return( SG_ROUND_TO_BYTE (asDouble(x, y, bScaled)) ); }
754  virtual BYTE asByte ( sLong i, bool bScaled = true) const { return( SG_ROUND_TO_BYTE (asDouble( i, bScaled)) ); }
755  virtual char asChar (int x, int y, bool bScaled = true) const { return( SG_ROUND_TO_CHAR (asDouble(x, y, bScaled)) ); }
756  virtual char asChar ( sLong i, bool bScaled = true) const { return( SG_ROUND_TO_CHAR (asDouble( i, bScaled)) ); }
757  virtual short asShort (int x, int y, bool bScaled = true) const { return( SG_ROUND_TO_SHORT(asDouble(x, y, bScaled)) ); }
758  virtual short asShort ( sLong i, bool bScaled = true) const { return( SG_ROUND_TO_SHORT(asDouble( i, bScaled)) ); }
759  virtual int asInt (int x, int y, bool bScaled = true) const { return( SG_ROUND_TO_INT (asDouble(x, y, bScaled)) ); }
760  virtual int asInt ( sLong i, bool bScaled = true) const { return( SG_ROUND_TO_INT (asDouble( i, bScaled)) ); }
761  virtual sLong asLong (int x, int y, bool bScaled = true) const { return( SG_ROUND_TO_SLONG(asDouble(x, y, bScaled)) ); }
762  virtual sLong asLong ( sLong i, bool bScaled = true) const { return( SG_ROUND_TO_SLONG(asDouble( i, bScaled)) ); }
763  virtual float asFloat (int x, int y, bool bScaled = true) const { return( (float) (asDouble(x, y, bScaled)) ); }
764  virtual float asFloat ( sLong i, bool bScaled = true) const { return( (float) (asDouble( i, bScaled)) ); }
765 
766  //-----------------------------------------------------
767  virtual double asDouble( sLong i, bool bScaled = true) const
768  {
769  return( asDouble((int)(i % Get_NX()), (int)(i / Get_NX()), bScaled) );
770  }
771 
772  virtual double asDouble(int x, int y, bool bScaled = true) const
773  {
774  double Value;
775 
776  if( is_Cached() )
777  {
778  Value = _Cache_Get_Value(x, y);
779  }
780  else switch( m_Type )
781  {
782  case SG_DATATYPE_Float : Value = (double)((float **)m_Values)[y][x]; break;
783  case SG_DATATYPE_Double: Value = (double)((double **)m_Values)[y][x]; break;
784  case SG_DATATYPE_Byte : Value = (double)((BYTE **)m_Values)[y][x]; break;
785  case SG_DATATYPE_Char : Value = (double)((char **)m_Values)[y][x]; break;
786  case SG_DATATYPE_Word : Value = (double)((WORD **)m_Values)[y][x]; break;
787  case SG_DATATYPE_Short : Value = (double)((short **)m_Values)[y][x]; break;
788  case SG_DATATYPE_DWord : Value = (double)((DWORD **)m_Values)[y][x]; break;
789  case SG_DATATYPE_Int : Value = (double)((int **)m_Values)[y][x]; break;
790  case SG_DATATYPE_Long : Value = (double)((sLong **)m_Values)[y][x]; break;
791  case SG_DATATYPE_ULong : Value = (double)((uLong **)m_Values)[y][x]; break;
792  case SG_DATATYPE_Bit : Value = (double)(((BYTE **)m_Values)[y][x / 8] & m_Bitmask[x % 8]) == 0 ? 0.0 : 1.0; break;
793 
794  default:
795  return( 0.0 );
796  }
797 
798  if( bScaled && is_Scaled() )
799  {
800  Value = m_zOffset + m_zScale * Value;
801  }
802 
803  return( Value );
804  }
805 
806 
807  //-----------------------------------------------------
808  // Set Value...
809 
810  virtual void Add_Value(int x, int y, double Value) { Set_Value(x, y, asDouble(x, y) + Value ); }
811  virtual void Add_Value(sLong i, double Value) { Set_Value( i, asDouble( i) + Value ); }
812 
813  virtual void Mul_Value(int x, int y, double Value) { Set_Value(x, y, asDouble(x, y) * Value ); }
814  virtual void Mul_Value(sLong i, double Value) { Set_Value( i, asDouble( i) * Value ); }
815 
816  //-----------------------------------------------------
817  virtual void Set_Value(sLong i, double Value, bool bScaled = true)
818  {
819  Set_Value((int)(i % Get_NX()), (int)(i / Get_NX()), Value, bScaled);
820  }
821 
822  virtual void Set_Value(int x, int y, double Value, bool bScaled = true)
823  {
824  if( bScaled && is_Scaled() )
825  {
826  Value = (Value - m_zOffset) / m_zScale;
827  }
828 
829  if( is_Cached() )
830  {
831  _Cache_Set_Value(x, y, Value);
832  }
833  else switch( m_Type )
834  {
835  case SG_DATATYPE_Float : ((float **)m_Values)[y][x] = (float )(Value); break;
836  case SG_DATATYPE_Double: ((double **)m_Values)[y][x] = (double )(Value); break;
837  case SG_DATATYPE_Byte : ((BYTE **)m_Values)[y][x] = SG_ROUND_TO_BYTE (Value); break;
838  case SG_DATATYPE_Char : ((char **)m_Values)[y][x] = SG_ROUND_TO_CHAR (Value); break;
839  case SG_DATATYPE_Word : ((WORD **)m_Values)[y][x] = SG_ROUND_TO_WORD (Value); break;
840  case SG_DATATYPE_Short : ((short **)m_Values)[y][x] = SG_ROUND_TO_SHORT(Value); break;
841  case SG_DATATYPE_DWord : ((DWORD **)m_Values)[y][x] = SG_ROUND_TO_DWORD(Value); break;
842  case SG_DATATYPE_Int : ((int **)m_Values)[y][x] = SG_ROUND_TO_INT (Value); break;
843  case SG_DATATYPE_Long : ((sLong **)m_Values)[y][x] = SG_ROUND_TO_SLONG(Value); break;
844  case SG_DATATYPE_ULong : ((uLong **)m_Values)[y][x] = SG_ROUND_TO_ULONG(Value); break;
845  case SG_DATATYPE_Bit : ((BYTE **)m_Values)[y][x / 8] = Value != 0.0
846  ? ((BYTE **)m_Values)[y][x / 8] | m_Bitmask[x % 8]
847  : ((BYTE **)m_Values)[y][x / 8] & (~m_Bitmask[x % 8]);
848  break;
849 
850  default:
851  return;
852  }
853 
854  Set_Modified();
855  }
856 
857  //-----------------------------------------------------
858  CSG_Vector Get_Row (int y) const;
859  bool Set_Row (int y, const CSG_Vector &Values);
860 
861 
862 //---------------------------------------------------------
863 protected:
864 
865  virtual bool On_Update (void);
866  virtual bool On_Reload (void);
867  virtual bool On_Delete (void);
868 
869 
870 //---------------------------------------------------------
871 private:
872 
873  void **m_Values;
874 
875  bool m_Cache_bTemp, m_Cache_bSwap, m_Cache_bFlip;
876 
877  size_t m_nBytes_Value, m_nBytes_Line;
878 
879  sLong *m_Index, m_Cache_Offset;
880 
881  double m_zOffset, m_zScale;
882 
883  FILE *m_Cache_Stream;
884 
885  TSG_Data_Type m_Type;
886 
887  CSG_String m_Unit, m_Cache_File;
888 
889  CSG_Simple_Statistics m_Statistics;
890 
891  CSG_Histogram m_Histogram;
892 
893  CSG_Grid_System m_System;
894 
895 
896  //-----------------------------------------------------
897  static BYTE m_Bitmask[8];
898 
899 
900  //-----------------------------------------------------
901  void _On_Construction (void);
902 
903  bool _Set_Index (void);
904  bool _Get_Index (void)
905  {
906  if( Get_Update_Flag() )
907  {
908  Update();
909  }
910 
911  return( m_Index || _Set_Index() );
912  }
913 
914 
915  //-----------------------------------------------------
916  // Memory handling...
917 
918  bool _Memory_Create (bool bCached);
919  void _Memory_Destroy (void);
920 
921  bool _Array_Create (void);
922  void _Array_Destroy (void);
923 
924  bool _Cache_Check (void);
925  bool _Cache_Create (const CSG_String &File, TSG_Data_Type Data_Type, sLong Offset, bool bSwap, bool bFlip);
926  bool _Cache_Create (void);
927  bool _Cache_Destroy (bool bMemory_Restore);
928  void _Cache_Set_Value (int x, int y, double Value);
929  double _Cache_Get_Value (int x, int y) const;
930 
931 
932  //-----------------------------------------------------
933  // File access...
934 
935  void _Swap_Bytes (char *Bytes, int nBytes) const;
936 
937  bool _Load_External (const CSG_String &File, bool bCached, bool bLoadData);
938  bool _Load_PGSQL (const CSG_String &File, bool bCached, bool bLoadData);
939 
940  bool _Load_Native (const CSG_String &File, bool bCached, bool bLoadData);
941  bool _Save_Native (const CSG_String &File, TSG_Grid_File_Format Format);
942 
943  bool _Load_Compressed (const CSG_String &File, bool bCached, bool bLoadData);
944  bool _Save_Compressed (const CSG_String &File);
945 
946  bool _Load_Binary (CSG_File &Stream, TSG_Data_Type File_Type, bool bFlip, bool bSwapBytes);
947  bool _Save_Binary (CSG_File &Stream, TSG_Data_Type File_Type, bool bFlip, bool bSwapBytes);
948  bool _Load_ASCII (CSG_File &Stream, bool bCached, bool bFlip = false);
949  bool _Save_ASCII (CSG_File &Stream, bool bFlip = false);
950 
951  bool _Load_Surfer (const CSG_String &File, bool bCached, bool bLoadData);
952 
953 
954  //-----------------------------------------------------
955  CSG_Grid & _Operation_Arithmetic (const CSG_Grid &Grid, TSG_Grid_Operation Operation);
956  CSG_Grid & _Operation_Arithmetic (double Value , TSG_Grid_Operation Operation);
957 
958  bool _Assign_Interpolated (CSG_Grid *pSource, TSG_Grid_Resampling Interpolation);
959  bool _Assign_MeanValue (CSG_Grid *pSource, bool bAreaProportional);
960  bool _Assign_ExtremeValue (CSG_Grid *pSource, bool bMaximum);
961  bool _Assign_Majority (CSG_Grid *pSource);
962 
963 
964  //-----------------------------------------------------
965  // Interpolation subroutines...
966 
967  bool _Get_ValAtPos_NearestNeighbour (double &Value, int x, int y, double dx, double dy ) const;
968  bool _Get_ValAtPos_BiLinear (double &Value, int x, int y, double dx, double dy, bool bByteWise) const;
969  bool _Get_ValAtPos_BiCubicSpline (double &Value, int x, int y, double dx, double dy, bool bByteWise) const;
970  bool _Get_ValAtPos_BSpline (double &Value, int x, int y, double dx, double dy, bool bByteWise) const;
971 
972  double _Get_ValAtPos_BiCubicSpline (double dx, double dy, double z_xy[4][4]) const;
973  double _Get_ValAtPos_BSpline (double dx, double dy, double z_xy[4][4]) const;
974 
975  bool _Get_ValAtPos_Fill4x4Submatrix (int x, int y, double z_xy[4][4] ) const;
976  bool _Get_ValAtPos_Fill4x4Submatrix (int x, int y, double z_xy[4][4][4]) const;
977 
978 };
979 
980 
982 // //
983 // Functions //
984 // //
986 
987 //---------------------------------------------------------
988 #define SG_GRID_PTR_SAFE_SET_NODATA(g, x, y) { if( g && g->is_InGrid(x, y, false) ) { g->Set_NoData(x, y ); } }
989 #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); } }
990 
991 //---------------------------------------------------------
994 
997 
999 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);
1001 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);
1003 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);
1004 
1007 
1009 SAGA_API_DLL_EXPORT CSG_Grid * SG_Create_Grid (const CSG_Grid_System &System, TSG_Data_Type Type = SG_DATATYPE_Undefined, bool bCached = false);
1010 
1012 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);
1013 
1014 //---------------------------------------------------------
1017 
1020 
1023 
1025 SAGA_API_DLL_EXPORT void SG_Grid_Cache_Set_Threshold_MB (double nMegabytes);
1028 
1029 //---------------------------------------------------------
1033 
1034 
1036 // //
1037 // //
1038 // //
1040 
1041 //---------------------------------------------------------
1043 {
1044 public:
1046 
1047  //-----------------------------------------------------
1048  const TSG_Point_Int & operator [] (size_t i) const { return( *((TSG_Point_Int *)Get_Record(i)) ); }
1049 
1050  //-----------------------------------------------------
1051  virtual bool Push (int x, int y)
1052  {
1054 
1055  if( pPoint )
1056  {
1057  pPoint->x = x;
1058  pPoint->y = y;
1059 
1060  return( true );
1061  }
1062 
1063  return( false );
1064  }
1065 
1066  //-----------------------------------------------------
1067  virtual bool Pop (int &x, int &y)
1068  {
1070 
1071  if( pPoint )
1072  {
1073  x = pPoint->x;
1074  y = pPoint->y;
1075 
1076  return( true );
1077  }
1078 
1079  return( false );
1080  }
1081 
1082 };
1083 
1084 
1086 // //
1087 // //
1088 // //
1090 
1091 //---------------------------------------------------------
1092 #define SG_GRIDCELLADDR_PARM_SQUARE 0x01
1093 #define SG_GRIDCELLADDR_PARM_CIRCLE 0x02
1094 #define SG_GRIDCELLADDR_PARM_ANNULUS 0x04
1095 #define SG_GRIDCELLADDR_PARM_SECTOR 0x08
1096 #define SG_GRIDCELLADDR_PARM_SIZEDBL 0x10
1097 #define SG_GRIDCELLADDR_PARM_MAPUNIT 0x20
1098 #define SG_GRIDCELLADDR_PARM_WEIGHTING 0x40
1099 #define SG_GRIDCELLADDR_PARM_DEFAULT (SG_GRIDCELLADDR_PARM_SQUARE|SG_GRIDCELLADDR_PARM_CIRCLE)
1100 
1101 //---------------------------------------------------------
1103 {
1104 public:
1106 
1107  bool Destroy (void);
1108 
1109  static bool Enable_Parameters (class CSG_Parameters &Parameters);
1110  static bool Add_Parameters (class CSG_Parameters &Parameters, const CSG_String &Parent = "", int Style = SG_GRIDCELLADDR_PARM_DEFAULT);
1111  bool Set_Parameters (class CSG_Parameters &Parameters, int Type = 0);
1112 
1113  bool Set_Square (class CSG_Parameters &Parameters);
1114  bool Set_Circle (class CSG_Parameters &Parameters);
1115  bool Set_Annulus (class CSG_Parameters &Parameters);
1116  bool Set_Sector (class CSG_Parameters &Parameters);
1117 
1118  CSG_Distance_Weighting & Get_Weighting (void) { return( m_Weighting ); }
1119 
1120  bool is_Square (void) const { return( m_Type == 0 ); }
1121  bool is_Circle (void) const { return( m_Type == 1 ); }
1122  bool is_Annulus (void) const { return( m_Type == 2 ); }
1123  bool is_Sector (void) const { return( m_Type == 3 ); }
1124 
1125  bool Set_Radius (double Radius, bool bSquare = false);
1126  bool Set_Square (double Radius);
1127  bool Set_Circle (double Radius);
1128  bool Set_Annulus (double Radius_Inner, double Radius_Outer);
1129  bool Set_Sector (double Radius, double Direction, double Tolerance);
1130 
1131  double Get_Radius (bool bOuter = true) const { return( bOuter ? m_Radius : m_Radius_0 ); }
1132  double Get_Radius_Inner (void) const { return( m_Radius_0 ); }
1133  double Get_Radius_Outer (void) const { return( m_Radius ); }
1134  double Get_Direction (void) const { return( m_Direction ); }
1135  double Get_Tolerance (void) const { return( m_Tolerance ); }
1136 
1137  int Get_Count (void) const { return( (int)m_Kernel.Get_Count() ); }
1138  int Get_X (int Index, int Offset = 0) const { return( Index >= 0 && Index < m_Kernel.Get_Count() ? m_Kernel[Index].asInt (0) + Offset : Offset ); }
1139  int Get_Y (int Index, int Offset = 0) const { return( Index >= 0 && Index < m_Kernel.Get_Count() ? m_Kernel[Index].asInt (1) + Offset : Offset ); }
1140  double Get_Distance (int Index ) const { return( Index >= 0 && Index < m_Kernel.Get_Count() ? m_Kernel[Index].asDouble(2) : -1. ); }
1141  double Get_Weight (int Index ) const { return( Index >= 0 && Index < m_Kernel.Get_Count() ? m_Kernel[Index].asDouble(3) : 0. ); }
1142  bool Get_Values (int Index, int &x, int &y, double &Distance, double &Weight, bool bOffset = false) const
1143  {
1144  if( Index >= 0 && Index < m_Kernel.Get_Count() )
1145  {
1146  CSG_Table_Record &Cell = m_Kernel[Index];
1147 
1148  x = bOffset ? x + Cell.asInt(0) : Cell.asInt(0);
1149  y = bOffset ? y + Cell.asInt(1) : Cell.asInt(1);
1150  Distance = Cell.asDouble(2);
1151  Weight = Cell.asDouble(3);
1152 
1153  return( true );
1154  }
1155 
1156  return( false );
1157  }
1158 
1159 
1160 private:
1161 
1162  int m_Type;
1163 
1164  double m_Radius, m_Radius_0, m_Direction, m_Tolerance;
1165 
1166  CSG_Distance_Weighting m_Weighting;
1167 
1168  CSG_Table m_Kernel;
1169 
1170 
1171  bool _Set_Kernel (int Type, double Radius, double Radius_Inner, double Direction, double Tolerance);
1172 
1173 };
1174 
1175 
1177 // //
1178 // //
1179 // //
1181 
1182 //---------------------------------------------------------
1183 #endif // #ifndef HEADER_INCLUDED__SAGA_API__grid_H
CSG_Grid_System::Get_IndexFromRowCol
sLong Get_IndexFromRowCol(int x, int y) const
Definition: grid.h:357
CSG_Grid::Get_Type
TSG_Data_Type Get_Type(void) const
Definition: grid.h:521
CSG_Grid_File_Info::m_Offset
sLong m_Offset
Definition: grid.h:441
CSG_Grid_System::Get_xGrid_to_World
double Get_xGrid_to_World(int xGrid) const
Definition: grid.h:277
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:810
CSG_Grid::is_InGrid
bool is_InGrid(int x, int y, bool bCheckNoData=true) const
Definition: grid.h:595
CSG_Grid_System::Get_xTo
static int Get_xTo(int Direction, int x=0)
Definition: grid.h:312
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:516
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:1132
CSG_Grid_Cell_Addressor::Get_Tolerance
double Get_Tolerance(void) const
Definition: grid.h:1135
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:596
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:561
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:772
CSG_Grid::asChar
virtual char asChar(sLong i, bool bScaled=true) const
Definition: grid.h:756
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:524
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:439
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:523
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:293
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:597
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:278
CSG_Grid_System::Get_yTo
static int Get_yTo(int Direction, int y=0)
Definition: grid.h:326
GRID_RESAMPLING_Maximum
@ GRID_RESAMPLING_Maximum
Definition: grid.h:165
CSG_Grid::is_NoData
virtual bool is_NoData(sLong i) const
Definition: grid.h:702
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:449
CSG_Grid::Mul_Value
virtual void Mul_Value(int x, int y, double Value)
Definition: grid.h:813
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:1141
CSG_Grid_Cell_Addressor::is_Sector
bool is_Sector(void) const
Definition: grid.h:1123
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:533
CSG_Grid::Get_XRange
double Get_XRange(bool bCells=false) const
Definition: grid.h:548
CSG_File
Definition: api_core.h:1124
CSG_Grid_Cell_Addressor::Get_Count
int Get_Count(void) const
Definition: grid.h:1137
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:811
SG_GRIDCELLADDR_PARM_DEFAULT
#define SG_GRIDCELLADDR_PARM_DEFAULT
Definition: grid.h:1099
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:550
SG_DATATYPE_Long
@ SG_DATATYPE_Long
Definition: api_core.h:1002
CSG_Grid::Get_Cellsize
double Get_Cellsize(void) const
Definition: grid.h:541
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:652
CSG_Grid_Stack::CSG_Grid_Stack
CSG_Grid_Stack(void)
Definition: grid.h:1045
CSG_Grid::Get_Cellarea
double Get_Cellarea(void) const
Definition: grid.h:542
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:300
CSG_Grid_File_Info::m_Unit
CSG_String m_Unit
Definition: grid.h:447
CSG_Grid_System::Get_yToSave
int Get_yToSave(int Direction, int y) const
Definition: grid.h:344
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:1118
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:603
CSG_Grid::Set_Value
virtual void Set_Value(sLong i, double Value, bool bScaled=true)
Definition: grid.h:817
CSG_Grid_Cell_Addressor
Definition: grid.h:1103
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:445
CSG_Grid::Get_Sorted
bool Get_Sorted(sLong Position, int &x, int &y, bool bDown=true, bool bCheckNoData=true)
Definition: grid.h:684
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:527
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:814
CSG_Distance_Weighting
Definition: geo_tools.h:710
CSG_Grid::Get_NY
int Get_NY(void) const
Definition: grid.h:538
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:546
CSG_Grid::Save
virtual bool Save(const wchar_t *File, int Format=0)
Definition: grid.h:510
CSG_Grid_System::Get_Grid_to_World
TSG_Point Get_Grid_to_World(int xGrid, int yGrid) const
Definition: grid.h:280
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:352
CSG_Grid_Cell_Addressor::Get_Radius_Outer
double Get_Radius_Outer(void) const
Definition: grid.h:1133
CSG_Grid_File_Info::m_Projection
CSG_Projection m_Projection
Definition: grid.h:451
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:348
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:264
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:679
CSG_Grid::asShort
virtual short asShort(int x, int y, bool bScaled=true) const
Definition: grid.h:757
CSG_Grid::Get_Sorted
sLong Get_Sorted(sLong Position, bool bDown=true, bool bCheckNoData=true)
Definition: grid.h:664
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:443
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:351
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:341
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:705
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:1134
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:1048
CSG_Table
Definition: table.h:283
CSG_Grid_System::Get_xFromSave
int Get_xFromSave(int Direction, int x) const
Definition: grid.h:345
CSG_Grid::Set_NoData
virtual void Set_NoData(int x, int y)
Definition: grid.h:704
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:552
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:1139
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:822
CSG_Grid::Save
virtual bool Save(const char *File, int Format=0)
Definition: grid.h:509
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:1142
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:761
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:767
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:1138
CSG_Grid::Get_NX
int Get_NX(void) const
Definition: grid.h:537
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:763
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:267
SSG_Point::x
double x
Definition: geo_tools.h:129
CSG_Grid_Cell_Addressor::is_Square
bool is_Square(void) const
Definition: grid.h:1120
CSG_Grid::Get_Memory_Size_MB
double Get_Memory_Size_MB(void) const
Definition: grid.h:604
N_MEGABYTE_BYTES
#define N_MEGABYTE_BYTES
Definition: mat_tools.h:115
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:292
CSG_Grid_System::Get_xFrom
static int Get_xFrom(int Direction, int x=0)
Definition: grid.h:340
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:544
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:607
CSG_Grid
Definition: grid.h:475
CSG_Grid_System::Get_World_to_Grid
bool Get_World_to_Grid(int &xGrid, int &yGrid, double xWorld, double yWorld) const
Definition: grid.h:295
CSG_Grid_Stack::Pop
virtual bool Pop(int &x, int &y)
Definition: grid.h:1067
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:1140
CSG_Grid::asFloat
virtual float asFloat(sLong i, bool bScaled=true) const
Definition: grid.h:764
CSG_Grid::asLong
virtual sLong asLong(sLong i, bool bScaled=true) const
Definition: grid.h:762
CSG_Grid_Cell_Addressor::is_Annulus
bool is_Annulus(void) const
Definition: grid.h:1122
CSG_Grid::asByte
virtual BYTE asByte(sLong i, bool bScaled=true) const
Definition: grid.h:754
CSG_Grid::asByte
virtual BYTE asByte(int x, int y, bool bScaled=true) const
Definition: grid.h:753
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:1051
CSG_Grid_System::Get_RowColFromIndex
bool Get_RowColFromIndex(int &x, int &y, sLong i) const
Definition: grid.h:367
CSG_Grid::asChar
virtual char asChar(int x, int y, bool bScaled=true) const
Definition: grid.h:755
CSG_Grid_Cell_Addressor::Get_Radius
double Get_Radius(bool bOuter=true) const
Definition: grid.h:1131
CSG_Parameters
Definition: parameters.h:1690
CSG_Grid_Cell_Addressor::is_Circle
bool is_Circle(void) const
Definition: grid.h:1121
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:758
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:346
CSG_Grid::is_NoData
virtual bool is_NoData(int x, int y) const
Definition: grid.h:701
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:307
CSG_Grid::Get_Extent
virtual const CSG_Rect & Get_Extent(void)
Definition: grid.h:535
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:261
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:343
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:759
SG_DATATYPE_ULong
@ SG_DATATYPE_ULong
Definition: api_core.h:1001
CSG_Grid_Stack
Definition: grid.h:1043
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:547
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:760
CSG_Grid::Get_NCells
sLong Get_NCells(void) const
Definition: grid.h:539
CSG_Grid_File_Info
Definition: grid.h:410
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:349
CSG_Grid::Get_YMax
double Get_YMax(bool bCells=false) const
Definition: grid.h:551
CSG_Grid::Set_Modified
virtual void Set_Modified(bool bModified=true)
Definition: grid.h:638
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