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()

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

  origin | the origin of the vectors
  p | the endpoint of the vector P
  q | the 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()

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

  nodePt | the node location
  a0 | the first vertex of the corner
  a1 | the second vertex of the corner
  b | the 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:

- PolygonNodeTopology.h