PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ ptarray_has_orientation()

int ptarray_has_orientation ( const POINTARRAY pa,
int  orientation 
)

Definition at line 1174 of file ptarray.c.

1175 {
1176  if (ptarray_signed_area(pa) > 0)
1177  return orientation == LW_CLOCKWISE;
1178  else
1179  return orientation == LW_COUNTERCLOCKWISE;
1180 }
#define LW_CLOCKWISE
Constants for orientation checking and forcing.
#define LW_COUNTERCLOCKWISE
double ptarray_signed_area(const POINTARRAY *pa)
Returns the area in cartesian units.
Definition: ptarray.c:1143

References LW_CLOCKWISE, LW_COUNTERCLOCKWISE, and ptarray_signed_area().

Referenced by lwpoly_force_orientation(), lwpoly_has_orientation(), lwtriangle_has_orientation(), and ptarray_isccw().

Here is the call graph for this function:
Here is the caller graph for this function: