GEOS 3.6.2
LineBuilder.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2006 Refractions Research Inc.
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 ***********************************************************************
14 *
15 * Last port: operation/overlay/LineBuilder.java rev. 1.15 (JTS-1.10)
16 *
17 **********************************************************************/
18
19#ifndef GEOS_OP_OVERLAY_LINEBUILDER_H
20#define GEOS_OP_OVERLAY_LINEBUILDER_H
21
22#include <geos/export.h>
23
24#include <geos/operation/overlay/OverlayOp.h> // for OverlayOp::OpCode enum
25
26#include <vector>
27
28#ifdef _MSC_VER
29#pragma warning(push)
30#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
31#endif
32
33// Forward declarations
34namespace geos {
35 namespace geom {
36 class GeometryFactory;
38 class LineString;
39 }
40 namespace geomgraph {
41 class DirectedEdge;
42 class Edge;
43 }
44 namespace algorithm {
45 class PointLocator;
46 }
47 namespace operation {
48 namespace overlay {
49 class OverlayOp;
50 }
51 }
52}
53
54namespace geos {
55namespace operation { // geos::operation
56namespace overlay { // geos::operation::overlay
57
63class GEOS_DLL LineBuilder {
64
65public:
66
67 LineBuilder(OverlayOp *newOp,
68 const geom::GeometryFactory *newGeometryFactory,
69 algorithm::PointLocator *newPtLocator);
70
71 ~LineBuilder();
72
76 std::vector<geom::LineString*>* build(OverlayOp::OpCode opCode);
77
90 OverlayOp::OpCode opCode,
91 std::vector<geomgraph::Edge*>* edges);
92
93private:
94 OverlayOp *op;
95 const geom::GeometryFactory *geometryFactory;
96 algorithm::PointLocator *ptLocator;
97 std::vector<geomgraph::Edge*> lineEdgesList;
98 std::vector<geom::LineString*>* resultLineList;
99 void findCoveredLineEdges();
100 void collectLines(OverlayOp::OpCode opCode);
101 void buildLines(OverlayOp::OpCode opCode);
102 void labelIsolatedLines(std::vector<geomgraph::Edge*> *edgesList);
103
114 void collectBoundaryTouchEdge(geomgraph::DirectedEdge *de,
115 OverlayOp::OpCode opCode,
116 std::vector<geomgraph::Edge*>* edges);
117
121 void labelIsolatedLine(geomgraph::Edge *e, int targetIndex);
122
123 /*
124 * If the given CoordinateSequence has mixed 3d/2d vertexes
125 * set Z for all vertexes missing it.
126 * The Z value is interpolated between 3d vertexes and copied
127 * from a 3d vertex to the end.
128 */
129 void propagateZ(geom::CoordinateSequence *cs);
130};
131
132} // namespace geos::operation::overlay
133} // namespace geos::operation
134} // namespace geos
135
136#ifdef _MSC_VER
137#pragma warning(pop)
138#endif
139
140#endif // ndef GEOS_OP_OVERLAY_LINEBUILDER_H
Computes the topological relationship (Location) of a single point to a Geometry.
Definition PointLocator.h:58
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:59
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:67
Definition LineString.h:70
A directed EdgeEnd.
Definition geomgraph/DirectedEdge.h:44
Definition geomgraph/Edge.h:66
std::vector< geom::LineString * > * build(OverlayOp::OpCode opCode)
void collectLineEdge(geomgraph::DirectedEdge *de, OverlayOp::OpCode opCode, std::vector< geomgraph::Edge * > *edges)
Computes the geometric overlay of two Geometry.
Definition OverlayOp.h:68
OpCode
The spatial functions supported by this class.
Definition OverlayOp.h:77
Contains classes and interfaces implementing fundamental computational geometry algorithms.
Definition Angle.h:33
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Contains classes that implement topology graphs.
Definition IndexedNestedRingTester.h:34
Contains classes that perform a topological overlay to compute boolean spatial functions.
Definition BufferBuilder.h:62
Provides classes for implementing operations on geometries.
Definition IndexedNestedRingTester.h:40
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25