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

A directed EdgeEnd. More...

#include <DirectedEdge.h>

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

Public Member Functions

 DirectedEdge (Edge *newEdge, bool newIsForward)
 
void setInResult (bool newIsInResult)
 
bool isInResult ()
 
bool isVisited ()
 
void setVisited (bool newIsVisited)
 
void setEdgeRing (EdgeRing *newEdgeRing)
 
EdgeRinggetEdgeRing ()
 
void setMinEdgeRing (EdgeRing *newMinEdgeRing)
 
EdgeRinggetMinEdgeRing ()
 
int getDepth (int position)
 
void setDepth (int position, int newDepth)
 
int getDepthDelta () const
 
void setVisitedEdge (bool newIsVisited)
 
DirectedEdgegetSym ()
 Each Edge gives rise to a pair of symmetric DirectedEdges, in opposite directions. More...
 
bool isForward ()
 
void setSym (DirectedEdge *de)
 
DirectedEdgegetNext ()
 
void setNext (DirectedEdge *newNext)
 
DirectedEdgegetNextMin ()
 
void setNextMin (DirectedEdge *newNextMin)
 
bool isLineEdge ()
 Tells wheter this edge is a Line. More...
 
bool isInteriorAreaEdge ()
 Tells wheter this edge is an Area. More...
 
void setEdgeDepths (int position, int newDepth)
 Set both edge depths. More...
 
std::string print () const override
 
std::string printEdge ()
 
- Public Member Functions inherited from geos::geomgraph::EdgeEnd
 EdgeEnd ()
 
virtual ~EdgeEnd ()
 
 EdgeEnd (Edge *newEdge, const geom::Coordinate &newP0, const geom::Coordinate &newP1, const Label &newLabel)
 
 EdgeEnd (Edge *newEdge, const geom::Coordinate &newP0, const geom::Coordinate &newP1)
 
EdgegetEdge ()
 
LabelgetLabel ()
 
const LabelgetLabel () const
 
virtual geom::CoordinategetCoordinate ()
 
const geom::CoordinategetCoordinate () const
 
virtual geom::CoordinategetDirectedCoordinate ()
 
virtual int getQuadrant ()
 
virtual double getDx ()
 
virtual double getDy ()
 
virtual void setNode (Node *newNode)
 
virtual NodegetNode ()
 
virtual int compareTo (const EdgeEnd *e) const
 
virtual int compareDirection (const EdgeEnd *e) const
 
virtual void computeLabel (const algorithm::BoundaryNodeRule &bnr)
 

Static Public Member Functions

static int depthFactor (geom::Location currLocation, geom::Location nextLocation)
 Computes the factor for the change in depth when moving from one location to another. E.g. if crossing from the INTERIOR to the EXTERIOR the depth decreases, so the factor is -1. More...
 

Protected Attributes

bool isForwardVar
 
- Protected Attributes inherited from geos::geomgraph::EdgeEnd
Edgeedge
 
Label label
 

Private Member Functions

void computeDirectedLabel ()
 Compute the label in the appropriate orientation for this DirEdge. More...
 

Private Attributes

bool isInResultVar
 
bool isVisitedVar
 
DirectedEdgesym
 the symmetric edge More...
 
DirectedEdgenext
 the next edge in the edge ring for the polygon containing this edge More...
 
DirectedEdgenextMin
 the next edge in the MinimalEdgeRing that contains this edge More...
 
EdgeRingedgeRing
 the EdgeRing that this edge is part of More...
 
EdgeRingminEdgeRing
 the MinimalEdgeRing that this edge is part of More...
 
int depth [3]
 The depth of each side (position) of this edge. The 0 element of the array is never used. More...
 

Additional Inherited Members

- Protected Member Functions inherited from geos::geomgraph::EdgeEnd
 EdgeEnd (Edge *newEdge)
 
virtual void init (const geom::Coordinate &newP0, const geom::Coordinate &newP1)
 

Detailed Description

A directed EdgeEnd.

Definition at line 45 of file geomgraph/DirectedEdge.h.

Constructor & Destructor Documentation

geos::geomgraph::DirectedEdge::DirectedEdge ( Edge newEdge,
bool  newIsForward 
)

Member Function Documentation

void geos::geomgraph::DirectedEdge::computeDirectedLabel ( )
private

Compute the label in the appropriate orientation for this DirEdge.

static int geos::geomgraph::DirectedEdge::depthFactor ( geom::Location  currLocation,
geom::Location  nextLocation 
)
static

Computes the factor for the change in depth when moving from one location to another. E.g. if crossing from the INTERIOR to the EXTERIOR the depth decreases, so the factor is -1.

int geos::geomgraph::DirectedEdge::getDepth ( int  position)
int geos::geomgraph::DirectedEdge::getDepthDelta ( ) const
EdgeRing* geos::geomgraph::DirectedEdge::getEdgeRing ( )
EdgeRing* geos::geomgraph::DirectedEdge::getMinEdgeRing ( )
DirectedEdge* geos::geomgraph::DirectedEdge::getNext ( )
DirectedEdge* geos::geomgraph::DirectedEdge::getNextMin ( )
DirectedEdge* geos::geomgraph::DirectedEdge::getSym ( )

Each Edge gives rise to a pair of symmetric DirectedEdges, in opposite directions.

Returns
the DirectedEdge for the same Edge but in the opposite direction
bool geos::geomgraph::DirectedEdge::isForward ( )
bool geos::geomgraph::DirectedEdge::isInResult ( )
bool geos::geomgraph::DirectedEdge::isInteriorAreaEdge ( )

Tells wheter this edge is an Area.

This is an interior Area edge if

  • its label is an Area label for both Geometries
  • and for each Geometry both sides are in the interior.
Returns
true if this is an interior Area edge
bool geos::geomgraph::DirectedEdge::isLineEdge ( )

Tells wheter this edge is a Line.

This edge is a line edge if

  • at least one of the labels is a line label
  • any labels which are not line labels have all Locations = EXTERIOR
bool geos::geomgraph::DirectedEdge::isVisited ( )
std::string geos::geomgraph::DirectedEdge::print ( ) const
overridevirtual

Reimplemented from geos::geomgraph::EdgeEnd.

std::string geos::geomgraph::DirectedEdge::printEdge ( )
void geos::geomgraph::DirectedEdge::setDepth ( int  position,
int  newDepth 
)
void geos::geomgraph::DirectedEdge::setEdgeDepths ( int  position,
int  newDepth 
)

Set both edge depths.

One depth for a given side is provided. The other is computed depending on the Location transition and the depthDelta of the edge.

void geos::geomgraph::DirectedEdge::setEdgeRing ( EdgeRing newEdgeRing)
void geos::geomgraph::DirectedEdge::setInResult ( bool  newIsInResult)
void geos::geomgraph::DirectedEdge::setMinEdgeRing ( EdgeRing newMinEdgeRing)
void geos::geomgraph::DirectedEdge::setNext ( DirectedEdge newNext)
void geos::geomgraph::DirectedEdge::setNextMin ( DirectedEdge newNextMin)
void geos::geomgraph::DirectedEdge::setSym ( DirectedEdge de)
void geos::geomgraph::DirectedEdge::setVisited ( bool  newIsVisited)
void geos::geomgraph::DirectedEdge::setVisitedEdge ( bool  newIsVisited)

Marks both DirectedEdges attached to a given Edge.

This is used for edges corresponding to lines, which will only appear oriented in a single direction in the result.

Member Data Documentation

int geos::geomgraph::DirectedEdge::depth[3]
private

The depth of each side (position) of this edge. The 0 element of the array is never used.

Definition at line 179 of file geomgraph/DirectedEdge.h.

EdgeRing* geos::geomgraph::DirectedEdge::edgeRing
private

the EdgeRing that this edge is part of

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

bool geos::geomgraph::DirectedEdge::isForwardVar
protected

Definition at line 152 of file geomgraph/DirectedEdge.h.

bool geos::geomgraph::DirectedEdge::isInResultVar
private

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

bool geos::geomgraph::DirectedEdge::isVisitedVar
private

Definition at line 158 of file geomgraph/DirectedEdge.h.

EdgeRing* geos::geomgraph::DirectedEdge::minEdgeRing
private

the MinimalEdgeRing that this edge is part of

Definition at line 173 of file geomgraph/DirectedEdge.h.

DirectedEdge* geos::geomgraph::DirectedEdge::next
private

the next edge in the edge ring for the polygon containing this edge

Definition at line 164 of file geomgraph/DirectedEdge.h.

DirectedEdge* geos::geomgraph::DirectedEdge::nextMin
private

the next edge in the MinimalEdgeRing that contains this edge

Definition at line 167 of file geomgraph/DirectedEdge.h.

DirectedEdge* geos::geomgraph::DirectedEdge::sym
private

the symmetric edge

Definition at line 161 of file geomgraph/DirectedEdge.h.


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