GEOS  3.13.0dev
Public Member Functions | Static Public Member Functions | List of all members
geos::geomgraph::GeometryGraph Class Reference

A GeometryGraph is a graph that models a given Geometry. More...

#include <GeometryGraph.h>

Inheritance diagram for geos::geomgraph::GeometryGraph:
geos::geomgraph::PlanarGraph

Public Member Functions

 GeometryGraph (uint8_t newArgIndex, const geom::Geometry *newParentGeom)
 
 GeometryGraph (uint8_t newArgIndex, const geom::Geometry *newParentGeom, const algorithm::BoundaryNodeRule &boundaryNodeRule)
 
const geom::GeometrygetGeometry ()
 
void getBoundaryNodes (std::vector< Node * > &bdyNodes)
 Returned object is owned by this GeometryGraph.
 
std::vector< Node * > * getBoundaryNodes ()
 
geom::CoordinateSequencegetBoundaryPoints ()
 Returned object is owned by this GeometryGraph.
 
EdgefindEdge (const geom::LineString *line) const
 
void computeSplitEdges (std::vector< Edge * > *edgelist)
 
void addEdge (Edge *e)
 
void addPoint (geom::Coordinate &pt)
 
std::unique_ptr< index::SegmentIntersectorcomputeSelfNodes (algorithm::LineIntersector *li, bool computeRingSelfNodes, const geom::Envelope *env=nullptr)
 Compute self-nodes, taking advantage of the Geometry type to minimize the number of intersection tests. (E.g. rings are not tested for self-intersection, since they are assumed to be valid). More...
 
std::unique_ptr< index::SegmentIntersectorcomputeSelfNodes (algorithm::LineIntersector &li, bool computeRingSelfNodes, const geom::Envelope *env=nullptr)
 
std::unique_ptr< index::SegmentIntersectorcomputeEdgeIntersections (GeometryGraph *g, algorithm::LineIntersector *li, bool includeProper, const geom::Envelope *env=nullptr)
 
std::vector< Edge * > * getEdges ()
 
bool hasTooFewPoints ()
 
const geom::CoordinategetInvalidPoint ()
 
const algorithm::BoundaryNodeRulegetBoundaryNodeRule () const
 
- Public Member Functions inherited from geos::geomgraph::PlanarGraph
 PlanarGraph (const NodeFactory &nodeFact)
 
virtual std::vector< Edge * >::iterator getEdgeIterator ()
 
virtual std::vector< EdgeEnd * > * getEdgeEnds ()
 
virtual bool isBoundaryNode (uint8_t geomIndex, const geom::Coordinate &coord)
 
virtual void add (EdgeEnd *e)
 
virtual NodeMap::iterator getNodeIterator ()
 
virtual void getNodes (std::vector< Node * > &)
 
virtual NodeaddNode (Node *node)
 
virtual NodeaddNode (const geom::Coordinate &coord)
 
virtual Nodefind (geom::Coordinate &coord)
 
virtual void addEdges (const std::vector< Edge * > &edgesToAdd)
 Add a set of edges to the graph. For each edge two DirectedEdges will be created. DirectedEdges are NOT linked by this method.
 
virtual void linkResultDirectedEdges ()
 
virtual void linkAllDirectedEdges ()
 
virtual EdgeEndfindEdgeEnd (Edge *e)
 Returns the EdgeEnd which has edge e as its base edge (MD 18 Feb 2002 - this should return a pair of edges) More...
 
virtual EdgefindEdge (const geom::Coordinate &p0, const geom::Coordinate &p1)
 Returns the edge whose first two coordinates are p0 and p1. More...
 
virtual EdgefindEdgeInSameDirection (const geom::Coordinate &p0, const geom::Coordinate &p1)
 Returns the edge which starts at p0 and whose first segment is parallel to p1. More...
 
virtual std::string printEdges ()
 
virtual NodeMap * getNodeMap ()
 

Static Public Member Functions

static bool isInBoundary (int boundaryCount)
 
static geom::Location determineBoundary (int boundaryCount)
 
static geom::Location determineBoundary (const algorithm::BoundaryNodeRule &boundaryNodeRule, int boundaryCount)
 
- Static Public Member Functions inherited from geos::geomgraph::PlanarGraph
template<typename It >
static void linkResultDirectedEdges (It first, It last)
 For nodes in the collection (first..last), link the DirectedEdges at the node that are in the result. More...
 

Additional Inherited Members

- Protected Member Functions inherited from geos::geomgraph::PlanarGraph
virtual void insertEdge (Edge *e)
 
- Protected Attributes inherited from geos::geomgraph::PlanarGraph
std::vector< Edge * > * edges
 
NodeMap * nodes
 
std::vector< EdgeEnd * > * edgeEndList
 

Detailed Description

A GeometryGraph is a graph that models a given Geometry.

Member Function Documentation

◆ computeSelfNodes()

std::unique_ptr<index::SegmentIntersector> geos::geomgraph::GeometryGraph::computeSelfNodes ( algorithm::LineIntersector li,
bool  computeRingSelfNodes,
const geom::Envelope env = nullptr 
)
inline

Compute self-nodes, taking advantage of the Geometry type to minimize the number of intersection tests. (E.g. rings are not tested for self-intersection, since they are assumed to be valid).

Parameters
lithe LineIntersector to use
computeRingSelfNodesif false, intersection checks are optimized to not test rings for self-intersection
envan Envelope
Returns
the SegmentIntersector used, containing information about the intersections found

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