GEOS  3.9.1dev
Public Member Functions | Private Attributes | List of all members
geos::simplify::TaggedLineSegment Class Reference

A geom::LineSegment which is tagged with its location in a geom::Geometry. More...

#include <TaggedLineSegment.h>

Inheritance diagram for geos::simplify::TaggedLineSegment:
[legend]
Collaboration diagram for geos::simplify::TaggedLineSegment:
[legend]

Public Member Functions

 TaggedLineSegment (const geom::Coordinate &p0, const geom::Coordinate &p1, const geom::Geometry *parent, size_t index)
 
 TaggedLineSegment (const geom::Coordinate &p0, const geom::Coordinate &p1)
 
 TaggedLineSegment (const TaggedLineSegment &ls)
 
const geom::GeometrygetParent () const
 
size_t getIndex () const
 
- Public Member Functions inherited from geos::geom::LineSegment
 LineSegment ()
 Segment end. More...
 
 LineSegment (const Coordinate &c0, const Coordinate &c1)
 Constructs a LineSegment with the given start and end Coordinates. More...
 
 LineSegment (double x0, double y0, double x1, double y1)
 
void setCoordinates (const Coordinate &c0, const Coordinate &c1)
 
const Coordinateoperator[] (std::size_t i) const
 
Coordinateoperator[] (std::size_t i)
 
void setCoordinates (const LineSegment &ls)
 
double getLength () const
 Computes the length of the line segment. More...
 
bool isHorizontal () const
 
bool isVertical () const
 
int orientationIndex (const LineSegment &seg) const
 
int orientationIndex (const LineSegment *seg) const
 
int orientationIndex (const Coordinate &p) const
 Determines the orientation index of a Coordinate relative to this segment. More...
 
void reverse ()
 Reverses the direction of the line segment. More...
 
void normalize ()
 Puts the line segment into a normalized form. More...
 
double angle () const
 
void midPoint (Coordinate &ret) const
 Computes the midpoint of the segment. More...
 
double distance (const LineSegment &ls) const
 Computes the distance between this line segment and another one. More...
 
double distance (const Coordinate &p) const
 Computes the distance between this line segment and a point. More...
 
double distancePerpendicular (const Coordinate &p) const
 Computes the perpendicular distance between the (infinite) line defined by this line segment and a point. More...
 
void pointAlong (double segmentLengthFraction, Coordinate &ret) const
 Computes the Coordinate that lies a given fraction along the line defined by this segment. More...
 
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. More...
 
double projectionFactor (const Coordinate &p) const
 Compute the projection factor for the projection of the point p onto this LineSegment. More...
 
double segmentFraction (const Coordinate &inputPt) const
 Computes the fraction of distance (in [0.0, 1.0]) that the projection of a point occurs along this line segment. More...
 
void project (const Coordinate &p, Coordinate &ret) const
 Compute the projection of a point onto the line determined by this line segment. More...
 
bool project (const LineSegment &seg, LineSegment &ret) const
 Project a line segment onto this line segment and return the resulting line segment. More...
 
void closestPoint (const Coordinate &p, Coordinate &ret) const
 Computes the closest point on this line segment to another point. More...
 
int compareTo (const LineSegment &other) const
 Compares this object with the specified object for order. More...
 
bool equalsTopo (const LineSegment &other) const
 Returns true if other is topologically equal to this LineSegment (e.g. irrespective of orientation). More...
 
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. More...
 
std::unique_ptr< LineStringtoGeometry (const GeometryFactory &gf) const
 

Private Attributes

const geom::Geometryparent
 
size_t index
 

Additional Inherited Members

- Public Attributes inherited from geos::geom::LineSegment
Coordinate p0
 
Coordinate p1
 Segment start. More...
 

Detailed Description

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.

Definition at line 54 of file TaggedLineSegment.h.

Constructor & Destructor Documentation

geos::simplify::TaggedLineSegment::TaggedLineSegment ( const geom::Coordinate p0,
const geom::Coordinate p1,
const geom::Geometry parent,
size_t  index 
)
geos::simplify::TaggedLineSegment::TaggedLineSegment ( const geom::Coordinate p0,
const geom::Coordinate p1 
)
geos::simplify::TaggedLineSegment::TaggedLineSegment ( const TaggedLineSegment ls)

Member Function Documentation

size_t geos::simplify::TaggedLineSegment::getIndex ( ) const
const geom::Geometry* geos::simplify::TaggedLineSegment::getParent ( ) const

Member Data Documentation

size_t geos::simplify::TaggedLineSegment::index
private

Definition at line 76 of file TaggedLineSegment.h.

const geom::Geometry* geos::simplify::TaggedLineSegment::parent
private

Definition at line 74 of file TaggedLineSegment.h.


The documentation for this class was generated from the following file: