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

#include <Edge.h>

Inheritance diagram for geos::geomgraph::Edge:
[legend]
Collaboration diagram for geos::geomgraph::Edge:
[legend]

Public Member Functions

void testInvariant () const
 
 Edge (geom::CoordinateSequence *newPts, const Label &newLabel)
 Takes ownership of CoordinateSequence. More...
 
 Edge (geom::CoordinateSequence *newPts)
 Takes ownership of CoordinateSequence. More...
 
 ~Edge () override
 
virtual size_t getNumPoints () const
 
virtual const geom::CoordinateSequencegetCoordinates () const
 
virtual const geom::CoordinategetCoordinate (size_t i) const
 
virtual const geom::CoordinategetCoordinate () const
 
virtual DepthgetDepth ()
 
virtual int getDepthDelta () const
 The depthDelta is the change in depth as an edge is crossed from R to L. More...
 
virtual void setDepthDelta (int newDepthDelta)
 
virtual size_t getMaximumSegmentIndex () const
 
virtual EdgeIntersectionListgetEdgeIntersectionList ()
 
virtual index::MonotoneChainEdgegetMonotoneChainEdge ()
 Return this Edge's index::MonotoneChainEdge, ownership is retained by this object. More...
 
virtual bool isClosed () const
 
virtual bool isCollapsed () const
 An Edge is collapsed if it is an Area edge and it consists of two segments which are equal and opposite (eg a zero-width V). More...
 
virtual EdgegetCollapsedEdge ()
 
virtual void setIsolated (bool newIsIsolated)
 
bool isIsolated () const override
 
virtual void addIntersections (algorithm::LineIntersector *li, size_t segmentIndex, size_t geomIndex)
 Adds EdgeIntersections for one or both intersections found for a segment of an edge to the edge intersection list. More...
 
virtual void addIntersection (algorithm::LineIntersector *li, size_t segmentIndex, size_t geomIndex, size_t intIndex)
 Add an EdgeIntersection for intersection intIndex. More...
 
void computeIM (geom::IntersectionMatrix &im) override
 Update the IM with the contribution for this component. More...
 
virtual bool isPointwiseEqual (const Edge *e) const
 return true if the coordinate sequences of the Edges are identical More...
 
virtual std::string print () const
 
virtual std::string printReverse () const
 
virtual bool equals (const Edge &e) const
 
virtual bool equals (const Edge *e) const
 
virtual const geom::EnvelopegetEnvelope ()
 
- Public Member Functions inherited from geos::geomgraph::GraphComponent
 GraphComponent ()
 
 GraphComponent (const Label &newLabel)
 
virtual ~GraphComponent ()=default
 
LabelgetLabel ()
 
const LabelgetLabel () const
 
void setLabel (const Label &newLabel)
 
virtual void setInResult (bool p_isInResult)
 
virtual bool isInResult () const
 
virtual void setCovered (bool isCovered)
 
virtual bool isCovered () const
 
virtual bool isCoveredSet () const
 
virtual bool isVisited () const
 
virtual void setVisited (bool p_isVisited)
 
virtual void updateIM (geom::IntersectionMatrix &im)
 

Static Public Member Functions

static void updateIM (const Label &lbl, geom::IntersectionMatrix &im)
 

Public Attributes

std::unique_ptr< geom::CoordinateSequencepts
 Externally-set, owned by Edge. FIXME: refuse ownership. More...
 
EdgeIntersectionList eiList
 

Private Attributes

std::unique_ptr< index::MonotoneChainEdgemce
 Lazily-created, owned by Edge. More...
 
geom::Envelope env
 
Depth depth
 
int depthDelta
 
bool isIsolatedVar
 

Friends

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

Additional Inherited Members

- Protected Attributes inherited from geos::geomgraph::GraphComponent
Label label
 

Detailed Description

The edge component of a geometry graph

Definition at line 66 of file geomgraph/Edge.h.

Constructor & Destructor Documentation

geos::geomgraph::Edge::Edge ( geom::CoordinateSequence newPts,
const Label newLabel 
)

Takes ownership of CoordinateSequence.

geos::geomgraph::Edge::Edge ( geom::CoordinateSequence newPts)

Takes ownership of CoordinateSequence.

geos::geomgraph::Edge::~Edge ( )
override

Member Function Documentation

virtual void geos::geomgraph::Edge::addIntersection ( algorithm::LineIntersector li,
size_t  segmentIndex,
size_t  geomIndex,
size_t  intIndex 
)
virtual

Add an EdgeIntersection for intersection intIndex.

An intersection that falls exactly on a vertex of the edge is normalized to use the higher of the two possible segmentIndexes

virtual void geos::geomgraph::Edge::addIntersections ( algorithm::LineIntersector li,
size_t  segmentIndex,
size_t  geomIndex 
)
virtual

Adds EdgeIntersections for one or both intersections found for a segment of an edge to the edge intersection list.

void geos::geomgraph::Edge::computeIM ( geom::IntersectionMatrix im)
inlineoverridevirtual

Update the IM with the contribution for this component.

A component only contributes if it has a labelling for both parent geometries

Implements geos::geomgraph::GraphComponent.

Definition at line 232 of file geomgraph/Edge.h.

virtual bool geos::geomgraph::Edge::equals ( const Edge e) const
virtual

equals is defined to be:

e1 equals e2 iff the coordinates of e1 are the same or the reverse of the coordinates in e2

Referenced by geos::geomgraph::operator==().

Here is the caller graph for this function:

virtual bool geos::geomgraph::Edge::equals ( const Edge e) const
inlinevirtual

Definition at line 255 of file geomgraph/Edge.h.

virtual Edge* geos::geomgraph::Edge::getCollapsedEdge ( )
virtual
virtual const geom::Coordinate& geos::geomgraph::Edge::getCoordinate ( size_t  i) const
inlinevirtual

Definition at line 122 of file geomgraph/Edge.h.

virtual const geom::Coordinate& geos::geomgraph::Edge::getCoordinate ( ) const
inlinevirtual

Definition at line 129 of file geomgraph/Edge.h.

virtual const geom::CoordinateSequence* geos::geomgraph::Edge::getCoordinates ( void  ) const
inlinevirtual

Definition at line 115 of file geomgraph/Edge.h.

virtual Depth& geos::geomgraph::Edge::getDepth ( )
inlinevirtual

Definition at line 137 of file geomgraph/Edge.h.

virtual int geos::geomgraph::Edge::getDepthDelta ( ) const
inlinevirtual

The depthDelta is the change in depth as an edge is crossed from R to L.

Returns
the change in depth as the edge is crossed from R to L

Definition at line 149 of file geomgraph/Edge.h.

virtual EdgeIntersectionList& geos::geomgraph::Edge::getEdgeIntersectionList ( )
inlinevirtual

Definition at line 170 of file geomgraph/Edge.h.

virtual const geom::Envelope* geos::geomgraph::Edge::getEnvelope ( )
virtual
virtual size_t geos::geomgraph::Edge::getMaximumSegmentIndex ( ) const
inlinevirtual

Definition at line 163 of file geomgraph/Edge.h.

virtual index::MonotoneChainEdge* geos::geomgraph::Edge::getMonotoneChainEdge ( )
virtual

Return this Edge's index::MonotoneChainEdge, ownership is retained by this object.

virtual size_t geos::geomgraph::Edge::getNumPoints ( ) const
inlinevirtual

Definition at line 109 of file geomgraph/Edge.h.

virtual bool geos::geomgraph::Edge::isClosed ( ) const
inlinevirtual

Definition at line 183 of file geomgraph/Edge.h.

virtual bool geos::geomgraph::Edge::isCollapsed ( ) const
virtual

An Edge is collapsed if it is an Area edge and it consists of two segments which are equal and opposite (eg a zero-width V).

bool geos::geomgraph::Edge::isIsolated ( ) const
inlineoverridevirtual

Implements geos::geomgraph::GraphComponent.

Definition at line 205 of file geomgraph/Edge.h.

virtual bool geos::geomgraph::Edge::isPointwiseEqual ( const Edge e) const
virtual

return true if the coordinate sequences of the Edges are identical

virtual std::string geos::geomgraph::Edge::print ( ) const
virtual
virtual std::string geos::geomgraph::Edge::printReverse ( ) const
virtual
virtual void geos::geomgraph::Edge::setDepthDelta ( int  newDepthDelta)
inlinevirtual

Definition at line 156 of file geomgraph/Edge.h.

virtual void geos::geomgraph::Edge::setIsolated ( bool  newIsIsolated)
inlinevirtual

Definition at line 198 of file geomgraph/Edge.h.

void geos::geomgraph::Edge::testInvariant ( ) const
inline

Definition at line 85 of file geomgraph/Edge.h.

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

Here is the call graph for this function:

static void geos::geomgraph::Edge::updateIM ( const Label lbl,
geom::IntersectionMatrix im 
)
static

Friends And Related Function Documentation

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

Member Data Documentation

Depth geos::geomgraph::Edge::depth
private

Definition at line 76 of file geomgraph/Edge.h.

int geos::geomgraph::Edge::depthDelta
private

Definition at line 78 of file geomgraph/Edge.h.

EdgeIntersectionList geos::geomgraph::Edge::eiList

Definition at line 98 of file geomgraph/Edge.h.

geom::Envelope geos::geomgraph::Edge::env
private

Definition at line 74 of file geomgraph/Edge.h.

bool geos::geomgraph::Edge::isIsolatedVar
private

Definition at line 80 of file geomgraph/Edge.h.

std::unique_ptr<index::MonotoneChainEdge> geos::geomgraph::Edge::mce
private

Lazily-created, owned by Edge.

Definition at line 72 of file geomgraph/Edge.h.

std::unique_ptr<geom::CoordinateSequence> geos::geomgraph::Edge::pts

Externally-set, owned by Edge. FIXME: refuse ownership.

Definition at line 96 of file geomgraph/Edge.h.


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