![]() |
SAGA API
v9.2
|
#include <geo_tools.h>
Public Member Functions | |
CSG_Projections (void) | |
virtual | ~CSG_Projections (void) |
CSG_Projections (bool bLoad_DB) | |
bool | Create (bool bLoad_DB=true) |
CSG_Projections (const CSG_String &File_DB) | |
bool | Create (const CSG_String &File_DB) |
void | Destroy (void) |
bool | Reset_Dictionary (void) |
bool | Load_Dictionary (const CSG_String &FileName) |
bool | Save_Dictionary (const CSG_String &FileName) |
bool | Load_DB (const CSG_String &FileName, bool bAppend=false) |
bool | Save_DB (const CSG_String &FileName) |
sLong | Get_Count (void) const |
bool | Add (const CSG_Projection &Projection) |
bool | Add (const SG_Char *WKT, const SG_Char *Proj4, const SG_Char *Authority, int Authority_ID) |
CSG_Projection | Get_Projection (sLong Index) const |
CSG_Projection | operator[] (sLong Index) const |
bool | Get_Projection (CSG_Projection &Projection, int EPSG_ID) const |
bool | Get_Projection (CSG_Projection &Projection, const CSG_String &Authority, int Authority_ID) const |
CSG_String | Get_Names_List (TSG_Projection_Type Type=SG_PROJ_TYPE_CS_Undefined) const |
bool | WKT_to_Proj4 (CSG_String &Proj4, const CSG_String &WKT) const |
bool | WKT_from_Proj4 (CSG_String &WKT, const CSG_String &Proj4) const |
bool | EPSG_to_Proj4 (CSG_String &Proj4, int EPSG_Code) const |
bool | EPSG_to_WKT (CSG_String &WKT, int EPSG_Code) const |
Static Public Member Functions | |
static CSG_MetaData | WKT_to_MetaData (const CSG_String &WKT) |
static const CSG_Projection & | Get_GCS_WGS84 (void) |
static CSG_Projection | Get_UTM_WGS84 (int Zone, bool bSouth=false) |
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 927 of file geo_tools.h.
CSG_Projections::CSG_Projections | ( | void | ) |
Definition at line 708 of file projections.cpp.
|
virtual |
Definition at line 778 of file projections.cpp.
References Destroy().
CSG_Projections::CSG_Projections | ( | bool | bLoad_DB | ) |
Definition at line 714 of file projections.cpp.
References Create().
CSG_Projections::CSG_Projections | ( | const CSG_String & | File_DB | ) |
Definition at line 745 of file projections.cpp.
References Create().
bool CSG_Projections::Add | ( | const CSG_Projection & | Projection | ) |
Definition at line 928 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 934 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, and CSG_Table_Record::Set_Value().
bool CSG_Projections::Create | ( | bool | bLoad_DB = true | ) |
Definition at line 721 of file projections.cpp.
References Destroy(), Load_DB(), Load_Dictionary(), SG_File_Make_Path(), SG_UI_Get_Application_Path(), and SG_UI_Msg_Lock().
Referenced by CSG_Projections().
bool CSG_Projections::Create | ( | const CSG_String & | File_DB | ) |
Definition at line 752 of file projections.cpp.
References Load_DB(), and SG_UI_Msg_Lock().
void CSG_Projections::Destroy | ( | void | ) |
Definition at line 786 of file projections.cpp.
References CSG_Table::Del_Records(), and Reset_Dictionary().
Referenced by Create(), and ~CSG_Projections().
bool CSG_Projections::EPSG_to_Proj4 | ( | CSG_String & | Proj4, |
int | EPSG_Code | ||
) | const |
Definition at line 1005 of file projections.cpp.
References CSG_Table_Record::asInt(), CSG_Table_Record::asString(), CSG_Table::Get_Count(), CSG_Table::Get_Record(), CSG_String::Printf(), PRJ_FIELD_AUTH_SRID, and PRJ_FIELD_PROJ4TEXT.
Referenced by WKT_to_Proj4().
bool CSG_Projections::EPSG_to_WKT | ( | CSG_String & | WKT, |
int | EPSG_Code | ||
) | const |
Definition at line 1023 of file projections.cpp.
References CSG_Table_Record::asInt(), CSG_Table_Record::asString(), CSG_Table::Get_Count(), CSG_Table::Get_Record(), PRJ_FIELD_AUTH_SRID, and PRJ_FIELD_SRTEXT.
sLong CSG_Projections::Get_Count | ( | void | ) | const |
Definition at line 922 of file projections.cpp.
References CSG_Table::Get_Count().
Referenced by Get_Names_List(), and Get_Projection().
|
static |
Definition at line 899 of file projections.cpp.
References PROJ4_GCS_WGS84, and WKT_GCS_WGS84.
CSG_String CSG_Projections::Get_Names_List | ( | TSG_Projection_Type | Type = SG_PROJ_TYPE_CS_Undefined | ) | const |
Definition at line 1044 of file projections.cpp.
References CSG_String::AfterFirst(), CSG_Table_Record::asInt(), CSG_Table_Record::asString(), CSG_String::BeforeFirst(), CSG_String::c_str(), CSG_String::Cmp(), CSG_String::Format(), Get_Count(), CSG_Table::Get_Record(), PRJ_FIELD_SRID, PRJ_FIELD_SRTEXT, SG_Get_Projection_Type_Name(), SG_PROJ_TYPE_CS_Geocentric, SG_PROJ_TYPE_CS_Geographic, SG_PROJ_TYPE_CS_Projected, and SG_PROJ_TYPE_CS_Undefined.
bool CSG_Projections::Get_Projection | ( | CSG_Projection & | Projection, |
const CSG_String & | Authority, | ||
int | Authority_ID | ||
) | const |
Definition at line 981 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(), CSG_String::is_Empty(), PRJ_FIELD_AUTH_NAME, and PRJ_FIELD_AUTH_SRID.
bool CSG_Projections::Get_Projection | ( | CSG_Projection & | Projection, |
int | EPSG_ID | ||
) | const |
Definition at line 976 of file projections.cpp.
References Get_Projection().
CSG_Projection CSG_Projections::Get_Projection | ( | sLong | Index | ) | const |
Definition at line 948 of file projections.cpp.
References CSG_Table_Record::asInt(), CSG_Table_Record::asString(), CSG_String::Cmp(), Get_Count(), CSG_MetaData::Get_Name(), CSG_MetaData::Get_Property(), CSG_Table::Get_Record(), PRJ_FIELD_AUTH_NAME, PRJ_FIELD_AUTH_SRID, PRJ_FIELD_PROJ4TEXT, PRJ_FIELD_SRTEXT, SG_PROJ_TYPE_CS_Geocentric, SG_PROJ_TYPE_CS_Geographic, SG_PROJ_TYPE_CS_Projected, SG_PROJ_TYPE_CS_Undefined, SG_Set_Projection_Unit(), and WKT_to_MetaData().
Referenced by CSG_Projection::Assign(), and Get_Projection().
|
static |
Definition at line 907 of file projections.cpp.
References CSG_Projection::Set_UTM_WGS84().
bool CSG_Projections::Load_DB | ( | const CSG_String & | FileName, |
bool | bAppend = false |
||
) |
Definition at line 860 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().
bool CSG_Projections::Load_Dictionary | ( | const CSG_String & | FileName | ) |
Definition at line 811 of file projections.cpp.
References CSG_Translator::Create(), CSG_Table::Create(), CSG_Table::Get_Count(), CSG_Table::Get_Field_Count(), CSG_Table::Get_Record(), SG_File_Exists(), SG_T, and WKT_to_Proj4().
Referenced by Create(), and SG_Initialize_Environment().
|
inline |
Definition at line 956 of file geo_tools.h.
bool CSG_Projections::Reset_Dictionary | ( | void | ) |
Definition at line 802 of file projections.cpp.
Referenced by Destroy().
bool CSG_Projections::Save_DB | ( | const CSG_String & | FileName | ) |
Definition at line 888 of file projections.cpp.
References CSG_Table::Save().
bool CSG_Projections::Save_Dictionary | ( | const CSG_String & | FileName | ) |
Definition at line 847 of file projections.cpp.
References CSG_Table::Save().
bool CSG_Projections::WKT_from_Proj4 | ( | CSG_String & | WKT, |
const CSG_String & | Proj4 | ||
) | const |
Definition at line 1735 of file projections.cpp.
References _TL, CSG_String::AfterFirst(), CSG_String::asDouble(), CSG_String::BeforeFirst(), CSG_String::c_str(), CSG_String::CmpNoCase(), CSG_String::Find(), CSG_String::Format(), CSG_Translator::Get_Translation(), SG_T, and SG_UI_Msg_Add_Error().
Referenced by CSG_Projection::Assign().
|
static |
Definition at line 1189 of file projections.cpp.
References CSG_MetaData::Destroy(), CSG_MetaData::Get_Child(), and CSG_MetaData::Get_Children_Count().
Referenced by CSG_Projection::Assign(), Get_Projection(), and WKT_to_Proj4().
bool CSG_Projections::WKT_to_Proj4 | ( | CSG_String & | Proj4, |
const CSG_String & | WKT | ||
) | const |
Definition at line 1258 of file projections.cpp.
References _TL, CSG_String::Clear(), CSG_MetaData::Cmp_Name(), CSG_String::CmpNoCase(), EPSG_to_Proj4(), CSG_String::Format(), CSG_MetaData::Get_Children_Count(), CSG_MetaData::Get_Content(), CSG_MetaData::Get_Property(), CSG_Translator::Get_Translation(), SG_UI_Msg_Add_Error(), and WKT_to_MetaData().
Referenced by CSG_Projection::Assign(), and Load_Dictionary().
|
friend |
Definition at line 929 of file geo_tools.h.