GEOS  3.6.2
LineMergeGraph.h
00001 /**********************************************************************
00002  *
00003  * GEOS - Geometry Engine Open Source
00004  * http://geos.osgeo.org
00005  *
00006  * Copyright (C) 2011 Sandro Santilli <strk@keybit.net>
00007  * Copyright (C) 2006 Refractions Research Inc.
00008  * Copyright (C) 2001-2002 Vivid Solutions Inc.
00009  *
00010  * This is free software; you can redistribute and/or modify it under
00011  * the terms of the GNU Lesser General Public Licence as published
00012  * by the Free Software Foundation. 
00013  * See the COPYING file for more information.
00014  *
00015  **********************************************************************
00016  *
00017  * Last port: operation/linemerge/LineMergeGraph.java r378 (JTS-1.12)
00018  *
00019  **********************************************************************/
00020 
00021 #ifndef GEOS_OP_LINEMERGE_LINEMERGEGRAPH_H
00022 #define GEOS_OP_LINEMERGE_LINEMERGEGRAPH_H
00023 
00024 #include <geos/export.h>
00025 #include <geos/planargraph/PlanarGraph.h> // for inheritance
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 LineString;
00038                 class Coordinate;
00039         }
00040         namespace planargraph { 
00041                 class Node;
00042                 class Edge;
00043                 class DirectedEdge;
00044         }
00045 }
00046 
00047 
00048 namespace geos {
00049 namespace operation { // geos::operation
00050 namespace linemerge { // geos::operation::linemerge
00051 
00059 class GEOS_DLL LineMergeGraph: public planargraph::PlanarGraph {
00060 
00061 private:
00062 
00063         planargraph::Node* getNode(const geom::Coordinate &coordinate);
00064 
00065         std::vector<planargraph::Node*> newNodes;
00066 
00067         std::vector<planargraph::Edge*> newEdges;
00068 
00069         std::vector<planargraph::DirectedEdge*> newDirEdges;
00070 
00071 public:
00072 
00081         void addEdge(const geom::LineString *lineString);
00082 
00083         ~LineMergeGraph();
00084 };
00085 } // namespace geos::operation::linemerge
00086 } // namespace geos::operation
00087 } // namespace geos
00088 
00089 #ifdef _MSC_VER
00090 #pragma warning(pop)
00091 #endif
00092 
00093 #endif // GEOS_OP_LINEMERGE_LINEMERGEGRAPH_H