GEOS
3.9.1dev
|
#include <LineBuilder.h>
Public Member Functions | |
LineBuilder (const InputGeometry *inputGeom, OverlayGraph *p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory *geomFact) | |
LineBuilder (const LineBuilder &)=delete | |
LineBuilder & | operator= (const LineBuilder &)=delete |
std::vector< std::unique_ptr< geom::LineString > > | getLines () |
void | setStrictMode (bool p_isStrictResultMode) |
Private Member Functions | |
void | markResultLines () |
bool | isResultLine (const OverlayLabel *lbl) const |
geom::Location | effectiveLocation (const OverlayLabel *lbl, int geomIndex) const |
void | addResultLines () |
void | addResultLinesMerged () |
std::unique_ptr< geom::LineString > | toLine (OverlayEdge *edge) |
void | addResultLinesForNodes () |
void | addResultLinesRings () |
std::unique_ptr< geom::LineString > | buildLine (OverlayEdge *node) |
OverlayEdge * | nextLineEdgeUnvisited (OverlayEdge *node) const |
int | degreeOfLines (OverlayEdge *node) const |
Private Attributes | |
OverlayGraph * | graph |
int | opCode |
const geom::GeometryFactory * | geometryFactory |
bool | hasResultArea |
int | inputAreaIndex |
std::vector< std::unique_ptr< geom::LineString > > | lines |
bool | isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT |
bool | isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT |
Finds and builds overlay result lines from the overlay graph. Output linework has the following semantics:
Various strategies are possible for how to merge graph edges into lines. This implementation uses the approach of having output lines run contiguously from node to node. For rings a node point is chosen arbitrarily.
Another possible strategy would be to preserve input linework as far as possible (i.e. any sections of input lines which are not coincident with other linework would be preserved).
It would also be possible to output LinearRings, if the input is a LinearRing and is unchanged. This will require additional info from the input linework.
Definition at line 70 of file g/LineBuilder.h.
|
inline |
Definition at line 163 of file g/LineBuilder.h.
|
delete |
|
private |
|
private |
|
private |
|
private |
Adds lines which form rings (i.e. have only degree-2 vertices).
|
private |
Traverses edges from edgeStart which lie in a single line (have degree = 2).
The direction of the linework is preserved as far as possible. Specifically, the direction of the line is determined by the start edge direction. This implies that if all edges are reversed, the created line will be reversed to match. (Other more complex strategies would be possible. E.g. using the direction of the majority of segments, or preferring the direction of the A edges.)
|
private |
Computes the degree of the line edges incident on a node
|
private |
Determines the effective location for a line, for the purpose of overlay operation evaluation. Line edges and Collapses are reported as INTERIOR so they may be included in the result if warranted by the effect of the operation on the two edges. (For instance, the intersection of line edge and a collapsed boundary is included in the result).
std::vector<std::unique_ptr<geom::LineString> > geos::operation::overlayng::LineBuilder::getLines | ( | ) |
|
private |
Checks if the topology indicated by an edge label determines that this edge should be part of a result line.
Note that the logic here relies on the semantic that for intersection lines are only returned if there is no result area components.
|
private |
|
private |
|
delete |
|
inline |
Definition at line 178 of file g/LineBuilder.h.
|
private |
|
private |
Definition at line 77 of file g/LineBuilder.h.
|
private |
Definition at line 75 of file g/LineBuilder.h.
|
private |
Definition at line 78 of file g/LineBuilder.h.
|
private |
Definition at line 79 of file g/LineBuilder.h.
|
private |
Allow lines created by area topology collapses to appear in the result. True provides the original JTS semantics.
Definition at line 95 of file g/LineBuilder.h.
|
private |
Indicates whether intersections are allowed to produce heterogeneous results including proper boundary touches. This does not control inclusion of touches along collapses. True provides the original JTS semantics.
Definition at line 88 of file g/LineBuilder.h.
|
private |
Definition at line 80 of file g/LineBuilder.h.
|
private |
Definition at line 76 of file g/LineBuilder.h.