21 #ifndef GEOS_GEOM_LINESEGMENT_H 22 #define GEOS_GEOM_LINESEGMENT_H 24 #include <geos/export.h> 25 #include <geos/geom/Coordinate.h> 27 #include <geos/inline.h> 35 class CoordinateSequence;
36 class GeometryFactory;
73 LineSegment(
double x0,
double y0,
double x1,
double y1);
82 const Coordinate& operator[](std::size_t i)
const;
88 double getLength()
const;
94 bool isHorizontal()
const;
100 bool isVertical()
const;
123 int orientationIndex(
const LineSegment& seg)
const;
126 int orientationIndex(
const LineSegment* seg)
const;
144 int orientationIndex(
const Coordinate& p)
const;
157 double angle()
const;
175 double distancePerpendicular(
const Coordinate& p)
const;
191 void pointAlong(
double segmentLengthFraction,
Coordinate& ret)
const;
217 void pointAlongOffset(
double segmentLengthFraction,
218 double offsetDistance,
238 double projectionFactor(
const Coordinate& p)
const;
255 double segmentFraction(
const Coordinate& inputPt)
const;
381 # include "geos/geom/LineSegment.inl" 384 #endif // ndef GEOS_GEOM_LINESEGMENT_H Definition: LineSegment.h:57
Coordinate p1
Segment start.
Definition: LineSegment.h:64
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
GEOS_DLL std::ostream & operator<<(std::ostream &os, const Coordinate &c)
Output function.
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:67
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
GEOS_DLL bool operator==(const Coordinate &a, const Coordinate &b)
Equality operator for Coordinate. 2D only.
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:59