GEOS
3.3.6
|
00001 /********************************************************************** 00002 * $Id: LineMergeGraph.h 3309 2011-04-27 15:47:14Z strk $ 00003 * 00004 * GEOS - Geometry Engine Open Source 00005 * http://geos.refractions.net 00006 * 00007 * Copyright (C) 2011 Sandro Santilli <strk@keybit.net> 00008 * Copyright (C) 2006 Refractions Research Inc. 00009 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00010 * 00011 * This is free software; you can redistribute and/or modify it under 00012 * the terms of the GNU Lesser General Public Licence as published 00013 * by the Free Software Foundation. 00014 * See the COPYING file for more information. 00015 * 00016 ********************************************************************** 00017 * 00018 * Last port: operation/linemerge/LineMergeGraph.java r378 (JTS-1.12) 00019 * 00020 **********************************************************************/ 00021 00022 #ifndef GEOS_OP_LINEMERGE_LINEMERGEGRAPH_H 00023 #define GEOS_OP_LINEMERGE_LINEMERGEGRAPH_H 00024 00025 #include <geos/export.h> 00026 #include <geos/planargraph/PlanarGraph.h> // for inheritance 00027 00028 #include <vector> 00029 00030 #ifdef _MSC_VER 00031 #pragma warning(push) 00032 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 00033 #endif 00034 00035 // Forward declarations 00036 namespace geos { 00037 namespace geom { 00038 class LineString; 00039 class Coordinate; 00040 } 00041 namespace planargraph { 00042 class Node; 00043 class Edge; 00044 class DirectedEdge; 00045 } 00046 } 00047 00048 00049 namespace geos { 00050 namespace operation { // geos::operation 00051 namespace linemerge { // geos::operation::linemerge 00052 00060 class GEOS_DLL LineMergeGraph: public planargraph::PlanarGraph { 00061 00062 private: 00063 00064 planargraph::Node* getNode(const geom::Coordinate &coordinate); 00065 00066 std::vector<planargraph::Node*> newNodes; 00067 00068 std::vector<planargraph::Edge*> newEdges; 00069 00070 std::vector<planargraph::DirectedEdge*> newDirEdges; 00071 00072 public: 00073 00082 void addEdge(const geom::LineString *lineString); 00083 00084 ~LineMergeGraph(); 00085 }; 00086 } // namespace geos::operation::linemerge 00087 } // namespace geos::operation 00088 } // namespace geos 00089 00090 #ifdef _MSC_VER 00091 #pragma warning(pop) 00092 #endif 00093 00094 #endif // GEOS_OP_LINEMERGE_LINEMERGEGRAPH_H 00095 00096 /********************************************************************** 00097 * $Log$ 00098 * Revision 1.1 2006/03/22 10:13:53 strk 00099 * opLinemerge.h split 00100 * 00101 **********************************************************************/