#include <RayCrossingCounter.h>
Public Member Functions | |
RayCrossingCounter (const geom::Coordinate &point) | |
void | countSegment (const geom::Coordinate &p1, const geom::Coordinate &p2) |
bool | isOnSegment () |
int | getLocation () |
bool | isPointInPolygon () |
Static Public Member Functions | |
int | locatePointInRing (const geom::Coordinate &p, const geom::CoordinateSequence &ring) |
int | locatePointInRing (const geom::Coordinate &p, const std::vector< const geom::Coordinate * > &ring) |
Semantically equal to the above, just different args encoding. |
This can be used to determine whether a point lies in a Polygonal geometry. The class determines the situation where the point lies exactly on a segment. When being used for Point-In-Polygon determination, this case allows short-circuiting the evaluation.
This class handles polygonal geometries with any number of shells and holes. The orientation of the shell and hole rings is unimportant. In order to compute a correct location for a given polygonal geometry, it is essential that all segments are counted which
|
Counts a segment
|
|
Gets the Location of the point relative to the ring, polygon or multipolygon from which the processed segments were provided. This method only determines the correct location if all relevant segments must have been processed.
|
|
Reports whether the point lies exactly on one of the supplied segments. This method may be called at any time as segments are processed. If the result of this method is
|
|
Tests whether the point lies in or on the ring, polygon or multipolygon from which the processed segments were provided. This method only determines the correct location if all relevant segments must have been processed.
|
|
Determines the Location of a point in a ring. This method is an exemplar of how to use this class.
|