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

#include <EdgeRing.h>

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

Public Member Functions

 EdgeRing (DirectedEdge *newStart, const geom::GeometryFactory *newGeometryFactory)
 
virtual ~EdgeRing ()=default
 
bool isIsolated ()
 
bool isHole ()
 
geom::LinearRinggetLinearRing ()
 
LabelgetLabel ()
 
bool isShell ()
 
EdgeRinggetShell ()
 
void setShell (EdgeRing *newShell)
 
void addHole (EdgeRing *edgeRing)
 
std::unique_ptr< geom::PolygontoPolygon (const geom::GeometryFactory *geometryFactory)
 
void computeRing ()
 
virtual DirectedEdgegetNext (DirectedEdge *de)=0
 
virtual void setEdgeRing (DirectedEdge *de, EdgeRing *er)=0
 
std::vector< DirectedEdge * > & getEdges ()
 
int getMaxNodeDegree ()
 
void setInResult ()
 
bool containsPoint (const geom::Coordinate &p)
 
void testInvariant () const
 

Protected Member Functions

void computePoints (DirectedEdge *newStart)
 
void mergeLabel (const Label &deLabel)
 
void mergeLabel (const Label &deLabel, int geomIndex)
 Merge the RHS label from a DirectedEdge into the label for this EdgeRing. More...
 
void addPoints (Edge *edge, bool isForward, bool isFirstEdge)
 

Protected Attributes

DirectedEdgestartDe
 
const geom::GeometryFactorygeometryFactory
 
std::vector< std::unique_ptr< EdgeRing > > holes
 a list of EdgeRings which are holes in this EdgeRing More...
 

Private Member Functions

void computeMaxNodeDegree ()
 

Private Attributes

int maxNodeDegree
 
std::vector< DirectedEdge * > edges
 the DirectedEdges making up this EdgeRing More...
 
std::vector< geom::Coordinatepts
 
Label label
 
std::unique_ptr< geom::LinearRingring
 
bool isHoleVar
 
EdgeRingshell
 if non-null, the ring is a hole and this EdgeRing is its containing shell More...
 

Friends

std::ostream & operator<< (std::ostream &os, const EdgeRing &er)
 

Detailed Description

EdgeRing

Definition at line 60 of file geomgraph/EdgeRing.h.

Constructor & Destructor Documentation

geos::geomgraph::EdgeRing::EdgeRing ( DirectedEdge newStart,
const geom::GeometryFactory newGeometryFactory 
)
virtual geos::geomgraph::EdgeRing::~EdgeRing ( )
virtualdefault

Member Function Documentation

void geos::geomgraph::EdgeRing::addHole ( EdgeRing edgeRing)
void geos::geomgraph::EdgeRing::addPoints ( Edge edge,
bool  isForward,
bool  isFirstEdge 
)
protected
void geos::geomgraph::EdgeRing::computeMaxNodeDegree ( )
private
void geos::geomgraph::EdgeRing::computePoints ( DirectedEdge newStart)
protected
void geos::geomgraph::EdgeRing::computeRing ( )

Compute a LinearRing from the point list previously collected. Test if the ring is a hole (i.e. if it is CCW) and set the hole flag accordingly.

bool geos::geomgraph::EdgeRing::containsPoint ( const geom::Coordinate p)

This method will use the computed ring. It will also check any holes, if they have been assigned.

std::vector<DirectedEdge*>& geos::geomgraph::EdgeRing::getEdges ( )

Returns the list of DirectedEdges that make up this EdgeRing

Label& geos::geomgraph::EdgeRing::getLabel ( )
geom::LinearRing* geos::geomgraph::EdgeRing::getLinearRing ( )

Return a pointer to the LinearRing owned by this object. Make a copy if you need it beyond this objects's lifetime.

int geos::geomgraph::EdgeRing::getMaxNodeDegree ( )
virtual DirectedEdge* geos::geomgraph::EdgeRing::getNext ( DirectedEdge de)
pure virtual
EdgeRing* geos::geomgraph::EdgeRing::getShell ( )
bool geos::geomgraph::EdgeRing::isHole ( )
bool geos::geomgraph::EdgeRing::isIsolated ( )
bool geos::geomgraph::EdgeRing::isShell ( )
void geos::geomgraph::EdgeRing::mergeLabel ( const Label deLabel)
protected
void geos::geomgraph::EdgeRing::mergeLabel ( const Label deLabel,
int  geomIndex 
)
protected

Merge the RHS label from a DirectedEdge into the label for this EdgeRing.

The DirectedEdge label may be null. This is acceptable - it results from a node which is NOT an intersection node between the Geometries (e.g. the end node of a LinearRing). In this case the DirectedEdge label does not contribute any information to the overall labelling, and is simply skipped.

virtual void geos::geomgraph::EdgeRing::setEdgeRing ( DirectedEdge de,
EdgeRing er 
)
pure virtual
void geos::geomgraph::EdgeRing::setInResult ( )
void geos::geomgraph::EdgeRing::setShell ( EdgeRing newShell)
void geos::geomgraph::EdgeRing::testInvariant ( ) const
inline

Definition at line 124 of file geomgraph/EdgeRing.h.

std::unique_ptr<geom::Polygon> geos::geomgraph::EdgeRing::toPolygon ( const geom::GeometryFactory geometryFactory)

Return a Polygon copying coordinates from this EdgeRing and its holes.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const EdgeRing er 
)
friend

Member Data Documentation

std::vector<DirectedEdge*> geos::geomgraph::EdgeRing::edges
private

the DirectedEdges making up this EdgeRing

Definition at line 177 of file geomgraph/EdgeRing.h.

const geom::GeometryFactory* geos::geomgraph::EdgeRing::geometryFactory
protected

Definition at line 146 of file geomgraph/EdgeRing.h.

std::vector<std::unique_ptr<EdgeRing> > geos::geomgraph::EdgeRing::holes
protected

a list of EdgeRings which are holes in this EdgeRing

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

bool geos::geomgraph::EdgeRing::isHoleVar
private

Definition at line 187 of file geomgraph/EdgeRing.h.

Label geos::geomgraph::EdgeRing::label
private

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

int geos::geomgraph::EdgeRing::maxNodeDegree
private

Definition at line 174 of file geomgraph/EdgeRing.h.

std::vector<geom::Coordinate> geos::geomgraph::EdgeRing::pts
private

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

std::unique_ptr<geom::LinearRing> geos::geomgraph::EdgeRing::ring
private

Definition at line 185 of file geomgraph/EdgeRing.h.

EdgeRing* geos::geomgraph::EdgeRing::shell
private

if non-null, the ring is a hole and this EdgeRing is its containing shell

Definition at line 190 of file geomgraph/EdgeRing.h.

DirectedEdge* geos::geomgraph::EdgeRing::startDe
protected

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


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