- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

# LineBuilder.h

    00001 /**********************************************************************
    00002  * $Id: LineBuilder.h 3255 2011-03-01 17:56:10Z mloskot $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2006 Refractions Research Inc.
    00008  *
    00009  * This is free software; you can redistribute and/or modify it under
    00010  * the terms of the GNU Lesser General Public Licence as published
    00011  * by the Free Software Foundation.
    00012  * See the COPYING file for more information.
    00013  *
    00014  ***********************************************************************
    00015  *
    00016  * Last port: operation/overlay/LineBuilder.java rev. 1.15 (JTS-1.10)
    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> // for OverlayOp::OpCode enum
    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 // Forward declarations
    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 { // geos::operation
    00057 namespace overlay { // geos::operation::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          * If the given CoordinateSequence has mixed 3d/2d vertexes
    00126          * set Z for all vertexes missing it.
    00127          * The Z value is interpolated between 3d vertexes and copied
    00128          * from a 3d vertex to the end.
    00129          */
    00130         void propagateZ(geom::CoordinateSequence *cs);
    00131 };
    00132
    00133 } // namespace geos::operation::overlay
    00134 } // namespace geos::operation
    00135 } // namespace geos
    00136
    00137 #ifdef _MSC_VER
    00138 #pragma warning(pop)
    00139 #endif
    00140
    00141 #endif // ndef GEOS_OP_OVERLAY_LINEBUILDER_H
    00142
    00143 /**********************************************************************
    00144  * $Log$
    00145  * Revision 1.2  2006/06/05 15:36:34  strk
    00146  * Given OverlayOp funx code enum a name and renamed values to have a lowercase prefix. Drop all of noding headers from installed header set.
    00147  *
    00148  * Revision 1.1  2006/03/17 13:24:59  strk
    00149  * opOverlay.h header splitted. Reduced header inclusions in operation/overlay implementation files. ElevationMatrixFilter code moved from own file to ElevationMatrix.cpp (ideally a class-private).
    00150  *
    00151  **********************************************************************/
    00152