GEOS 3.14.0dev
Public Member Functions | Protected Member Functions | Protected 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:
geos::geomgraph::GraphComponent geos::operation::relate::RelateNode

Public Member Functions

 Node (const geom::Coordinate &newCoord, EdgeEndStar *newEdges)
 
const geom::CoordinategetCoordinate () const
 
EdgeEndStargetEdges ()
 
bool isIsolated () const override
 
void add (EdgeEnd *e)
 Add the edge to the list of edges at this node.
 
void mergeLabel (const Node &n)
 
void mergeLabel (const Label &label2)
 To merge labels for two nodes, the merged location for each LabelElement is computed.
 
void setLabel (uint8_t argIndex, geom::Location onLocation)
 
void setLabelBoundary (uint8_t argIndex)
 Updates the label of a node to BOUNDARY, obeying the mod-2 boundaryDetermination rule.
 
geom::Location computeMergedLocation (const Label &label2, uint8_t eltIndex)
 
std::string print () const
 
const std::vector< double > & getZ () const
 
void addZ (double)
 
bool isIncidentEdgeInResult () const
 Tests whether any incident edge is flagged as being in the result.
 
- Public Member Functions inherited from geos::geomgraph::GraphComponent
 GraphComponent (const Label &newLabel)
 
LabelgetLabel ()
 
const LabelgetLabel () const
 
void setLabel (const Label &newLabel)
 
void setInResult (bool p_isInResult)
 
bool isInResult () const
 
void setCovered (bool isCovered)
 
bool isCovered () const
 
bool isCoveredSet () const
 
bool isVisited () const
 
void setVisited (bool p_isVisited)
 
void updateIM (geom::IntersectionMatrix &im)
 

Protected Member Functions

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

Protected Attributes

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

Friends

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

Detailed Description

The node component of a geometry graph.

Member Function Documentation

◆ computeIM()

void geos::geomgraph::Node::computeIM ( geom::IntersectionMatrix )
inlineoverrideprotectedvirtual

Basic nodes do not compute IMs.

Implements geos::geomgraph::GraphComponent.

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

◆ computeMergedLocation()

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

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.

◆ isIncidentEdgeInResult()

bool geos::geomgraph::Node::isIncidentEdgeInResult ( ) const

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

◆ isIsolated()

bool geos::geomgraph::Node::isIsolated ( ) const
overridevirtual

◆ mergeLabel()

void geos::geomgraph::Node::mergeLabel ( const Label label2)

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.


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