A connected subset of the graph of DirectedEdge and geomgraph::Node.
More...
#include <BufferSubgraph.h>
A connected subset of the graph of DirectedEdge and geomgraph::Node.
Its edges will generate either
- a single polygon in the complete buffer, with zero or more holes, or
- ne or more connected holes
Definition at line 61 of file BufferSubgraph.h.
geos::operation::buffer::BufferSubgraph::BufferSubgraph |
( |
| ) |
|
geos::operation::buffer::BufferSubgraph::~BufferSubgraph |
( |
| ) |
|
Adds the argument node and all its out edges to the subgraph
- Parameters
-
node | the node to add |
nodeStack | the current set of nodes being traversed |
void geos::operation::buffer::BufferSubgraph::addReachable |
( |
geomgraph::Node * |
startNode | ) |
|
|
private |
Adds all nodes and edges reachable from this node to the subgraph.
Uses an explicit stack to avoid a large depth of recursion.
- Parameters
-
startNode | a node known to be in the subgraph |
void geos::operation::buffer::BufferSubgraph::clearVisitedEdges |
( |
| ) |
|
|
private |
int geos::operation::buffer::BufferSubgraph::compareTo |
( |
BufferSubgraph * |
| ) |
|
BufferSubgraphs are compared on the x-value of their rightmost Coordinate.
This defines a partial ordering on the graphs such that:
g1 >= g2 <==> Ring(g2) does not contain Ring(g1)
where Polygon(g) is the buffer polygon that is built from g.
This relationship is used to sort the BufferSubgraphs so that shells are guaranteed to be built before holes.
void geos::operation::buffer::BufferSubgraph::computeDepth |
( |
int |
outsideDepth | ) |
|
Compute depths for all dirEdges via breadth-first traversal of nodes in graph.
- Parameters
-
startEdge | edge to start processing with |
void geos::operation::buffer::BufferSubgraph::computeNodeDepth |
( |
geomgraph::Node * |
n | ) |
|
|
private |
void geos::operation::buffer::BufferSubgraph::create |
( |
geomgraph::Node * |
node | ) |
|
Creates the subgraph consisting of all edges reachable from this node.
Finds the edges in the graph and the rightmost coordinate.
- Parameters
-
node | a node to start the graph traversal from |
void geos::operation::buffer::BufferSubgraph::findResultEdges |
( |
| ) |
|
Find all edges whose depths indicates that they are in the result area(s).
Since we want polygon shells to be oriented CW, choose dirEdges with the interior of the result on the RHS. Mark them as being in the result. Interior Area edges are the result of dimensional collapses. They do not form part of the result area boundary.
geom::Envelope* geos::operation::buffer::BufferSubgraph::getEnvelope |
( |
| ) |
|
Computes the envelope of the edges in the subgraph. The envelope is cached after being computed.
- Returns
- the envelope of the graph.
std::vector< geomgraph::Node * > * geos::operation::buffer::BufferSubgraph::getNodes |
( |
| ) |
|
|
inline |
geom::Coordinate * geos::operation::buffer::BufferSubgraph::getRightmostCoordinate |
( |
| ) |
|
|
inline |
Gets the rightmost coordinate in the edges of the subgraph.
Definition at line 177 of file BufferSubgraph.h.
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const BufferSubgraph & |
bs |
|
) |
| |
|
friend |
std::vector<geomgraph::Node*> geos::operation::buffer::BufferSubgraph::nodes |
|
private |
The documentation for this class was generated from the following file: