GEOS 3.14.0dev
|
A geom::LineSegment which is tagged with its location in a geom::Geometry. More...
#include <TaggedLineSegment.h>
Public Member Functions | |
TaggedLineSegment (const geom::Coordinate &p0, const geom::Coordinate &p1, const geom::Geometry *parent, std::size_t index) | |
TaggedLineSegment (const geom::Coordinate &p0, const geom::Coordinate &p1) | |
TaggedLineSegment (const TaggedLineSegment &ls) | |
const geom::Geometry * | getParent () const |
std::size_t | getIndex () const |
Public Member Functions inherited from geos::geom::LineSegment | |
LineSegment (const Coordinate &c0, const Coordinate &c1) | |
Segment end. | |
LineSegment (double x0, double y0, double x1, double y1) | |
void | setCoordinates (const Coordinate &c0, const Coordinate &c1) |
void | setCoordinates (const LineSegment &ls) |
const Coordinate & | operator[] (std::size_t i) const |
Coordinate & | operator[] (std::size_t i) |
double | minX () const |
gets the minimum X ordinate value | |
double | maxX () const |
gets the maximum X ordinate value | |
double | minY () const |
gets the minimum Y ordinate value | |
double | maxY () const |
gets the maximum Y ordinate value | |
double | getLength () const |
Computes the length of the line segment. | |
bool | isHorizontal () const |
bool | isVertical () const |
int | orientationIndex (const LineSegment &seg) const |
int | orientationIndex (const LineSegment *seg) const |
int | orientationIndex (const CoordinateXY &p) const |
int | orientationIndex (const Coordinate &p) const |
Determines the orientation index of a Coordinate relative to this segment. | |
void | reverse () |
Reverses the direction of the line segment. | |
void | normalize () |
Puts the line segment into a normalized form. | |
double | angle () const |
CoordinateXY | midPoint () const |
Computes the midpoint of the segment. | |
double | distance (const LineSegment &ls) const |
Computes the distance between this line segment and another one. | |
double | distance (const CoordinateXY &p) const |
Computes the distance between this line segment and a point. | |
double | distancePerpendicular (const CoordinateXY &p) const |
double | distancePerpendicularOriented (const CoordinateXY &p) const |
void | pointAlong (double segmentLengthFraction, Coordinate &ret) const |
Computes the Coordinate that lies a given fraction along the line defined by this segment. | |
void | pointAlongOffset (double segmentLengthFraction, double offsetDistance, Coordinate &ret) const |
Computes the Coordinate that lies a given fraction along the line defined by this segment and offset from the segment by a given distance. | |
LineSegment | offset (double offsetDistance) |
double | projectionFactor (const CoordinateXY &p) const |
Compute the projection factor for the projection of the point p onto this LineSegment. | |
double | segmentFraction (const CoordinateXY &inputPt) const |
Computes the fraction of distance (in [0.0, 1.0] ) that the projection of a point occurs along this line segment. | |
void | project (const Coordinate &p, Coordinate &ret) const |
Compute the projection of a point onto the line determined by this line segment. | |
CoordinateXY | project (const CoordinateXY &p) const |
bool | project (const LineSegment &seg, LineSegment &ret) const |
Project a line segment onto this line segment and return the resulting line segment. | |
void | closestPoint (const CoordinateXY &p, CoordinateXY &ret) const |
Computes the closest point on this line segment to another point. | |
bool | equalsTopo (const LineSegment &other) const |
Returns true if other is topologically equal to this LineSegment (e.g. irrespective of orientation). | |
std::array< Coordinate, 2 > | closestPoints (const LineSegment &line) |
std::array< Coordinate, 2 > | closestPoints (const LineSegment *line) |
Coordinate | intersection (const LineSegment &line) const |
Coordinate | lineIntersection (const LineSegment &line) const |
Computes the intersection point of the lines defined by two segments, if there is one. | |
std::unique_ptr< LineString > | toGeometry (const GeometryFactory &gf) const |
int | compareTo (const LineSegment &other) const |
Compares this object with the specified object for order. | |
std::ostream & | operator<< (std::ostream &o) |
bool | operator== (const LineSegment &rhs) const |
bool | operator< (const LineSegment &rhs) const |
bool | operator> (const LineSegment &rhs) const |
Additional Inherited Members | |
Public Types inherited from geos::geom::LineSegment | |
using | UnorderedSet = std::unordered_set< LineSegment, HashCode > |
Static Public Member Functions inherited from geos::geom::LineSegment | |
static CoordinateXY | midPoint (const CoordinateXY &pt0, const CoordinateXY &pt1) |
Public Attributes inherited from geos::geom::LineSegment | |
Coordinate | p0 |
Coordinate | p1 |
Segment start. | |
A geom::LineSegment which is tagged with its location in a geom::Geometry.
Used to index the segments in a geometry and recover the segment locations from the index.