GEOS  3.9.1dev
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
geos::operation::overlayng::Edge Class Reference

#include <Edge.h>

Public Member Functions

 Edge ()
 
 Edge (geom::CoordinateSequence *p_pts, const EdgeSourceInfo *info)
 
std::unique_ptr< geom::CoordinateSequencegetCoordinates ()
 
const geom::CoordinateSequencegetCoordinatesRO () const
 
geom::CoordinateSequencereleaseCoordinates ()
 
const geom::CoordinategetCoordinate (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 &ovl) const
 
bool compareTo (const Edge &e) const
 

Static Public Member Functions

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

Private Member Functions

void initLabel (OverlayLabel &lbl, int geomIndex, int dim, int depthDelta, bool isHole) const
 
int labelDim (int dim, int depthDelta) const
 
bool isHole (int index) const
 
bool isBoundary (int geomIndex) const
 
bool isShell (int geomIndex) const
 
geom::Location locationRight (int depthDelta) const
 
geom::Location locationLeft (int depthDelta) const
 
int delSign (int depthDel) const
 
void copyInfo (const EdgeSourceInfo *info)
 
bool isHoleMerged (int geomIndex, const Edge *edge1, const Edge *edge2) const
 

Private Attributes

int aDim = OverlayLabel::DIM_UNKNOWN
 
int aDepthDelta = 0
 
bool aIsHole = false
 
int bDim = OverlayLabel::DIM_UNKNOWN
 
int bDepthDelta = 0
 
bool bIsHole = false
 
std::unique_ptr< geom::CoordinateSequencepts
 

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

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

Author
mdavis

Definition at line 62 of file operation/overlayng/Edge.h.

Constructor & Destructor Documentation

geos::operation::overlayng::Edge::Edge ( )
inline

Definition at line 114 of file operation/overlayng/Edge.h.

References geos::geom::operator<<().

Here is the call graph for this function:

geos::operation::overlayng::Edge::Edge ( geom::CoordinateSequence p_pts,
const EdgeSourceInfo info 
)

Member Function Documentation

bool geos::operation::overlayng::Edge::compareTo ( const Edge e) const
inline

Definition at line 159 of file operation/overlayng/Edge.h.

References geos::geom::Coordinate::compareTo(), geos::operation::overlayng::EdgeComparator(), and getCoordinate().

Here is the call graph for this function:

void geos::operation::overlayng::Edge::copyInfo ( const EdgeSourceInfo info)
private
int geos::operation::overlayng::Edge::delSign ( int  depthDel) const
private
int geos::operation::overlayng::Edge::dimension ( int  geomIndex) const
bool geos::operation::overlayng::Edge::direction ( ) const
const geom::Coordinate& geos::operation::overlayng::Edge::getCoordinate ( size_t  index) const

Referenced by compareTo().

Here is the caller graph for this function:

std::unique_ptr<geom::CoordinateSequence> geos::operation::overlayng::Edge::getCoordinates ( )
const geom::CoordinateSequence* geos::operation::overlayng::Edge::getCoordinatesRO ( ) const
void geos::operation::overlayng::Edge::initLabel ( OverlayLabel lbl,
int  geomIndex,
int  dim,
int  depthDelta,
bool  isHole 
) const
private

Populates the label for an edge resulting from an input geometry.

  • If the edge is not part of the input, the label is left as NOT_PART
  • If input is an Area and the edge is on the boundary (which may include some collapses), edge is marked as an AREA edge and side locations are assigned
  • If input is an Area and the edge is collapsed (depth delta = 0), the label is set to COLLAPSE. The location will be determined later by evaluating the final graph topology.
  • If input is a Line edge is set to a LINE edge. For line edges the line location is not significant (since there is no parent area for which to determine location).
bool geos::operation::overlayng::Edge::isBoundary ( int  geomIndex) const
private
static bool geos::operation::overlayng::Edge::isCollapsed ( const geom::CoordinateSequence pts)
static
bool geos::operation::overlayng::Edge::isHole ( int  index) const
private
bool geos::operation::overlayng::Edge::isHoleMerged ( int  geomIndex,
const Edge edge1,
const Edge edge2 
) const
private
bool geos::operation::overlayng::Edge::isShell ( int  geomIndex) const
private

Tests whether the edge is part of a shell in the given geometry. This is only the case if the edge is a boundary.

int geos::operation::overlayng::Edge::labelDim ( int  dim,
int  depthDelta 
) const
private
geom::Location geos::operation::overlayng::Edge::locationLeft ( int  depthDelta) const
private
geom::Location geos::operation::overlayng::Edge::locationRight ( int  depthDelta) const
private
void geos::operation::overlayng::Edge::merge ( const Edge edge)

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

void geos::operation::overlayng::Edge::populateLabel ( OverlayLabel ovl) const
bool geos::operation::overlayng::Edge::relativeDirection ( const Edge edge2) const

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

geom::CoordinateSequence* geos::operation::overlayng::Edge::releaseCoordinates ( )
std::size_t geos::operation::overlayng::Edge::size ( ) const

Friends And Related Function Documentation

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

Member Data Documentation

int geos::operation::overlayng::Edge::aDepthDelta = 0
private

Definition at line 68 of file operation/overlayng/Edge.h.

int geos::operation::overlayng::Edge::aDim = OverlayLabel::DIM_UNKNOWN
private

Definition at line 67 of file operation/overlayng/Edge.h.

bool geos::operation::overlayng::Edge::aIsHole = false
private

Definition at line 69 of file operation/overlayng/Edge.h.

int geos::operation::overlayng::Edge::bDepthDelta = 0
private

Definition at line 71 of file operation/overlayng/Edge.h.

int geos::operation::overlayng::Edge::bDim = OverlayLabel::DIM_UNKNOWN
private

Definition at line 70 of file operation/overlayng/Edge.h.

bool geos::operation::overlayng::Edge::bIsHole = false
private

Definition at line 72 of file operation/overlayng/Edge.h.

std::unique_ptr<geom::CoordinateSequence> geos::operation::overlayng::Edge::pts
private

Definition at line 73 of file operation/overlayng/Edge.h.


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