SAGA API  v9.5
projections.cpp File Reference
#include "geo_tools.h"
#include "table.h"
#include "shapes.h"
#include "data_manager.h"
#include "tool_library.h"

Go to the source code of this file.

Macros

#define ADD_HEAD(name, value)   { CSG_String n(name), v(value); n.Replace("_", " "); v.Replace("_", " "); s += CSG_String::Format("<tr><th>%s</th><th>%s</th></tr>", n.c_str(), v.c_str()); }
 
#define ADD_INFO(name, value)   { CSG_String n(name), v(value); n.Replace("_", " "); v.Replace("_", " "); s += CSG_String::Format("<tr><td>%s</td><td>%s</td></tr>", n.c_str(), v.c_str()); }
 
#define ADD_CONT(name, entry)   if( entry ) { ADD_INFO(name, entry->Get_Content() ); }
 
#define ADD_PROP(name, entry, prop)   if( entry && entry->Get_Property(prop) ) { ADD_INFO(name, entry->Get_Property(prop)); }
 
#define CMP_CONTENT(a, b)   (a && b && a->Cmp_Content(b->Get_Content()))
 
#define CMP_PROPERTY(a, b, p)   (a && b && a->Get_Property(p) && b->Cmp_Property(p, a->Get_Property(p), true))
 
#define CMP_PARAMETER(a, b)   (a && b && ((!a->Cmp_Name("PARAMETER") && !b->Cmp_Name("PARAMETER")) || CMP_PROPERTY(a, b, "name") && a->Cmp_Content(b->Get_Content())))
 
#define CMP_TOWGS84(id)
 
#define WKT_GCS_WGS84
 

Enumerations

enum  ESG_PROJ_FIELD_ID {
  PRJ_FIELD_SRID = 0, PRJ_FIELD_AUTH_NAME, PRJ_FIELD_AUTH_SRID, PRJ_FIELD_SRTEXT,
  PRJ_FIELD_PROJ4TEXT
}
 

Functions

CSG_ProjectionsSG_Get_Projections (void)
 
bool SG_Get_Projected (CSG_Shapes *pSource, CSG_Shapes *pTarget, const CSG_Projection &Target)
 
bool SG_Get_Projected (const CSG_Projection &Source, const CSG_Projection &Target, TSG_Point &Point)
 
bool SG_Get_Projected (const CSG_Projection &Source, const CSG_Projection &Target, TSG_Rect &Rectangle)
 
bool SG_Grid_Get_Geographic_Coordinates (CSG_Grid *pGrid, CSG_Grid *pLon, CSG_Grid *pLat)
 

Variables

CSG_Projections gSG_Projections
 

Macro Definition Documentation

◆ ADD_CONT

#define ADD_CONT (   name,
  entry 
)    if( entry ) { ADD_INFO(name, entry->Get_Content() ); }

◆ ADD_HEAD

#define ADD_HEAD (   name,
  value 
)    { CSG_String n(name), v(value); n.Replace("_", " "); v.Replace("_", " "); s += CSG_String::Format("<tr><th>%s</th><th>%s</th></tr>", n.c_str(), v.c_str()); }

◆ ADD_INFO

#define ADD_INFO (   name,
  value 
)    { CSG_String n(name), v(value); n.Replace("_", " "); v.Replace("_", " "); s += CSG_String::Format("<tr><td>%s</td><td>%s</td></tr>", n.c_str(), v.c_str()); }

◆ ADD_PROP

#define ADD_PROP (   name,
  entry,
  prop 
)    if( entry && entry->Get_Property(prop) ) { ADD_INFO(name, entry->Get_Property(prop)); }

◆ CMP_CONTENT

#define CMP_CONTENT (   a,
 
)    (a && b && a->Cmp_Content(b->Get_Content()))

◆ CMP_PARAMETER

#define CMP_PARAMETER (   a,
 
)    (a && b && ((!a->Cmp_Name("PARAMETER") && !b->Cmp_Name("PARAMETER")) || CMP_PROPERTY(a, b, "name") && a->Cmp_Content(b->Get_Content())))

◆ CMP_PROPERTY

#define CMP_PROPERTY (   a,
  b,
 
)    (a && b && a->Get_Property(p) && b->Cmp_Property(p, a->Get_Property(p), true))

◆ CMP_TOWGS84

#define CMP_TOWGS84 (   id)
Value:
(\
((*pGCS[0])("DATUM.TOWGS84." id) ? (*pGCS[0])["DATUM.TOWGS84." id].Get_Content().asDouble() : 0.)\
== ((*pGCS[1])("DATUM.TOWGS84." id) ? (*pGCS[1])["DATUM.TOWGS84." id].Get_Content().asDouble() : 0.) )

◆ WKT_GCS_WGS84

#define WKT_GCS_WGS84
Value:
"GEOGCS[\"WGS 84\",AUTHORITY[\"EPSG\",\"4326\"]],"\
"DATUM[\"WGS_1984\",AUTHORITY[\"EPSG\",\"6326\"]],"\
"SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],"\
"PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],"\
"UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]"

Enumeration Type Documentation

◆ ESG_PROJ_FIELD_ID

Enumerator
PRJ_FIELD_SRID 
PRJ_FIELD_AUTH_NAME 
PRJ_FIELD_AUTH_SRID 
PRJ_FIELD_SRTEXT 
PRJ_FIELD_PROJ4TEXT 

Definition at line 613 of file projections.cpp.

Function Documentation

◆ SG_Get_Projected() [1/3]

◆ SG_Get_Projected() [2/3]

◆ SG_Get_Projected() [3/3]

◆ SG_Get_Projections()

CSG_Projections& SG_Get_Projections ( void  )

Definition at line 69 of file projections.cpp.

References gSG_Projections.

Referenced by SG_Initialize_Environment().

◆ SG_Grid_Get_Geographic_Coordinates()

bool SG_Grid_Get_Geographic_Coordinates ( CSG_Grid pGrid,
CSG_Grid pLon,
CSG_Grid pLat 
)

Variable Documentation

◆ gSG_Projections

CSG_Projections gSG_Projections