SAGA API
v9.5
|
#include <geo_tools.h>
Public Member Functions | |
CSG_Projections (void) | |
virtual | ~CSG_Projections (void) |
CSG_Projections (bool LoadDefault) | |
bool | Create (bool LoadDefault=true) |
CSG_Projections (const CSG_String &File) | |
bool | Create (const CSG_String &File) |
void | Destroy (void) |
bool | Load (const CSG_String &File, bool bAppend=false) |
bool | Save (const CSG_String &File) |
bool | Add (const CSG_Projection &Projection) |
bool | Add (const SG_Char *WKT, const SG_Char *Proj4, const SG_Char *Authority, int Authority_ID) |
sLong | Get_Count (void) const |
CSG_Projection | operator[] (sLong Index) const |
CSG_Projection | Get_Projection (sLong Index) const |
const SG_Char * | Get_Projection (int Code, const SG_Char *Authority=NULL) const |
bool | Get_Projection (CSG_Projection &Projection, int Code, const SG_Char *Authority=NULL) const |
CSG_String | Get_Names_List (ESG_CRS_Type Type=ESG_CRS_Type::Undefined, bool bAddSelect=true) const |
Static Public Member Functions | |
static bool | Parse (const CSG_String &Definition, CSG_String *WKT1=NULL, CSG_String *WKT2=NULL, CSG_String *PROJ=NULL, CSG_String *ESRI=NULL) |
static ESG_CRS_Type | Get_CRS_Type (const CSG_String &Identifier) |
static CSG_String | Get_CRS_Type_Identifier (ESG_CRS_Type Type) |
static CSG_String | Get_CRS_Type_Name (ESG_CRS_Type Type) |
static ESG_Projection_Unit | Get_Unit (const CSG_String &Identifier) |
static const CSG_String | Get_Unit_Identifier (ESG_Projection_Unit Unit) |
static const CSG_String | Get_Unit_Name (ESG_Projection_Unit Unit, bool bSimple=true) |
static double | Get_Unit_To_Meter (ESG_Projection_Unit Unit) |
Friends | |
class | CSG_Projection |
CSG_Projections is a projections dictionary and translator for EPSG codes, OGC Well-Known-Text, and Proj.4.
Definition at line 930 of file geo_tools.h.
CSG_Projections::CSG_Projections | ( | void | ) |
Definition at line 628 of file projections.cpp.
|
virtual |
Definition at line 693 of file projections.cpp.
References Destroy().
CSG_Projections::CSG_Projections | ( | bool | LoadDefault | ) |
Definition at line 634 of file projections.cpp.
References Create().
CSG_Projections::CSG_Projections | ( | const CSG_String & | File | ) |
Definition at line 662 of file projections.cpp.
References Create().
bool CSG_Projections::Add | ( | const CSG_Projection & | Projection | ) |
Definition at line 721 of file projections.cpp.
bool CSG_Projections::Add | ( | const SG_Char * | WKT, |
const SG_Char * | Proj4, | ||
const SG_Char * | Authority, | ||
int | Authority_ID | ||
) |
Definition at line 727 of file projections.cpp.
References CSG_Table::Add_Record(), CSG_Table::Get_Count(), PRJ_FIELD_AUTH_NAME, PRJ_FIELD_AUTH_SRID, PRJ_FIELD_PROJ4TEXT, PRJ_FIELD_SRID, PRJ_FIELD_SRTEXT, CSG_Table_Record::Set_Value(), and WKT1.
bool CSG_Projections::Create | ( | bool | LoadDefault = true | ) |
Definition at line 641 of file projections.cpp.
References Destroy(), Load(), SG_File_Make_Path(), SG_UI_Get_Application_Path(), and SG_UI_Msg_Lock().
Referenced by CSG_Projection::Assign(), CSG_Projections(), and CSG_Projection::operator=().
bool CSG_Projections::Create | ( | const CSG_String & | File | ) |
Definition at line 669 of file projections.cpp.
References Load(), and SG_UI_Msg_Lock().
void CSG_Projections::Destroy | ( | void | ) |
Definition at line 701 of file projections.cpp.
References CSG_Table::Del_Records().
Referenced by Create(), and ~CSG_Projections().
sLong CSG_Projections::Get_Count | ( | void | ) | const |
Definition at line 715 of file projections.cpp.
References CSG_Table::Get_Count().
Referenced by Get_Names_List(), and Get_Projection().
|
static |
Definition at line 1792 of file projections.cpp.
References CSG_String::CmpNoCase(), and Geographic.
Referenced by CSG_Projection::Create(), and Get_Projection().
|
static |
Definition at line 1802 of file projections.cpp.
Referenced by CSG_Projection::Get_Type_Identifier().
|
static |
Definition at line 1814 of file projections.cpp.
References _TL.
Referenced by Get_Names_List(), and CSG_Projection::Get_Type_Name().
CSG_String CSG_Projections::Get_Names_List | ( | ESG_CRS_Type | Type = ESG_CRS_Type::Undefined , |
bool | bAddSelect = true |
||
) | const |
Definition at line 981 of file projections.cpp.
References _TL, CSG_Table_Record::asInt(), CSG_Table_Record::asString(), CSG_String::c_str(), CSG_String::Format(), Geographic, Get_Count(), Get_CRS_Type_Name(), CSG_Table::Get_Record(), CSG_String::Printf(), PRJ_FIELD_AUTH_NAME, PRJ_FIELD_SRID, PRJ_FIELD_SRTEXT, and WKT1.
bool CSG_Projections::Get_Projection | ( | CSG_Projection & | Projection, |
int | Code, | ||
const SG_Char * | Authority = NULL |
||
) | const |
Definition at line 784 of file projections.cpp.
References CSG_Table_Record::asInt(), CSG_Table_Record::asString(), CSG_String::CmpNoCase(), CSG_Table::Get_Count(), Get_Projection(), CSG_Table::Get_Record(), PRJ_FIELD_AUTH_NAME, PRJ_FIELD_AUTH_SRID, and SG_T.
const SG_Char * CSG_Projections::Get_Projection | ( | int | Code, |
const SG_Char * | Authority = NULL |
||
) | const |
Definition at line 766 of file projections.cpp.
References CSG_Table_Record::asInt(), CSG_Table_Record::asString(), CSG_String::CmpNoCase(), CSG_Table::Get_Count(), CSG_Table::Get_Record(), PRJ_FIELD_AUTH_NAME, PRJ_FIELD_AUTH_SRID, PRJ_FIELD_SRTEXT, and SG_T.
CSG_Projection CSG_Projections::Get_Projection | ( | sLong | Index | ) | const |
Definition at line 741 of file projections.cpp.
References CSG_Table_Record::asInt(), CSG_Table_Record::asString(), Get_Count(), Get_CRS_Type(), CSG_Table::Get_Record(), Get_Unit(), PRJ_FIELD_AUTH_NAME, PRJ_FIELD_AUTH_SRID, PRJ_FIELD_PROJ4TEXT, PRJ_FIELD_SRTEXT, and WKT1.
Referenced by CSG_Projection::Create(), Get_Projection(), and Parse().
|
static |
Definition at line 1826 of file projections.cpp.
References CSG_String::CmpNoCase(), Get_Unit_Identifier(), and Get_Unit_Name().
Referenced by CSG_Projection::Create(), and Get_Projection().
|
static |
Definition at line 1843 of file projections.cpp.
Referenced by Get_Unit(), and CSG_Projection::Get_Unit_Identifier().
|
static |
Definition at line 1873 of file projections.cpp.
Referenced by Get_Unit(), and CSG_Projection::Get_Unit_Name().
|
static |
Definition at line 1903 of file projections.cpp.
Referenced by CSG_Projection::Get_Unit_To_Meter().
bool CSG_Projections::Load | ( | const CSG_String & | File, |
bool | bAppend = false |
||
) |
Definition at line 809 of file projections.cpp.
References CSG_Table::Add_Record(), CSG_Table::Create(), CSG_Table::Del_Records(), CSG_Table::Get_Count(), CSG_Table::Get_Record_byIndex(), PRJ_FIELD_SRTEXT, CSG_Table::Set_Index(), SG_File_Exists(), SG_UI_Process_Set_Progress(), and TABLE_INDEX_Ascending.
Referenced by Create(), and SG_Initialize_Environment().
|
inline |
Definition at line 956 of file geo_tools.h.
|
static |
Definition at line 845 of file projections.cpp.
References CSG_String::AfterFirst(), CSG_String::asInt(), CSG_Parameter::asString(), CSG_String::BeforeFirst(), CSG_Tool_Library_Manager::Create_Tool(), CSG_Tool_Library_Manager::Delete_Tool(), CSG_Tool::Execute(), CSG_String::Find(), CSG_Projection::Get_ESRI(), CSG_Tool::Get_Parameter(), CSG_Projection::Get_PROJ(), Get_Projection(), CSG_Projection::Get_WKT1(), CSG_Projection::Get_WKT2(), gSG_Projections, CSG_String::is_Empty(), CSG_Tool::Set_Parameter(), SG_Get_Tool_Library_Manager(), SG_UI_ProgressAndMsg_Lock(), and WKT1.
Referenced by CSG_Projection::Create().
bool CSG_Projections::Save | ( | const CSG_String & | File | ) |
Definition at line 834 of file projections.cpp.
References CSG_Table::Save().
|
friend |
Definition at line 932 of file geo_tools.h.