20 #ifndef GEOS_ALGORITHM_LINEINTERSECTOR_H 21 #define GEOS_ALGORITHM_LINEINTERSECTOR_H 23 #include <geos/export.h> 26 #include <geos/geom/Coordinate.h> 82 precisionModel(initialPrecisionModel),
96 bool isInteriorIntersection();
105 bool isInteriorIntersection(
int inputLineIndex);
114 precisionModel=newPM;
140 POINT_INTERSECTION=1,
143 COLLINEAR_INTERSECTION=2
150 std::string toString()
const;
173 return intPt[intIndex];
180 static bool isSameSignAndNonZero(
double a,
double b);
209 return hasIntersection()&&isProperVar;
222 const geom::Coordinate& getIntersectionAlongSegment(
int segmentIndex,
int intIndex);
233 int getIndexAlongSegment(
int segmentIndex,
int intIndex);
244 double getEdgeDistance(
int geomIndex,
int intIndex)
const;
274 int intLineIndex[2][2];
280 bool isCollinear()
const {
return result==COLLINEAR_INTERSECTION; }
284 bool isEndPoint()
const {
285 return hasIntersection()&&!isProperVar;
288 void computeIntLineIndex();
290 void computeIntLineIndex(
int segmentIndex);
311 double smallestInAbsValue(
double x1,
double x2,
312 double x3,
double x4)
const;
365 #endif // GEOS_ALGORITHM_LINEINTERSECTOR_H Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
int getIntersectionNum() const
Returns the number of intersection points found.
Definition: LineIntersector.h:163
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:87
const geom::Coordinate & getIntersection(int intIndex) const
Returns the intIndex'th intersection point.
Definition: LineIntersector.h:172
bool isProper() const
Tests whether an intersection is proper.
Definition: LineIntersector.h:208
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition: LineIntersector.h:49
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
void setPrecisionModel(const geom::PrecisionModel *newPM)
Force computed intersection to be rounded to a given precision model.
Definition: LineIntersector.h:113
bool hasIntersection() const
Definition: LineIntersector.h:157