![]() |
SAGA API
v9.2
|
#include <grid.h>
Public Member Functions | |
CSG_Grid_System (void) | |
CSG_Grid_System (const CSG_Grid_System &System) | |
bool | Create (const CSG_Grid_System &System) |
CSG_Grid_System (double Cellsize, const CSG_Rect &Extent) | |
bool | Create (double Cellsize, const CSG_Rect &Extent) |
CSG_Grid_System (double Cellsize, double xMin, double yMin, double xMax, double yMax) | |
bool | Create (double Cellsize, double xMin, double yMin, double xMax, double yMax) |
CSG_Grid_System (double Cellsize, double xMin, double yMin, int NX, int NY) | |
bool | Create (double Cellsize, double xMin, double yMin, int NX, int NY) |
~CSG_Grid_System (void) | |
bool | Destroy (void) |
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_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 |
sLong | 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 | 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. More... | |
double | Fit_yto_Grid_System (double y) const |
Aligns the world coordinate y to the columns of the grid system and returns it. More... | |
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. More... | |
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 |
sLong | Get_IndexFromRowCol (int x, int y) const |
bool | Get_RowColFromIndex (int &x, int &y, sLong i) 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) |
static int | Set_Precision (int Decimals) |
static int | Get_Precision (void) |
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 88 of file grid_system.cpp.
References Destroy().
CSG_Grid_System::CSG_Grid_System | ( | const CSG_Grid_System & | System | ) |
Definition at line 94 of file grid_system.cpp.
References Create().
CSG_Grid_System::CSG_Grid_System | ( | double | Cellsize, |
const CSG_Rect & | Extent | ||
) |
Definition at line 100 of file grid_system.cpp.
References Create().
CSG_Grid_System::CSG_Grid_System | ( | double | Cellsize, |
double | xMin, | ||
double | yMin, | ||
double | xMax, | ||
double | yMax | ||
) |
Definition at line 106 of file grid_system.cpp.
References Create().
CSG_Grid_System::CSG_Grid_System | ( | double | Cellsize, |
double | xMin, | ||
double | yMin, | ||
int | NX, | ||
int | NY | ||
) |
Definition at line 112 of file grid_system.cpp.
References Create().
CSG_Grid_System::~CSG_Grid_System | ( | void | ) |
Definition at line 118 of file grid_system.cpp.
References Destroy().
bool CSG_Grid_System::Assign | ( | const CSG_Grid_System & | System | ) |
Definition at line 225 of file grid_system.cpp.
References Create().
Referenced by CSG_Parameter_Grid_System::_Serialize(), CSG_Parameters::Add_Grid_System(), CSG_Grid_File_Info::Create(), CSG_Grid::Destroy(), CSG_Parameters_Grid_Target::Get_Grid(), CSG_Parameters_Grid_Target::Get_System(), and CSG_Parameters::Serialize_Compatibility().
bool CSG_Grid_System::Assign | ( | double | Cellsize, |
const CSG_Rect & | Extent | ||
) |
Definition at line 228 of file grid_system.cpp.
References Create().
bool CSG_Grid_System::Assign | ( | double | Cellsize, |
double | xMin, | ||
double | yMin, | ||
double | xMax, | ||
double | yMax | ||
) |
Definition at line 231 of file grid_system.cpp.
References Create().
bool CSG_Grid_System::Assign | ( | double | Cellsize, |
double | xMin, | ||
double | yMin, | ||
int | NX, | ||
int | NY | ||
) |
Definition at line 234 of file grid_system.cpp.
References Create().
bool CSG_Grid_System::Create | ( | const CSG_Grid_System & | System | ) |
Definition at line 129 of file grid_system.cpp.
References is_Valid().
Referenced by CSG_Parameter_Grid_System::_Set_Value(), Assign(), Create(), CSG_Grid_System(), Destroy(), operator=(), and CSG_Tool_Grid::Set_System().
bool CSG_Grid_System::Create | ( | double | Cellsize, |
const CSG_Rect & | Extent | ||
) |
Definition at line 146 of file grid_system.cpp.
References Create(), Destroy(), CSG_Rect::Get_Center(), CSG_Rect::Get_XMin(), CSG_Rect::Get_XRange(), CSG_Rect::Get_YMin(), CSG_Rect::Get_YRange(), SSG_Point::x, and SSG_Point::y.
bool CSG_Grid_System::Create | ( | double | Cellsize, |
double | xMin, | ||
double | yMin, | ||
double | xMax, | ||
double | yMax | ||
) |
Definition at line 165 of file grid_system.cpp.
References Create().
bool CSG_Grid_System::Create | ( | double | Cellsize, |
double | xMin, | ||
double | yMin, | ||
int | NX, | ||
int | NY | ||
) |
Definition at line 171 of file grid_system.cpp.
References CSG_Rect::Assign(), CSG_Rect::Inflate(), SG_Get_Rounded(), SSG_Rect::xMax, SSG_Rect::xMin, SSG_Rect::yMax, and SSG_Rect::yMin.
bool CSG_Grid_System::Destroy | ( | void | ) |
Definition at line 217 of file grid_system.cpp.
References Create().
Referenced by Create(), CSG_Grid_System(), CSG_Parameter_Grid_List::Update_Data(), and ~CSG_Grid_System().
Aligns the world coordinate ptWorld to the rows and columns of the grid system and returns it.
Definition at line 265 of file grid.h.
References SSG_Point::x, and SSG_Point::y.
|
inline |
|
inline |
|
inline |
Definition at line 231 of file grid.h.
Referenced by CSG_Parameter_Grid_System::_Serialize(), CSG_Grids::Create(), CSG_Grid::Create(), Get_Name(), and CSG_Grid_File_Info::Save().
|
inline |
Definition at line 238 of file grid.h.
Referenced by CSG_Parameter_Grid_System::_Serialize(), CSG_Grid::Get_Value(), and CSG_Parameters_Grid_Target::Set_User_Defined().
|
inline |
Definition at line 278 of file grid.h.
References SSG_Point::x, and SSG_Point::y.
|
inline |
|
inline |
Definition at line 349 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 249 of file grid_system.cpp.
References _TL, Get_Cellsize(), Get_NX(), Get_NY(), Get_XMin(), Get_YMin(), is_Valid(), CSG_String::Printf(), and SG_Get_Significant_Decimals().
Referenced by CSG_Parameter_Grid_System::_Set_String(), and CSG_Data_Manager::Get_Summary().
|
inline |
|
inline |
Definition at line 234 of file grid.h.
Referenced by CSG_Grid::Create(), Get_Name(), and CSG_Grid_File_Info::Save().
|
inline |
Definition at line 235 of file grid.h.
Referenced by CSG_Grid::Create(), Get_Name(), CSG_Grid_File_Info::Save(), and CSG_Parameters_Grid_Target::Set_User_Defined().
|
static |
Definition at line 77 of file grid_system.cpp.
Referenced by CSG_Grid_File_Info::Save().
|
inline |
|
inlinestatic |
|
inline |
|
inline |
Definition at line 298 of file grid.h.
References SSG_Point::x, and SSG_Point::y.
|
inlinestatic |
Definition at line 338 of file grid.h.
Referenced by CSG_Grid::Get_Gradient(), and CSG_Tool_Grid::Get_xFrom().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 240 of file grid.h.
Referenced by CSG_Grid::Create(), Get_Name(), and CSG_Grid_File_Info::Save().
|
inline |
|
inlinestatic |
Definition at line 310 of file grid.h.
Referenced by CSG_Grid::Get_Gradient(), CSG_Grid::Get_Gradient_NeighborDir(), and CSG_Tool_Grid::Get_xTo().
|
inline |
|
inline |
Definition at line 290 of file grid.h.
Referenced by CSG_Grid::Get_Histogram(), CSG_Grids::Get_Histogram(), CSG_Grid::Get_Statistics(), and CSG_Grids::Get_Statistics().
|
inlinestatic |
Definition at line 339 of file grid.h.
Referenced by CSG_Grid::Get_Gradient(), and CSG_Tool_Grid::Get_yFrom().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 244 of file grid.h.
Referenced by CSG_Grid::Create(), Get_Name(), and CSG_Grid_File_Info::Save().
|
inline |
|
inlinestatic |
Definition at line 324 of file grid.h.
Referenced by CSG_Grid::Get_Gradient(), CSG_Grid::Get_Gradient_NeighborDir(), and CSG_Tool_Grid::Get_yTo().
|
inline |
|
inline |
Definition at line 291 of file grid.h.
Referenced by CSG_Grid::Get_Histogram(), CSG_Grids::Get_Histogram(), CSG_Grid::Get_Statistics(), and CSG_Grids::Get_Statistics().
bool CSG_Grid_System::is_Equal | ( | const CSG_Grid_System & | System | ) | const |
Definition at line 302 of file grid_system.cpp.
References SSG_Rect::xMin, and SSG_Rect::yMin.
Referenced by CSG_Parameter_Grid_System::_Set_Value(), CSG_Parameter_Grid::_Set_Value(), CSG_Parameter_Grids_List::Add_Item(), CSG_Parameters_Grid_Target::Get_Grid(), CSG_Parameter::is_Value_Equal(), and operator==().
bool CSG_Grid_System::is_Equal | ( | double | Cellsize, |
const TSG_Rect & | Extent | ||
) | const |
Definition at line 313 of file grid_system.cpp.
|
inline |
|
inline |
bool CSG_Grid_System::is_Valid | ( | void | ) | const |
Definition at line 243 of file grid_system.cpp.
Referenced by CSG_Parameter_Grid_System::_Set_Value(), CSG_Parameter_Grid::_Set_Value(), CSG_Grid_Collection::Add(), CSG_Data_Manager::Add_Grid(), CSG_Parameter_Grid_List::Add_Item(), CSG_Parameter_Grids_List::Add_Item(), Create(), CSG_Parameters_Grid_Target::Get_Grid(), CSG_Parameters_Grid_Target::Get_Grids(), Get_Name(), CSG_Grid::is_Valid(), and CSG_Parameters_Grid_Target::Set_User_Defined().
void CSG_Grid_System::operator= | ( | const CSG_Grid_System & | System | ) |
Definition at line 291 of file grid_system.cpp.
References Create().
bool CSG_Grid_System::operator== | ( | const CSG_Grid_System & | System | ) | const |
Definition at line 285 of file grid_system.cpp.
References is_Equal().
|
static |
Definition at line 66 of file grid_system.cpp.