SAGA API
v9.5
|
#include <parameters.h>
Public Member Functions | |
CSG_Parameters_Grid_Target (void) | |
bool | Create (CSG_Parameters *pParameters, bool bAddDefaultGrid, CSG_Parameter *pParent, const CSG_String &Prefix="") |
bool | Create (CSG_Parameters *pParameters, bool bAddDefaultGrid=true, const CSG_String &ParentID="", const CSG_String &Prefix="") |
bool | Add_Grid (const CSG_String &ID, const CSG_String &Name, bool bOptional) |
bool | Add_Grids (const CSG_String &ID, const CSG_String &Name, bool bOptional, bool bZLevels=false) |
bool | On_Parameter_Changed (CSG_Parameters *pParameters, CSG_Parameter *pParameter) |
bool | On_Parameters_Enable (CSG_Parameters *pParameters, CSG_Parameter *pParameter) |
bool | Set_User_Defined (CSG_Parameters *pParameters, const TSG_Rect &Extent, int Rows=0, int Rounding=2) |
bool | Set_User_Defined (CSG_Parameters *pParameters, CSG_Shapes *pPoints, int Scale=4, int Rounding=2) |
bool | Set_User_Defined (CSG_Parameters *pParameters, double xMin, double yMin, double Size, int nx, int ny) |
bool | Set_User_Defined (CSG_Parameters *pParameters, const CSG_Grid_System &System) |
bool | Set_User_Defined_ZLevels (CSG_Parameters *pParameters, double zMin, double zMax, int nLevels, int Rounding=2) |
CSG_Grid_System | Get_System (void) const |
CSG_Grid_System | Get_System (CSG_Parameters *pParameters) const |
CSG_Grid * | Get_Grid (const CSG_String &ID, TSG_Data_Type Type=SG_DATATYPE_Float) |
CSG_Grid * | Get_Grid (TSG_Data_Type Type=SG_DATATYPE_Float) |
CSG_Grids * | Get_Grids (const CSG_String &ID, TSG_Data_Type Type=SG_DATATYPE_Float) |
CSG_Grids * | Get_Grids (TSG_Data_Type Type=SG_DATATYPE_Float) |
Static Public Member Functions | |
static bool | On_Parameter_Changed (CSG_Parameters *pParameters, CSG_Parameter *pParameter, const CSG_String Prefix) |
static bool | On_Parameters_Enable (CSG_Parameters *pParameters, CSG_Parameter *pParameter, const CSG_String Prefix) |
Definition at line 1637 of file parameters.h.
CSG_Parameters_Grid_Target::CSG_Parameters_Grid_Target | ( | void | ) |
Definition at line 1335 of file parameter.cpp.
bool CSG_Parameters_Grid_Target::Add_Grid | ( | const CSG_String & | ID, |
const CSG_String & | Name, | ||
bool | bOptional | ||
) |
Definition at line 1800 of file parameter.cpp.
References _TL, CSG_Parameters::Add_Bool(), CSG_Parameters::Add_Grid(), CSG_Parameters::Add_Node(), CSG_Parameter::Get_Child(), CSG_Parameter::Get_Children_Count(), CSG_Parameter::Get_Identifier(), CSG_Parameters::Get_Tool(), CSG_Parameter::Get_Type(), CSG_Tool::has_GUI(), CSG_String::Length(), PARAMETER_OUTPUT, PARAMETER_OUTPUT_OPTIONAL, PARAMETER_TYPE_Grid_System, and SG_T.
Referenced by Create().
bool CSG_Parameters_Grid_Target::Add_Grids | ( | const CSG_String & | ID, |
const CSG_String & | Name, | ||
bool | bOptional, | ||
bool | bZLevels = false |
||
) |
Definition at line 1836 of file parameter.cpp.
References _TL, CSG_Parameters::Add_Bool(), CSG_Parameters::Add_Double(), CSG_Parameters::Add_Grids(), CSG_Parameters::Add_Int(), CSG_Parameters::Add_Node(), CSG_Parameter::Get_Child(), CSG_Parameter::Get_Children_Count(), CSG_Parameter::Get_Identifier(), CSG_Parameters::Get_Tool(), CSG_Parameter::Get_Type(), CSG_Tool::has_GUI(), CSG_String::Length(), PARAMETER_OUTPUT, PARAMETER_OUTPUT_OPTIONAL, PARAMETER_TYPE_Grid_System, and SG_T.
bool CSG_Parameters_Grid_Target::Create | ( | CSG_Parameters * | pParameters, |
bool | bAddDefaultGrid, | ||
CSG_Parameter * | pParent, | ||
const CSG_String & | Prefix = "" |
||
) |
Definition at line 1341 of file parameter.cpp.
References CSG_Parameter::Get_Identifier(), and SG_T.
bool CSG_Parameters_Grid_Target::Create | ( | CSG_Parameters * | pParameters, |
bool | bAddDefaultGrid = true , |
||
const CSG_String & | ParentID = "" , |
||
const CSG_String & | Prefix = "" |
||
) |
Definition at line 1346 of file parameter.cpp.
References _TL, CSG_Parameters::Add_Choice(), CSG_Parameters::Add_Double(), Add_Grid(), CSG_Parameters::Add_Grid(), CSG_Parameters::Add_Grid_System(), CSG_Parameters::Add_Int(), CSG_String::Format(), PARAMETER_INPUT_OPTIONAL, and CSG_Parameter::Set_UseInGUI().
CSG_Grid * CSG_Parameters_Grid_Target::Get_Grid | ( | const CSG_String & | ID, |
TSG_Data_Type | Type = SG_DATATYPE_Float |
||
) |
Definition at line 1940 of file parameter.cpp.
References CSG_Parameter::asDataObject(), CSG_Parameter::asGrid(), CSG_Grid::Create(), DATAOBJECT_CREATE, CSG_Grid::Get_System(), Get_System(), CSG_Parameters::Get_Tool(), CSG_Grid::Get_Type(), CSG_Parameter::Get_Type(), CSG_Tool::has_GUI(), CSG_Grid_System::is_Equal(), CSG_Parameter::is_Optional(), CSG_Grid_System::is_Valid(), PARAMETER_TYPE_Grid, CSG_Parameter::Set_Value(), and SG_Create_Grid().
Referenced by Get_Grid().
CSG_Grid * CSG_Parameters_Grid_Target::Get_Grid | ( | TSG_Data_Type | Type = SG_DATATYPE_Float | ) |
Definition at line 2006 of file parameter.cpp.
References Get_Grid().
CSG_Grids * CSG_Parameters_Grid_Target::Get_Grids | ( | const CSG_String & | ID, |
TSG_Data_Type | Type = SG_DATATYPE_Float |
||
) |
Definition at line 2012 of file parameter.cpp.
References CSG_Grids::Add_Grid(), CSG_Parameter::asGrids(), CSG_Parameter::asPointer(), CSG_Grids::Create(), DATAOBJECT_CREATE, CSG_Grids::Del_Grids(), CSG_Grids::Get_System(), Get_System(), CSG_Parameters::Get_Tool(), CSG_Grids::Get_Type(), CSG_Parameter::Get_Type(), CSG_Tool::has_GUI(), CSG_Grid_System::is_Equal(), CSG_Parameter::is_Optional(), CSG_Grid_System::is_Valid(), PARAMETER_TYPE_Grids, CSG_Parameter::Set_Value(), and SG_Create_Grids().
Referenced by Get_Grids().
CSG_Grids * CSG_Parameters_Grid_Target::Get_Grids | ( | TSG_Data_Type | Type = SG_DATATYPE_Float | ) |
Definition at line 2084 of file parameter.cpp.
References Get_Grids().
CSG_Grid_System CSG_Parameters_Grid_Target::Get_System | ( | CSG_Parameters * | pParameters | ) | const |
Definition at line 1893 of file parameter.cpp.
References CSG_Parameter::asGrid_System(), CSG_Grid_System::Assign(), and CSG_Rect::Deflate().
CSG_Grid_System CSG_Parameters_Grid_Target::Get_System | ( | void | ) | const |
Definition at line 1887 of file parameter.cpp.
Referenced by Get_Grid(), and Get_Grids().
bool CSG_Parameters_Grid_Target::On_Parameter_Changed | ( | CSG_Parameters * | pParameters, |
CSG_Parameter * | pParameter | ||
) |
Definition at line 1405 of file parameter.cpp.
References CSG_Parameters::Cmp_Identifier(), and CSG_Parameters::Get_Identifier().
|
static |
Definition at line 1413 of file parameter.cpp.
References CSG_Parameter::asDouble(), CSG_Parameter::Cmp_Identifier(), and CSG_Parameter::Get_Identifier().
bool CSG_Parameters_Grid_Target::On_Parameters_Enable | ( | CSG_Parameters * | pParameters, |
CSG_Parameter * | pParameter | ||
) |
Definition at line 1566 of file parameter.cpp.
References CSG_String::Cmp(), and CSG_Parameters::Get_Identifier().
|
static |
Definition at line 1574 of file parameter.cpp.
References CSG_Parameter::asInt(), and CSG_Parameters::Set_Enabled().
bool CSG_Parameters_Grid_Target::Set_User_Defined | ( | CSG_Parameters * | pParameters, |
const CSG_Grid_System & | System | ||
) |
Initializes the grid system from 'System', if it represents a valid grid system.
Definition at line 1717 of file parameter.cpp.
References CSG_Grid_System::Get_Extent(), CSG_Grid_System::Get_NY(), CSG_Grid_System::is_Valid(), and Set_User_Defined().
bool CSG_Parameters_Grid_Target::Set_User_Defined | ( | CSG_Parameters * | pParameters, |
const TSG_Rect & | Extent, | ||
int | Rows = 0 , |
||
int | Rounding = 2 |
||
) |
Initializes the grid system from extent and number of rows. Extent calculation is done for grid nodes and will automatically become adjusted to match the grid cells if necessary. If Rounding is greater than zero it specifies the number of significant figures to which the cell size is rounded and also adjusts the extent coordinates to be a multiple of cell size.
Definition at line 1612 of file parameter.cpp.
References CSG_String::Cmp(), CSG_Parameters::Get_Identifier(), CSG_Parameters::Get_Tool(), CSG_Rect::Get_XCenter(), CSG_Rect::Get_XMax(), CSG_Rect::Get_XMin(), CSG_Rect::Get_XRange(), CSG_Rect::Get_YCenter(), CSG_Rect::Get_YMax(), CSG_Rect::Get_YMin(), CSG_Rect::Get_YRange(), CSG_Tool::has_GUI(), CSG_Rect::Inflate(), CSG_Parameters::Set_Callback(), CSG_Parameters::Set_Parameter(), SG_Get_Rounded_To_SignificantFigures(), SSG_Rect::xMax, SSG_Rect::xMin, SSG_Rect::yMax, and SSG_Rect::yMin.
Referenced by Set_User_Defined().
bool CSG_Parameters_Grid_Target::Set_User_Defined | ( | CSG_Parameters * | pParameters, |
CSG_Shapes * | pPoints, | ||
int | Scale = 4 , |
||
int | Rounding = 2 |
||
) |
Initializes the grid system from 'pPoints' extent and fits number of columns/rows to the average point density. Number of columns/rows can be increased if 'Scale' is greater than 1.
Definition at line 1687 of file parameter.cpp.
References CSG_Rect::Get_Area(), CSG_Table::Get_Count(), CSG_Shapes::Get_Extent(), CSG_Rect::Get_YRange(), Set_User_Defined(), SG_Get_Rounded_To_SignificantFigures(), SSG_Rect::xMax, SSG_Rect::xMin, SSG_Rect::yMax, and SSG_Rect::yMin.
bool CSG_Parameters_Grid_Target::Set_User_Defined | ( | CSG_Parameters * | pParameters, |
double | xMin, | ||
double | yMin, | ||
double | Cellsize, | ||
int | nx, | ||
int | ny | ||
) |
Initializes the grid system from lower left cell center coordinate, cell size and number of columns and rows (nx, ny).
Definition at line 1726 of file parameter.cpp.
References Set_User_Defined().
bool CSG_Parameters_Grid_Target::Set_User_Defined_ZLevels | ( | CSG_Parameters * | pParameters, |
double | zMin, | ||
double | zMax, | ||
int | nLevels, | ||
int | Rounding = 2 |
||
) |
Initializes the grid collection's z level arrangement.
Definition at line 1735 of file parameter.cpp.
References CSG_String::Cmp(), CSG_Parameters::Get_Identifier(), CSG_Parameters::Get_Tool(), CSG_Tool::has_GUI(), CSG_Parameters::Set_Callback(), CSG_Parameters::Set_Parameter(), and SG_Get_Rounded_To_SignificantFigures().