00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GEOS_OP_OVERLAY_LINEBUILDER_H
00021 #define GEOS_OP_OVERLAY_LINEBUILDER_H
00022
00023 #include <geos/export.h>
00024
00025 #include <geos/operation/overlay/OverlayOp.h>
00026
00027 #include <vector>
00028
00029 #ifdef _MSC_VER
00030 #pragma warning(push)
00031 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00032 #endif
00033
00034
00035 namespace geos {
00036 namespace geom {
00037 class GeometryFactory;
00038 class CoordinateSequence;
00039 class LineString;
00040 }
00041 namespace geomgraph {
00042 class DirectedEdge;
00043 class Edge;
00044 }
00045 namespace algorithm {
00046 class PointLocator;
00047 }
00048 namespace operation {
00049 namespace overlay {
00050 class OverlayOp;
00051 }
00052 }
00053 }
00054
00055 namespace geos {
00056 namespace operation {
00057 namespace overlay {
00058
00064 class GEOS_DLL LineBuilder {
00065
00066 public:
00067
00068 LineBuilder(OverlayOp *newOp,
00069 const geom::GeometryFactory *newGeometryFactory,
00070 algorithm::PointLocator *newPtLocator);
00071
00072 ~LineBuilder();
00073
00077 std::vector<geom::LineString*>* build(OverlayOp::OpCode opCode);
00078
00090 void collectLineEdge(geomgraph::DirectedEdge *de,
00091 OverlayOp::OpCode opCode,
00092 std::vector<geomgraph::Edge*>* edges);
00093
00094 private:
00095 OverlayOp *op;
00096 const geom::GeometryFactory *geometryFactory;
00097 algorithm::PointLocator *ptLocator;
00098 std::vector<geomgraph::Edge*> lineEdgesList;
00099 std::vector<geom::LineString*>* resultLineList;
00100 void findCoveredLineEdges();
00101 void collectLines(OverlayOp::OpCode opCode);
00102 void buildLines(OverlayOp::OpCode opCode);
00103 void labelIsolatedLines(std::vector<geomgraph::Edge*> *edgesList);
00104
00115 void collectBoundaryTouchEdge(geomgraph::DirectedEdge *de,
00116 OverlayOp::OpCode opCode,
00117 std::vector<geomgraph::Edge*>* edges);
00118
00122 void labelIsolatedLine(geomgraph::Edge *e, int targetIndex);
00123
00124
00125
00126
00127
00128
00129
00130 void propagateZ(geom::CoordinateSequence *cs);
00131 };
00132
00133 }
00134 }
00135 }
00136
00137 #ifdef _MSC_VER
00138 #pragma warning(pop)
00139 #endif
00140
00141 #endif // ndef GEOS_OP_OVERLAY_LINEBUILDER_H
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152