SAGA API  v9.5
geo_functions.cpp File Reference
#include "geo_tools.h"
#include "mat_tools.h"

Go to the source code of this file.

Macros

#define A   Triangle[0]
 
#define B   Triangle[1]
 
#define C   Triangle[2]
 

Functions

bool SG_Is_Equal (double a, double b, double epsilon)
 
bool SG_Is_Equal (const TSG_Point &A, const TSG_Point &B, double epsilon)
 
bool SG_Is_Between (double x, double a, double b, double epsilon)
 
bool SG_Is_Between (const TSG_Point &Point, const TSG_Point &Corner_A, const TSG_Point &Corner_B, double epsilon)
 
double SG_Get_Length (double dx, double dy)
 
double SG_Get_Distance (double ax, double ay, double bx, double by, bool bPolar)
 
double SG_Get_Distance (const TSG_Point &A, const TSG_Point &B, bool bPolar)
 
double SG_Get_Distance (double ax, double ay, double bx, double by)
 
double SG_Get_Distance (const TSG_Point &A, const TSG_Point &B)
 
double SG_Get_Distance (double ax, double ay, double az, double bx, double by, double bz)
 
double SG_Get_Distance (const TSG_Point_3D &A, const TSG_Point_3D &B)
 
double SG_Get_Distance_Polar (double aLon, double aLat, double bLon, double bLat, double a, double e, bool bDegree)
 
double SG_Get_Distance_Polar (const TSG_Point &A, const TSG_Point &B, double a, double e, bool bDegree)
 
double SG_Get_Angle_Of_Direction (double dx, double dy)
 
double SG_Get_Angle_Of_Direction (double ax, double ay, double bx, double by)
 
double SG_Get_Angle_Of_Direction (const TSG_Point &A)
 
double SG_Get_Angle_Of_Direction (const TSG_Point &A, const TSG_Point &B)
 
double SG_Get_Angle_Difference (double a, double b)
 
bool SG_is_Angle_Between (double Angle, double Angle_Min, double Angle_Max, bool bCheckRange)
 
bool SG_Get_Crossing (TSG_Point &Crossing, const TSG_Point &a1, const TSG_Point &a2, const TSG_Point &b1, const TSG_Point &b2, bool bExactMatch)
 
bool SG_Get_Crossing_InRegion (TSG_Point &Crossing, const TSG_Point &a, const TSG_Point &b, const TSG_Rect &Region)
 
bool SG_Is_Point_On_Line (const TSG_Point &Point, const TSG_Point &Line_A, const TSG_Point &Line_B, bool bExactMatch, double Epsilon)
 
double SG_Get_Distance_To_Line (const TSG_Point &Point, const TSG_Point &Line_A, const TSG_Point &Line_B, bool bExactMatch)
 
double SG_Get_Nearest_Point_On_Line (const TSG_Point &Point, const TSG_Point &Line_A, const TSG_Point &Line_B, TSG_Point &Line_Point, bool bExactMatch)
 
bool SG_Get_Triangle_CircumCircle (TSG_Point Triangle[3], TSG_Point &Point, double &Radius)
 
double SG_Get_Polygon_Area (TSG_Point *Points, int nPoints)
 
double SG_Get_Polygon_Area (const CSG_Points &Points)
 

Macro Definition Documentation

◆ A

#define A   Triangle[0]

◆ B

#define B   Triangle[1]

◆ C

#define C   Triangle[2]

Function Documentation

◆ SG_Get_Angle_Difference()

double SG_Get_Angle_Difference ( double  a,
double  b 
)

Definition at line 247 of file geo_functions.cpp.

References M_PI_180, and M_PI_360.

◆ SG_Get_Angle_Of_Direction() [1/4]

double SG_Get_Angle_Of_Direction ( const TSG_Point A)

Definition at line 235 of file geo_functions.cpp.

References A, and SG_Get_Angle_Of_Direction().

◆ SG_Get_Angle_Of_Direction() [2/4]

double SG_Get_Angle_Of_Direction ( const TSG_Point A,
const TSG_Point B 
)

Definition at line 241 of file geo_functions.cpp.

References A, B, and SG_Get_Angle_Of_Direction().

◆ SG_Get_Angle_Of_Direction() [3/4]

double SG_Get_Angle_Of_Direction ( double  ax,
double  ay,
double  bx,
double  by 
)

Definition at line 229 of file geo_functions.cpp.

References SG_Get_Angle_Of_Direction().

◆ SG_Get_Angle_Of_Direction() [4/4]

double SG_Get_Angle_Of_Direction ( double  dx,
double  dy 
)

Definition at line 216 of file geo_functions.cpp.

References M_PI_090, M_PI_180, and M_PI_360.

Referenced by SG_Get_Angle_Of_Direction().

◆ SG_Get_Crossing()

bool SG_Get_Crossing ( TSG_Point Crossing,
const TSG_Point a1,
const TSG_Point a2,
const TSG_Point b1,
const TSG_Point b2,
bool  bExactMatch 
)

◆ SG_Get_Crossing_InRegion()

bool SG_Get_Crossing_InRegion ( TSG_Point Crossing,
const TSG_Point a,
const TSG_Point b,
const TSG_Rect Region 
)

◆ SG_Get_Distance() [1/6]

double SG_Get_Distance ( const TSG_Point A,
const TSG_Point B 
)

Definition at line 124 of file geo_functions.cpp.

References A, and B.

◆ SG_Get_Distance() [2/6]

double SG_Get_Distance ( const TSG_Point A,
const TSG_Point B,
bool  bPolar 
)

Definition at line 109 of file geo_functions.cpp.

References A, B, SG_Get_Distance(), and SG_Get_Distance_Polar().

◆ SG_Get_Distance() [3/6]

double SG_Get_Distance ( const TSG_Point_3D A,
const TSG_Point_3D B 
)

Definition at line 145 of file geo_functions.cpp.

References A, and B.

◆ SG_Get_Distance() [4/6]

double SG_Get_Distance ( double  ax,
double  ay,
double  az,
double  bx,
double  by,
double  bz 
)

Definition at line 135 of file geo_functions.cpp.

◆ SG_Get_Distance() [5/6]

double SG_Get_Distance ( double  ax,
double  ay,
double  bx,
double  by 
)

Definition at line 115 of file geo_functions.cpp.

◆ SG_Get_Distance() [6/6]

◆ SG_Get_Distance_Polar() [1/2]

double SG_Get_Distance_Polar ( const TSG_Point A,
const TSG_Point B,
double  a,
double  e,
bool  bDegree 
)

Definition at line 203 of file geo_functions.cpp.

References A, B, and SG_Get_Distance_Polar().

◆ SG_Get_Distance_Polar() [2/2]

double SG_Get_Distance_Polar ( double  aLon,
double  aLat,
double  bLon,
double  bLat,
double  a,
double  e,
bool  bDegree 
)

Definition at line 157 of file geo_functions.cpp.

References C, M_DEG_TO_RAD, and SG_Get_Square().

Referenced by SG_Get_Distance(), and SG_Get_Distance_Polar().

◆ SG_Get_Distance_To_Line()

double SG_Get_Distance_To_Line ( const TSG_Point Point,
const TSG_Point Line_A,
const TSG_Point Line_B,
bool  bExactMatch 
)

Definition at line 413 of file geo_functions.cpp.

References SG_Get_Nearest_Point_On_Line().

◆ SG_Get_Length()

double SG_Get_Length ( double  dx,
double  dy 
)

Definition at line 97 of file geo_functions.cpp.

◆ SG_Get_Nearest_Point_On_Line()

double SG_Get_Nearest_Point_On_Line ( const TSG_Point Point,
const TSG_Point Line_A,
const TSG_Point Line_B,
TSG_Point Line_Point,
bool  bExactMatch 
)

◆ SG_Get_Polygon_Area() [1/2]

double SG_Get_Polygon_Area ( const CSG_Points Points)

Definition at line 534 of file geo_functions.cpp.

References CSG_Points::Get_Count().

◆ SG_Get_Polygon_Area() [2/2]

double SG_Get_Polygon_Area ( TSG_Point Points,
int  nPoints 
)

Definition at line 514 of file geo_functions.cpp.

References SSG_Point::x, and SSG_Point::y.

Referenced by CSG_TIN_Node::Get_Polygon_Area().

◆ SG_Get_Triangle_CircumCircle()

bool SG_Get_Triangle_CircumCircle ( TSG_Point  Triangle[3],
TSG_Point Point,
double &  Radius 
)

Definition at line 465 of file geo_functions.cpp.

References A, B, C, SG_Get_Crossing(), SSG_Point::x, and SSG_Point::y.

◆ SG_is_Angle_Between()

bool SG_is_Angle_Between ( double  Angle,
double  Angle_Min,
double  Angle_Max,
bool  bCheckRange 
)

Definition at line 257 of file geo_functions.cpp.

References M_PI_360.

◆ SG_Is_Between() [1/2]

bool SG_Is_Between ( const TSG_Point Point,
const TSG_Point Corner_A,
const TSG_Point Corner_B,
double  epsilon 
)

Definition at line 83 of file geo_functions.cpp.

References SG_Is_Between(), SSG_Point::x, and SSG_Point::y.

◆ SG_Is_Between() [2/2]

bool SG_Is_Between ( double  x,
double  a,
double  b,
double  epsilon 
)

Definition at line 77 of file geo_functions.cpp.

Referenced by SG_Is_Between(), and SG_Is_Point_On_Line().

◆ SG_Is_Equal() [1/2]

bool SG_Is_Equal ( const TSG_Point A,
const TSG_Point B,
double  epsilon 
)

Definition at line 70 of file geo_functions.cpp.

References A, B, and SG_Is_Equal().

◆ SG_Is_Equal() [2/2]

bool SG_Is_Equal ( double  a,
double  b,
double  epsilon 
)

Definition at line 64 of file geo_functions.cpp.

Referenced by CSG_Rect::is_Equal(), SG_Is_Equal(), and SG_Is_Point_On_Line().

◆ SG_Is_Point_On_Line()

bool SG_Is_Point_On_Line ( const TSG_Point Point,
const TSG_Point Line_A,
const TSG_Point Line_B,
bool  bExactMatch,
double  Epsilon 
)