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

The node component of a geometry graph. More...

#include <Node.h>

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

Public Member Functions

 Node (const geom::Coordinate &newCoord, EdgeEndStar *newEdges)
 
 ~Node () override
 
virtual const geom::CoordinategetCoordinate () const
 
virtual EdgeEndStargetEdges ()
 
bool isIsolated () const override
 
virtual void add (EdgeEnd *e)
 Add the edge to the list of edges at this node. More...
 
virtual void mergeLabel (const Node &n)
 
virtual void mergeLabel (const Label &label2)
 To merge labels for two nodes, the merged location for each LabelElement is computed. More...
 
virtual void setLabel (int argIndex, geom::Location onLocation)
 
virtual void setLabelBoundary (int argIndex)
 Updates the label of a node to BOUNDARY, obeying the mod-2 boundaryDetermination rule. More...
 
virtual geom::Location computeMergedLocation (const Label &label2, int eltIndex)
 
virtual std::string print ()
 
virtual const std::vector< double > & getZ () const
 
virtual void addZ (double)
 
virtual bool isIncidentEdgeInResult () const
 Tests whether any incident edge is flagged as being in the result. More...
 
- 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)
 

Protected Member Functions

void testInvariant () const
 
void computeIM (geom::IntersectionMatrix &) override
 Basic nodes do not compute IMs. More...
 

Protected Attributes

geom::Coordinate coord
 
EdgeEndStaredges
 
- Protected Attributes inherited from geos::geomgraph::GraphComponent
Label label
 

Private Attributes

std::vector< double > zvals
 
double ztot
 

Friends

std::ostream & operator<< (std::ostream &os, const Node &node)
 

Detailed Description

The node component of a geometry graph.

Definition at line 62 of file geomgraph/Node.h.

Constructor & Destructor Documentation

geos::geomgraph::Node::Node ( const geom::Coordinate newCoord,
EdgeEndStar newEdges 
)
geos::geomgraph::Node::~Node ( )
override

Member Function Documentation

virtual void geos::geomgraph::Node::add ( EdgeEnd e)
virtual

Add the edge to the list of edges at this node.

virtual void geos::geomgraph::Node::addZ ( double  )
virtual
void geos::geomgraph::Node::computeIM ( geom::IntersectionMatrix )
inlineoverrideprotectedvirtual

Basic nodes do not compute IMs.

Implements geos::geomgraph::GraphComponent.

Reimplemented in geos::operation::relate::RelateNode.

Definition at line 144 of file geomgraph/Node.h.

virtual geom::Location geos::geomgraph::Node::computeMergedLocation ( const Label label2,
int  eltIndex 
)
virtual

The location for a given eltIndex for a node will be one of { null, INTERIOR, BOUNDARY }. A node may be on both the boundary and the interior of a geometry; in this case, the rule is that the node is considered to be in the boundary. The merged location is the maximum of the two input values.

virtual const geom::Coordinate& geos::geomgraph::Node::getCoordinate ( ) const
virtual

Referenced by geos::geomgraph::NodeMap::testInvariant().

Here is the caller graph for this function:

virtual EdgeEndStar* geos::geomgraph::Node::getEdges ( )
virtual

Referenced by geos::geomgraph::PlanarGraph::linkResultDirectedEdges().

Here is the caller graph for this function:

virtual const std::vector<double>& geos::geomgraph::Node::getZ ( ) const
virtual
virtual bool geos::geomgraph::Node::isIncidentEdgeInResult ( ) const
virtual

Tests whether any incident edge is flagged as being in the result.

This test can be used to determine if the node is in the result, since if any incident edge is in the result, the node must be in the result as well.

Returns
true if any indicident edge in the in the result
bool geos::geomgraph::Node::isIsolated ( ) const
overridevirtual
virtual void geos::geomgraph::Node::mergeLabel ( const Node n)
virtual
virtual void geos::geomgraph::Node::mergeLabel ( const Label label2)
virtual

To merge labels for two nodes, the merged location for each LabelElement is computed.

The location for the corresponding node LabelElement is set to the result, as long as the location is non-null.

virtual std::string geos::geomgraph::Node::print ( )
virtual
virtual void geos::geomgraph::Node::setLabel ( int  argIndex,
geom::Location  onLocation 
)
virtual
virtual void geos::geomgraph::Node::setLabelBoundary ( int  argIndex)
virtual

Updates the label of a node to BOUNDARY, obeying the mod-2 boundaryDetermination rule.

void geos::geomgraph::Node::testInvariant ( ) const
inlineprotected

Definition at line 157 of file geomgraph/Node.h.

References geos::geom::Coordinate::equals2D(), and geos::geomgraph::EdgeEnd::getCoordinate().

Here is the call graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Node node 
)
friend

Member Data Documentation

geom::Coordinate geos::geomgraph::Node::coord
protected

Definition at line 136 of file geomgraph/Node.h.

EdgeEndStar* geos::geomgraph::Node::edges
protected

Definition at line 138 of file geomgraph/Node.h.

double geos::geomgraph::Node::ztot
private

Definition at line 150 of file geomgraph/Node.h.

std::vector<double> geos::geomgraph::Node::zvals
private

Definition at line 148 of file geomgraph/Node.h.


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