GEOS  3.14.0dev
Static Public Member Functions | List of all members
geos::algorithm::PolygonNodeTopology Class Reference

#include <PolygonNodeTopology.h>

Static Public Member Functions

static bool isCrossing (const CoordinateXY *nodePt, const CoordinateXY *a0, const CoordinateXY *a1, const CoordinateXY *b0, const CoordinateXY *b1)
 
static bool isInteriorSegment (const CoordinateXY *nodePt, const CoordinateXY *a0, const CoordinateXY *a1, const CoordinateXY *b)
 
static int compareAngle (const CoordinateXY *origin, const CoordinateXY *p, const CoordinateXY *q)
 

Detailed Description

Functions to compute topological information about nodes (ring intersections) in polygonal geometry.

Author
mdavis

Member Function Documentation

◆ compareAngle()

static int geos::algorithm::PolygonNodeTopology::compareAngle ( const CoordinateXY *  origin,
const CoordinateXY *  p,
const CoordinateXY *  q 
)
static

Compares the angles of two vectors relative to the positive X-axis at their origin. Angles increase CCW from the X-axis.

Parameters
originthe origin of the vectors
pthe endpoint of the vector P
qthe endpoint of the vector Q
Returns
a negative integer, zero, or a positive integer as this vector P has angle less than, equal to, or greater than vector Q

◆ isInteriorSegment()

static bool geos::algorithm::PolygonNodeTopology::isInteriorSegment ( const CoordinateXY *  nodePt,
const CoordinateXY *  a0,
const CoordinateXY *  a1,
const CoordinateXY *  b 
)
static

Tests whether an segment node-b lies in the interior or exterior of a corner of a ring formed by the two segments a0-node-a1. The ring interior is assumed to be on the right of the corner (i.e. a CW shell or CCW hole). The test segment must not be collinear with the corner segments.

Parameters
nodePtthe node location
a0the first vertex of the corner
a1the second vertex of the corner
bthe other vertex of the test segment
Returns
true if the segment is interior to the ring corner

The documentation for this class was generated from the following file: