GEOS
3.9.1dev
|
A GeometryGraph is a graph that models a given Geometry. More...
#include <GeometryGraph.h>
Public Member Functions | |
GeometryGraph () | |
GeometryGraph (int newArgIndex, const geom::Geometry *newParentGeom) | |
GeometryGraph (int newArgIndex, const geom::Geometry *newParentGeom, const algorithm::BoundaryNodeRule &boundaryNodeRule) | |
~GeometryGraph () override | |
const geom::Geometry * | getGeometry () |
std::vector< Node * > * | getBoundaryNodes () |
Returned object is owned by this GeometryGraph. More... | |
void | getBoundaryNodes (std::vector< Node * > &bdyNodes) |
geom::CoordinateSequence * | getBoundaryPoints () |
Returned object is owned by this GeometryGraph. More... | |
Edge * | findEdge (const geom::LineString *line) const |
void | computeSplitEdges (std::vector< Edge * > *edgelist) |
void | addEdge (Edge *e) |
void | addPoint (geom::Coordinate &pt) |
std::unique_ptr< index::SegmentIntersector > | computeSelfNodes (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::SegmentIntersector > | computeSelfNodes (algorithm::LineIntersector *li, bool computeRingSelfNodes, bool isDoneIfProperInt, const geom::Envelope *env=nullptr) |
std::unique_ptr< index::SegmentIntersector > | computeSelfNodes (algorithm::LineIntersector &li, bool computeRingSelfNodes, const geom::Envelope *env=nullptr) |
std::unique_ptr< index::SegmentIntersector > | computeSelfNodes (algorithm::LineIntersector &li, bool computeRingSelfNodes, bool isDoneIfProperInt, const geom::Envelope *env=nullptr) |
std::unique_ptr< index::SegmentIntersector > | computeEdgeIntersections (GeometryGraph *g, algorithm::LineIntersector *li, bool includeProper, const geom::Envelope *env=nullptr) |
std::vector< Edge * > * | getEdges () |
bool | hasTooFewPoints () |
const geom::Coordinate & | getInvalidPoint () |
const algorithm::BoundaryNodeRule & | getBoundaryNodeRule () const |
![]() | |
PlanarGraph (const NodeFactory &nodeFact) | |
PlanarGraph () | |
virtual | ~PlanarGraph () |
virtual std::vector< Edge * >::iterator | getEdgeIterator () |
virtual std::vector< EdgeEnd * > * | getEdgeEnds () |
virtual bool | isBoundaryNode (int geomIndex, const geom::Coordinate &coord) |
virtual void | add (EdgeEnd *e) |
virtual NodeMap::iterator | getNodeIterator () |
virtual void | getNodes (std::vector< Node * > &) |
virtual Node * | addNode (Node *node) |
virtual Node * | addNode (const geom::Coordinate &coord) |
virtual Node * | find (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. More... | |
virtual void | linkResultDirectedEdges () |
virtual void | linkAllDirectedEdges () |
virtual EdgeEnd * | findEdgeEnd (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 Edge * | findEdge (const geom::Coordinate &p0, const geom::Coordinate &p1) |
Returns the edge whose first two coordinates are p0 and p1. More... | |
virtual Edge * | findEdgeInSameDirection (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) |
![]() | |
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... | |
Private Attributes | |
const geom::Geometry * | parentGeom |
std::unordered_map< const geom::LineString *, Edge * > | lineEdgeMap |
bool | useBoundaryDeterminationRule |
const algorithm::BoundaryNodeRule & | boundaryNodeRule |
int | argIndex |
std::unique_ptr< geom::CoordinateSequence > | boundaryPoints |
Cache for fast responses to getBoundaryPoints. More... | |
std::unique_ptr< std::vector< Node * > > | boundaryNodes |
bool | hasTooFewPointsVar |
geom::Coordinate | invalidPoint |
Additional Inherited Members | |
![]() | |
virtual void | insertEdge (Edge *e) |
![]() | |
std::vector< Edge * > * | edges |
NodeMap * | nodes |
std::vector< EdgeEnd * > * | edgeEndList |
A GeometryGraph is a graph that models a given Geometry.
Definition at line 74 of file GeometryGraph.h.
|
privatedelete |
geos::geomgraph::GeometryGraph::GeometryGraph | ( | ) |
geos::geomgraph::GeometryGraph::GeometryGraph | ( | int | newArgIndex, |
const geom::Geometry * | newParentGeom | ||
) |
geos::geomgraph::GeometryGraph::GeometryGraph | ( | int | newArgIndex, |
const geom::Geometry * | newParentGeom, | ||
const algorithm::BoundaryNodeRule & | boundaryNodeRule | ||
) |
|
override |
|
private |
|
private |
void geos::geomgraph::GeometryGraph::addEdge | ( | Edge * | e | ) |
|
private |
|
private |
void geos::geomgraph::GeometryGraph::addPoint | ( | geom::Coordinate & | pt | ) |
|
private |
|
private |
|
private |
Add a node for a self-intersection.
If the node is a potential boundary node (e.g. came from an edge which is a boundary) then insert it as a potential boundary node. Otherwise, just add it as a regular node.
|
private |
std::unique_ptr<index::SegmentIntersector> geos::geomgraph::GeometryGraph::computeEdgeIntersections | ( | GeometryGraph * | g, |
algorithm::LineIntersector * | li, | ||
bool | includeProper, | ||
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).
li | the LineIntersector to use |
computeRingSelfNodes | if false , intersection checks are optimized to not test rings for self-intersection |
env | an Envelope |
Definition at line 213 of file GeometryGraph.h.
|
inline |
Definition at line 222 of file GeometryGraph.h.
std::unique_ptr<index::SegmentIntersector> geos::geomgraph::GeometryGraph::computeSelfNodes | ( | algorithm::LineIntersector & | li, |
bool | computeRingSelfNodes, | ||
const geom::Envelope * | env = nullptr |
||
) |
std::unique_ptr<index::SegmentIntersector> geos::geomgraph::GeometryGraph::computeSelfNodes | ( | algorithm::LineIntersector & | li, |
bool | computeRingSelfNodes, | ||
bool | isDoneIfProperInt, | ||
const geom::Envelope * | env = nullptr |
||
) |
void geos::geomgraph::GeometryGraph::computeSplitEdges | ( | std::vector< Edge * > * | edgelist | ) |
|
private |
Allocates a new EdgeSetIntersector. Remember to delete it!
|
static |
|
static |
Edge* geos::geomgraph::GeometryGraph::findEdge | ( | const geom::LineString * | line | ) | const |
|
inline |
Definition at line 252 of file GeometryGraph.h.
std::vector<Node*>* geos::geomgraph::GeometryGraph::getBoundaryNodes | ( | ) |
Returned object is owned by this GeometryGraph.
void geos::geomgraph::GeometryGraph::getBoundaryNodes | ( | std::vector< Node * > & | bdyNodes | ) |
geom::CoordinateSequence* geos::geomgraph::GeometryGraph::getBoundaryPoints | ( | ) |
Returned object is owned by this GeometryGraph.
std::vector<Edge*>* geos::geomgraph::GeometryGraph::getEdges | ( | ) |
const geom::Geometry* geos::geomgraph::GeometryGraph::getGeometry | ( | ) |
const geom::Coordinate& geos::geomgraph::GeometryGraph::getInvalidPoint | ( | ) |
bool geos::geomgraph::GeometryGraph::hasTooFewPoints | ( | ) |
|
private |
Adds candidate boundary points using the current algorithm::BoundaryNodeRule.
This is used to add the boundary points of dim-1 geometries (Curves/MultiCurves).
|
private |
|
static |
|
privatedelete |
|
private |
the index of this geometry as an argument to a spatial function (used for labelling)
Definition at line 104 of file GeometryGraph.h.
|
private |
Definition at line 98 of file GeometryGraph.h.
|
private |
Definition at line 109 of file GeometryGraph.h.
|
private |
Cache for fast responses to getBoundaryPoints.
Definition at line 107 of file GeometryGraph.h.
|
private |
Definition at line 111 of file GeometryGraph.h.
|
private |
Definition at line 113 of file GeometryGraph.h.
|
private |
The lineEdgeMap is a map of the linestring components of the parentGeometry to the edges which are derived from them. This is used to efficiently perform findEdge queries
Following the above description there's no need to compare LineStrings other then by pointer value.
Definition at line 90 of file GeometryGraph.h.
|
private |
Definition at line 80 of file GeometryGraph.h.
|
private |
If this flag is true, the Boundary Determination Rule will used when deciding whether nodes are in the boundary or not
Definition at line 96 of file GeometryGraph.h.