GEOS
3.4.2
|
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/EdgeString.java r378 (JTS-1.12) 00018 * 00019 **********************************************************************/ 00020 00021 #ifndef GEOS_OP_LINEMERGE_EDGESTRING_H 00022 #define GEOS_OP_LINEMERGE_EDGESTRING_H 00023 00024 #include <geos/export.h> 00025 #include <vector> 00026 00027 #ifdef _MSC_VER 00028 #pragma warning(push) 00029 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 00030 #endif 00031 00032 // Forward declarations 00033 namespace geos { 00034 namespace geom { 00035 class GeometryFactory; 00036 class CoordinateSequence; 00037 class LineString; 00038 } 00039 namespace operation { 00040 namespace linemerge { 00041 class LineMergeDirectedEdge; 00042 } 00043 } 00044 } 00045 00046 namespace geos { 00047 namespace operation { // geos::operation 00048 namespace linemerge { // geos::operation::linemerge 00049 00055 class GEOS_DLL EdgeString { 00056 private: 00057 const geom::GeometryFactory *factory; 00058 std::vector<LineMergeDirectedEdge*> directedEdges; 00059 geom::CoordinateSequence *coordinates; 00060 geom::CoordinateSequence* getCoordinates(); 00061 public: 00062 /* 00063 * \brief 00064 * Constructs an EdgeString with the given factory used to 00065 * convert this EdgeString to a LineString 00066 */ 00067 EdgeString(const geom::GeometryFactory *newFactory); 00068 00069 ~EdgeString(); 00070 00074 void add(LineMergeDirectedEdge *directedEdge); 00075 00076 /* 00077 * Converts this EdgeString into a LineString. 00078 */ 00079 geom::LineString* toLineString(); 00080 }; 00081 00082 } // namespace geos::operation::linemerge 00083 } // namespace geos::operation 00084 } // namespace geos 00085 00086 #ifdef _MSC_VER 00087 #pragma warning(pop) 00088 #endif 00089 00090 #endif // GEOS_OP_LINEMERGE_EDGESTRING_H