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

#include <MaximalEdgeRing.h>

Collaboration diagram for geos::operation::overlayng::MaximalEdgeRing:
[legend]

Public Member Functions

 MaximalEdgeRing (OverlayEdge *e)
 
std::vector< std::unique_ptr< OverlayEdgeRing > > buildMinimalRings (const GeometryFactory *geometryFactory)
 

Static Public Member Functions

static void linkResultAreaMaxRingAtNode (OverlayEdge *nodeEdge)
 

Private Member Functions

void attachEdges (OverlayEdge *startEdge)
 
void linkMinimalRings ()
 

Static Private Member Functions

static void linkMinRingEdgesAtNode (OverlayEdge *nodeEdge, MaximalEdgeRing *maxRing)
 
static bool isAlreadyLinked (OverlayEdge *edge, MaximalEdgeRing *maxRing)
 
static OverlayEdgeselectMaxOutEdge (OverlayEdge *currOut, MaximalEdgeRing *maxEdgeRing)
 
static OverlayEdgelinkMaxInEdge (OverlayEdge *currOut, OverlayEdge *currMaxRingOut, MaximalEdgeRing *maxEdgeRing)
 

Private Attributes

OverlayEdgestartEdge
 

Static Private Attributes

static constexpr int STATE_FIND_INCOMING = 1
 
static constexpr int STATE_LINK_OUTGOING = 2
 

Friends

std::ostream & operator<< (std::ostream &os, const MaximalEdgeRing &mer)
 

Detailed Description

Definition at line 44 of file g/MaximalEdgeRing.h.

Constructor & Destructor Documentation

geos::operation::overlayng::MaximalEdgeRing::MaximalEdgeRing ( OverlayEdge e)
inline

Definition at line 92 of file g/MaximalEdgeRing.h.

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

Here is the call graph for this function:

Member Function Documentation

void geos::operation::overlayng::MaximalEdgeRing::attachEdges ( OverlayEdge startEdge)
private
std::vector<std::unique_ptr<OverlayEdgeRing> > geos::operation::overlayng::MaximalEdgeRing::buildMinimalRings ( const GeometryFactory geometryFactory)
static bool geos::operation::overlayng::MaximalEdgeRing::isAlreadyLinked ( OverlayEdge edge,
MaximalEdgeRing maxRing 
)
staticprivate

Tests if an edge of the maximal edge ring is already linked into a minimal OverlayEdgeRing. If so, this node has already been processed earlier in the maximal edgering linking scan.

Parameters
edgean edge of a maximal edgering
maxRingthe maximal edgering
Returns
true if the edge has already been linked into a minimal edgering.
static OverlayEdge* geos::operation::overlayng::MaximalEdgeRing::linkMaxInEdge ( OverlayEdge currOut,
OverlayEdge currMaxRingOut,
MaximalEdgeRing maxEdgeRing 
)
staticprivate
void geos::operation::overlayng::MaximalEdgeRing::linkMinimalRings ( )
private
static void geos::operation::overlayng::MaximalEdgeRing::linkMinRingEdgesAtNode ( OverlayEdge nodeEdge,
MaximalEdgeRing maxRing 
)
staticprivate

Links the edges of a MaximalEdgeRing around this node into minimal edge rings (OverlayEdgeRings). Minimal ring edges are linked in the opposite orientation (CW) to the maximal ring. This changes self-touching rings into a two or more separate rings, as per the OGC SFS polygon topology semantics. This relinking must be done to each max ring separately, rather than all the node result edges, since there may be more than one max ring incident at the node.

Parameters
nodeEdgean edge originating at this node
maxRingthe maximal ring to link
static void geos::operation::overlayng::MaximalEdgeRing::linkResultAreaMaxRingAtNode ( OverlayEdge nodeEdge)
static

Traverses the star of edges originating at a node and links consecutive result edges together into maximal edge rings. To link two edges the resultNextMax< pointer for an incoming< result edge is set to the next outgoing result edge.

Edges are linked when:

  • they belong to an area (i.e. they have sides)
  • they are marked as being in the result

Edges are linked in CCW order (which is the order they are linked in the underlying graph). This means that rings have their face on the Right (in other words, the topological location of the face is given by the RHS label of the DirectedEdge). This produces rings with CW orientation.

PRECONDITIONS:

  • This edge is in the result
  • This edge is not yet linked
  • The edge and its sym are NOT both marked as being in the result
static OverlayEdge* geos::operation::overlayng::MaximalEdgeRing::selectMaxOutEdge ( OverlayEdge currOut,
MaximalEdgeRing maxEdgeRing 
)
staticprivate

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const MaximalEdgeRing mer 
)
friend

Member Data Documentation

OverlayEdge* geos::operation::overlayng::MaximalEdgeRing::startEdge
private

Definition at line 53 of file g/MaximalEdgeRing.h.

constexpr int geos::operation::overlayng::MaximalEdgeRing::STATE_FIND_INCOMING = 1
staticprivate

Definition at line 49 of file g/MaximalEdgeRing.h.

constexpr int geos::operation::overlayng::MaximalEdgeRing::STATE_LINK_OUTGOING = 2
staticprivate

Definition at line 50 of file g/MaximalEdgeRing.h.


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