GEOS 3.13.1
geos::operation::overlayng::Edge Class Reference

#include <Edge.h>

Public Member Functions

 Edge (std::unique_ptr< geom::CoordinateSequence > &&p_pts, const EdgeSourceInfo *info)
std::unique_ptr< geom::CoordinateSequencegetCoordinates ()
const geom::CoordinateSequencegetCoordinatesRO () const
geom::CoordinateSequencereleaseCoordinates ()
const geom::CoordinategetCoordinate (std::size_t index) const
std::size_t size () const
bool direction () const
bool relativeDirection (const Edge *edge2) const
int dimension (int geomIndex) const
void merge (const Edge *edge)
void populateLabel (OverlayLabel &lbl) const
bool compareTo (const Edge &e) const

Static Public Member Functions

static bool isCollapsed (const geom::CoordinateSequence *pts)

Friends

std::ostream & operator<< (std::ostream &os, const Edge &e)

Detailed Description

Represents the underlying linework for edges in a topology graph, and carries the topology information derived from the two parent geometries. The edge may be the result of the merging of two or more edges which have the same underlying linework (although possibly different orientations). In this case the topology information is derived from the merging of the information in the source edges. Merged edges can occur in the following situations

  • Due to topology collapse caused by snapping or rounding of polygonal geometries.
  • Due to coincident linework in a linear input

The source edges may have the same parent geometry, or different ones, or a mix of the two.

Author
mdavis

Member Function Documentation

◆ merge()

void geos::operation::overlayng::Edge::merge ( const Edge * edge)
inline

Merges an edge into this edge, updating the topology info accordingly.

Marks this as a shell edge if any contributing edge is a shell. Update hole status first, since it depends on edge dim

References relativeDirection().

◆ relativeDirection()

bool geos::operation::overlayng::Edge::relativeDirection ( const Edge * edge2) const
inline

Compares two coincident edges to determine whether they have the same or opposite direction.

Referenced by merge().


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