|
SAGA API v2.0.8
|
#include <grid.h>
Public Member Functions | |
| CSG_Grid_System (void) | |
| CSG_Grid_System (const CSG_Grid_System &System) | |
| CSG_Grid_System (double Cellsize, const CSG_Rect &Extent) | |
| CSG_Grid_System (double Cellsize, double xMin, double yMin, double xMax, double yMax) | |
| CSG_Grid_System (double Cellsize, double xMin, double yMin, int NX, int NY) | |
| ~CSG_Grid_System (void) | |
| bool | is_Valid (void) const |
| const SG_Char * | Get_Name (bool bShort=true) |
| double | Get_Cellsize (void) const |
| double | Get_Cellarea (void) const |
| int | Get_NX (void) const |
| int | Get_NY (void) const |
| long | Get_NCells (void) const |
| const CSG_Rect & | Get_Extent (bool bCells=false) const |
| double | Get_XMin (bool bCells=false) const |
| double | Get_XMax (bool bCells=false) const |
| double | Get_XRange (bool bCells=false) const |
| double | Get_YMin (bool bCells=false) const |
| double | Get_YMax (bool bCells=false) const |
| double | Get_YRange (bool bCells=false) const |
| bool | operator== (const CSG_Grid_System &System) const |
| void | operator= (const CSG_Grid_System &System) |
| bool | Assign (const CSG_Grid_System &System) |
| bool | Assign (double Cellsize, const CSG_Rect &Extent) |
| bool | Assign (double Cellsize, double xMin, double yMin, double xMax, double yMax) |
| bool | Assign (double Cellsize, double xMin, double yMin, int NX, int NY) |
| bool | is_Equal (const CSG_Grid_System &System) const |
| bool | is_Equal (double Cellsize, const TSG_Rect &Extent) const |
| double | Fit_xto_Grid_System (double x) const |
| Aligns the world coordinate x to the rows of the grid system and returns it. | |
| double | Fit_yto_Grid_System (double y) const |
| Aligns the world coordinate y to the columns of the grid system and returns it. | |
| 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. | |
| double | Get_xGrid_to_World (int xGrid) const |
| double | Get_yGrid_to_World (int yGrid) const |
| TSG_Point | Get_Grid_to_World (int xGrid, int yGrid) const |
| int | Get_xWorld_to_Grid (double xWorld) const |
| int | Get_yWorld_to_Grid (double yWorld) const |
| bool | Get_World_to_Grid (int &xGrid, int &yGrid, double xWorld, double yWorld) const |
| bool | Get_World_to_Grid (int &xGrid, int &yGrid, TSG_Point ptWorld) const |
| bool | Get_Neighbor_Pos (int Direction, int x, int y, int &xPos, int &yPos) const |
| int | Get_xToSave (int Direction, int x) const |
| int | Get_yToSave (int Direction, int y) const |
| int | Get_xFromSave (int Direction, int x) const |
| int | Get_yFromSave (int Direction, int y) const |
| bool | is_InGrid (int x, int y) const |
| bool | is_InGrid (int x, int y, int Rand) const |
| double | Get_Length (int Direction) const |
Static Public Member Functions | |
| static int | Get_xTo (int Direction, int x=0) |
| static int | Get_yTo (int Direction, int y=0) |
| static int | Get_xFrom (int Direction, int x=0) |
| static int | Get_yFrom (int Direction, int y=0) |
| static double | Get_UnitLength (int Direction) |
CSG_Grid_System is used by the CSG_Grid class to provide information about the number of rows and columns, the cell size and the georeference, which define the grid. It offers various functions, which help when working with grids.
| CSG_Grid_System::CSG_Grid_System | ( | void | ) |
Definition at line 75 of file grid_system.cpp.
| CSG_Grid_System::CSG_Grid_System | ( | const CSG_Grid_System & | System | ) |
Definition at line 83 of file grid_system.cpp.
References Assign().
| CSG_Grid_System::CSG_Grid_System | ( | double | Cellsize, |
| const CSG_Rect & | Extent | ||
| ) |
Definition at line 91 of file grid_system.cpp.
References Assign().
| CSG_Grid_System::CSG_Grid_System | ( | double | Cellsize, |
| double | xMin, | ||
| double | yMin, | ||
| double | xMax, | ||
| double | yMax | ||
| ) |
Definition at line 99 of file grid_system.cpp.
References Assign().
| CSG_Grid_System::CSG_Grid_System | ( | double | Cellsize, |
| double | xMin, | ||
| double | yMin, | ||
| int | NX, | ||
| int | NY | ||
| ) |
Definition at line 107 of file grid_system.cpp.
References Assign().
| CSG_Grid_System::~CSG_Grid_System | ( | void | ) |
Definition at line 115 of file grid_system.cpp.
| bool CSG_Grid_System::Assign | ( | const CSG_Grid_System & | System | ) |
Definition at line 195 of file grid_system.cpp.
Referenced by CSG_Parameters::Add_Grid_System(), Assign(), CSG_Grid_System(), CSG_Grid::Destroy(), CSG_Parameters_Grid_Target::Get_System(), CSG_Parameters_Grid_Target::Get_System_User(), CSG_Parameter_Grid_System::On_Serialize(), operator=(), CSG_Parameters::Serialize_Compatibility(), CSG_Parameter_Grid::Set_Value(), and CSG_Parameter_Grid_System::Set_Value().
| bool CSG_Grid_System::Assign | ( | double | Cellsize, |
| const CSG_Rect & | Extent | ||
| ) |
Definition at line 201 of file grid_system.cpp.
References Assign(), CSG_Rect::m_rect, SSG_Rect::xMax, SSG_Rect::xMin, SSG_Rect::yMax, and SSG_Rect::yMin.
| bool CSG_Grid_System::Assign | ( | double | Cellsize, |
| double | xMin, | ||
| double | yMin, | ||
| double | xMax, | ||
| double | yMax | ||
| ) |
Definition at line 207 of file grid_system.cpp.
References Assign().
| bool CSG_Grid_System::Assign | ( | double | Cellsize, |
| double | xMin, | ||
| double | yMin, | ||
| int | NX, | ||
| int | NY | ||
| ) |
Definition at line 218 of file grid_system.cpp.
References CSG_Rect::Assign().
Aligns the world coordinate ptWorld to the rows and columns of the grid system and returns it.
Definition at line 268 of file grid.h.
References SSG_Point::x, and SSG_Point::y.
| double CSG_Grid_System::Fit_xto_Grid_System | ( | double | x | ) | const [inline] |
| double CSG_Grid_System::Fit_yto_Grid_System | ( | double | y | ) | const [inline] |
| double CSG_Grid_System::Get_Cellsize | ( | void | ) | const [inline] |
Definition at line 229 of file grid.h.
Referenced by CSG_Grid::Create(), CSG_Module_Grid_Interactive::Get_Grid_Pos(), Get_Name(), CSG_Module_Grid_Interactive::Get_xGrid(), CSG_Module_Grid_Interactive::Get_yGrid(), and CSG_Parameter_Grid_System::On_Serialize().
| const CSG_Rect& CSG_Grid_System::Get_Extent | ( | bool | bCells = false | ) | const [inline] |
Definition at line 236 of file grid.h.
Referenced by CSG_Grid::Get_Value(), and CSG_Parameter_Grid_System::On_Serialize().
| TSG_Point CSG_Grid_System::Get_Grid_to_World | ( | int | xGrid, |
| int | yGrid | ||
| ) | const [inline] |
Definition at line 281 of file grid.h.
References SSG_Point::x, and SSG_Point::y.
| double CSG_Grid_System::Get_Length | ( | int | Direction | ) | const [inline] |
Definition at line 352 of file grid.h.
Referenced by CSG_Grid::Get_Gradient_NeighborDir().
| const SG_Char * CSG_Grid_System::Get_Name | ( | bool | bShort = true | ) |
Definition at line 133 of file grid_system.cpp.
References Get_Cellsize(), Get_NX(), Get_NY(), Get_XMin(), Get_YMin(), is_Valid(), LNG, CSG_String::Printf(), SG_Get_Significant_Decimals(), and SG_T.
Referenced by CSG_Parameter_Grid_System::asString(), and SG_Grid_Cache_Check().
| long CSG_Grid_System::Get_NCells | ( | void | ) | const [inline] |
Definition at line 234 of file grid.h.
Referenced by SG_Grid_Cache_Check().
| bool CSG_Grid_System::Get_Neighbor_Pos | ( | int | Direction, |
| int | x, | ||
| int | y, | ||
| int & | xPos, | ||
| int & | yPos | ||
| ) | const [inline] |
| int CSG_Grid_System::Get_NX | ( | void | ) | const [inline] |
Definition at line 232 of file grid.h.
Referenced by CSG_Grid::Create(), CSG_Module_Grid_Interactive::Get_Grid_Pos(), Get_Name(), and CSG_Module_Grid_Interactive::Get_xGrid().
| int CSG_Grid_System::Get_NY | ( | void | ) | const [inline] |
Definition at line 233 of file grid.h.
Referenced by CSG_Grid::Create(), CSG_Module_Grid_Interactive::Get_Grid_Pos(), Get_Name(), and CSG_Module_Grid_Interactive::Get_yGrid().
| static double CSG_Grid_System::Get_UnitLength | ( | int | Direction | ) | [inline, static] |
| bool CSG_Grid_System::Get_World_to_Grid | ( | int & | xGrid, |
| int & | yGrid, | ||
| TSG_Point | ptWorld | ||
| ) | const [inline] |
Definition at line 301 of file grid.h.
References SSG_Point::x, and SSG_Point::y.
| bool CSG_Grid_System::Get_World_to_Grid | ( | int & | xGrid, |
| int & | yGrid, | ||
| double | xWorld, | ||
| double | yWorld | ||
| ) | const [inline] |
| static int CSG_Grid_System::Get_xFrom | ( | int | Direction, |
| int | x = 0 |
||
| ) | [inline, static] |
Definition at line 341 of file grid.h.
Referenced by CSG_Grid::Get_Gradient().
| int CSG_Grid_System::Get_xFromSave | ( | int | Direction, |
| int | x | ||
| ) | const [inline] |
| double CSG_Grid_System::Get_xGrid_to_World | ( | int | xGrid | ) | const [inline] |
| double CSG_Grid_System::Get_XMax | ( | bool | bCells = false | ) | const [inline] |
| double CSG_Grid_System::Get_XMin | ( | bool | bCells = false | ) | const [inline] |
Definition at line 238 of file grid.h.
Referenced by CSG_Grid::Create(), and Get_Name().
| double CSG_Grid_System::Get_XRange | ( | bool | bCells = false | ) | const [inline] |
| static int CSG_Grid_System::Get_xTo | ( | int | Direction, |
| int | x = 0 |
||
| ) | [inline, static] |
Definition at line 313 of file grid.h.
Referenced by CSG_Grid::Get_Gradient(), and CSG_Grid::Get_Gradient_NeighborDir().
| int CSG_Grid_System::Get_xToSave | ( | int | Direction, |
| int | x | ||
| ) | const [inline] |
| int CSG_Grid_System::Get_xWorld_to_Grid | ( | double | xWorld | ) | const [inline] |
| static int CSG_Grid_System::Get_yFrom | ( | int | Direction, |
| int | y = 0 |
||
| ) | [inline, static] |
Definition at line 342 of file grid.h.
Referenced by CSG_Grid::Get_Gradient().
| int CSG_Grid_System::Get_yFromSave | ( | int | Direction, |
| int | y | ||
| ) | const [inline] |
| double CSG_Grid_System::Get_yGrid_to_World | ( | int | yGrid | ) | const [inline] |
| double CSG_Grid_System::Get_YMax | ( | bool | bCells = false | ) | const [inline] |
| double CSG_Grid_System::Get_YMin | ( | bool | bCells = false | ) | const [inline] |
Definition at line 242 of file grid.h.
Referenced by CSG_Grid::Create(), and Get_Name().
| double CSG_Grid_System::Get_YRange | ( | bool | bCells = false | ) | const [inline] |
| static int CSG_Grid_System::Get_yTo | ( | int | Direction, |
| int | y = 0 |
||
| ) | [inline, static] |
Definition at line 327 of file grid.h.
Referenced by CSG_Grid::Get_Gradient(), and CSG_Grid::Get_Gradient_NeighborDir().
| int CSG_Grid_System::Get_yToSave | ( | int | Direction, |
| int | y | ||
| ) | const [inline] |
| int CSG_Grid_System::Get_yWorld_to_Grid | ( | double | yWorld | ) | const [inline] |
| bool CSG_Grid_System::is_Equal | ( | double | Cellsize, |
| const TSG_Rect & | Extent | ||
| ) | const |
Definition at line 275 of file grid_system.cpp.
| bool CSG_Grid_System::is_Equal | ( | const CSG_Grid_System & | System | ) | const |
Definition at line 269 of file grid_system.cpp.
References CSG_Rect::m_rect.
Referenced by operator==(), CSG_Parameter_Grid::Set_Value(), and CSG_Parameter_Grid_System::Set_Value().
| bool CSG_Grid_System::is_InGrid | ( | int | x, |
| int | y | ||
| ) | const [inline] |
| bool CSG_Grid_System::is_InGrid | ( | int | x, |
| int | y, | ||
| int | Rand | ||
| ) | const [inline] |
| bool CSG_Grid_System::is_Valid | ( | void | ) | const |
Definition at line 127 of file grid_system.cpp.
Referenced by CSG_Parameters_Grid_Target::Get_Grid(), Get_Name(), CSG_Parameters_Grid_Target::Get_System(), CSG_Parameters_Grid_Target::Get_System_User(), CSG_Grid::is_Valid(), CSG_Grid::Set_Buffer_Size(), and CSG_Parameter_Grid_System::Set_Value().
| void CSG_Grid_System::operator= | ( | const CSG_Grid_System & | System | ) |
Definition at line 182 of file grid_system.cpp.
References Assign().
| bool CSG_Grid_System::operator== | ( | const CSG_Grid_System & | System | ) | const |
Definition at line 176 of file grid_system.cpp.
References is_Equal().