21#ifndef GEOS_ALGORITHM_CGALGORITHM_H
22#define GEOS_ALGORITHM_CGALGORITHM_H
24#include <geos/export.h>
47class GEOS_DLL CGAlgorithms {
86 const std::vector<const geom::Coordinate*>& ring);
107 const std::vector<const geom::Coordinate*>& ring);
static int locatePointInRing(const geom::Coordinate &p, const std::vector< const geom::Coordinate * > &ring)
Same as above, but taking a vector of const Coordinates.
static double distancePointLinePerpendicular(const geom::Coordinate &p, const geom::Coordinate &A, const geom::Coordinate &B)
Computes the perpendicular distance from a point p to the (infinite) line containing the points AB.
static int computeOrientation(const geom::Coordinate &p1, const geom::Coordinate &p2, const geom::Coordinate &q)
Computes the orientation of a point q to the directed line segment p1-p2.
static bool isOnLine(const geom::Coordinate &p, const geom::CoordinateSequence *pt)
Test whether a point lies on the given line segment.
static double distancePointLine(const geom::Coordinate &p, const geom::Coordinate &A, const geom::Coordinate &B)
Computes the distance from a point p to a line segment AB.
static bool isPointInRing(const geom::Coordinate &p, const std::vector< const geom::Coordinate * > &ring)
Same as above, but taking a vector of const Coordinates (faster).
static int orientationIndex(const geom::Coordinate &p1, const geom::Coordinate &p2, const geom::Coordinate &q)
Returns the index of the direction of the point q relative to a vector specified by p1-p2.
static double distanceLineLine(const geom::Coordinate &A, const geom::Coordinate &B, const geom::Coordinate &C, const geom::Coordinate &D)
Computes the distance from a line segment AB to a line segment CD.
static double signedArea(const geom::CoordinateSequence *ring)
Returns the signed area for a ring. The area is positive if the ring is oriented CW.
static double length(const geom::CoordinateSequence *pts)
Computes the length of a linestring specified by a sequence of points.
static bool isCCW(const geom::CoordinateSequence *ring)
Computes whether a ring defined by an array of Coordinate is oriented counter-clockwise.
static int locatePointInRing(const geom::Coordinate &p, const geom::CoordinateSequence &ring)
Determines whether a point lies in the interior, on the boundary, or in the exterior of a ring.
static bool isPointInRing(const geom::Coordinate &p, const geom::CoordinateSequence *ring)
Tests whether a point lies inside a ring.
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:59
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
Contains classes and interfaces implementing fundamental computational geometry algorithms.
Definition Angle.h:33
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25