GEOS
3.6.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2006 Refractions Research Inc. 00007 * 00008 * This is free software; you can redistribute and/or modify it under 00009 * the terms of the GNU Lesser General Public Licence as published 00010 * by the Free Software Foundation. 00011 * See the COPYING file for more information. 00012 * 00013 ********************************************************************** 00014 * 00015 * Last port: noding/IntersectionFinderAdder.java rev. 1.5 (JTS-1.9) 00016 * 00017 **********************************************************************/ 00018 00019 #ifndef GEOS_NODING_INTERSECTIONFINDERADDER_H 00020 #define GEOS_NODING_INTERSECTIONFINDERADDER_H 00021 00022 #include <geos/export.h> 00023 00024 #include <vector> 00025 #include <iostream> 00026 00027 #include <geos/inline.h> 00028 00029 #include <geos/geom/Coordinate.h> // for use in vector 00030 #include <geos/noding/SegmentIntersector.h> // for inheritance 00031 00032 // Forward declarations 00033 namespace geos { 00034 namespace geom { 00035 class Coordinate; 00036 } 00037 namespace noding { 00038 class SegmentString; 00039 } 00040 namespace algorithm { 00041 class LineIntersector; 00042 } 00043 } 00044 00045 namespace geos { 00046 namespace noding { // geos.noding 00047 00053 class GEOS_DLL IntersectionFinderAdder: public SegmentIntersector { 00054 00055 public: 00056 00064 IntersectionFinderAdder(algorithm::LineIntersector& newLi, 00065 std::vector<geom::Coordinate>& v) 00066 : 00067 li(newLi), 00068 interiorIntersections(v) 00069 {} 00070 00081 void processIntersections( 00082 SegmentString* e0, int segIndex0, 00083 SegmentString* e1, int segIndex1); 00084 00085 std::vector<geom::Coordinate>& getInteriorIntersections() { 00086 return interiorIntersections; 00087 } 00088 00094 virtual bool isDone() const { 00095 return false; 00096 } 00097 00098 private: 00099 algorithm::LineIntersector& li; 00100 std::vector<geom::Coordinate>& interiorIntersections; 00101 00102 // Declare type as noncopyable 00103 IntersectionFinderAdder(const IntersectionFinderAdder& other); 00104 IntersectionFinderAdder& operator=(const IntersectionFinderAdder& rhs); 00105 }; 00106 00107 } // namespace geos.noding 00108 } // namespace geos 00109 00110 #endif // GEOS_NODING_INTERSECTIONFINDERADDER_H