GEOS  3.3.3
SingleInteriorIntersectionFinder.h
1 /**********************************************************************
2  * $Id: SingleInteriorIntersectionFinder.h 2778 2009-12-03 19:44:00Z mloskot $
3  *
4  * GEOS - Geometry Engine Open Source
5  * http://geos.refractions.net
6  *
7  * Copyright (C) 2006 Refractions Research Inc.
8  *
9  * This is free software; you can redistribute and/or modify it under
10  * the terms of the GNU Lesser General Public Licence as published
11  * by the Free Software Foundation.
12  * See the COPYING file for more information.
13  *
14  **********************************************************************/
15 
16 #ifndef GEOS_NODING_SINGLEINTERIORINTERSECTIONFINDER_H
17 #define GEOS_NODING_SINGLEINTERIORINTERSECTIONFINDER_H
18 
19 #include <geos/noding/SegmentIntersector.h> // for inheritance
20 #include <geos/geom/Coordinate.h> // for composition
21 
22 #include <vector>
23 
24 // Forward declarations
25 namespace geos {
26  namespace algorithm {
27  class LineIntersector;
28  }
29  namespace noding {
30  class SegmentString;
31  }
32 }
33 
34 namespace geos {
35 namespace noding { // geos.noding
36 
45 {
46 
47 public:
48 
56  :
57  li(newLi),
58  interiorIntersection(geom::Coordinate::getNull())
59  {
60  }
61 
67  bool hasIntersection() const
68  {
69  return !interiorIntersection.isNull();
70  }
71 
79  {
80  return interiorIntersection;
81  }
82 
88  const std::vector<geom::Coordinate>& getIntersectionSegments() const
89  {
90  return intSegments;
91  }
92 
103  SegmentString* e0, int segIndex0,
104  SegmentString* e1, int segIndex1);
105 
106  bool isDone() const
107  {
108  return !interiorIntersection.isNull();
109  }
110 
111 private:
113  geom::Coordinate interiorIntersection;
114  std::vector<geom::Coordinate> intSegments;
115 
116  // Declare type as noncopyable
119 };
120 
121 } // namespace geos.noding
122 } // namespace geos
123 
124 #endif // GEOS_NODING_SINGLEINTERIORINTERSECTIONFINDER_H
125 
126 /**********************************************************************
127  * $Log$
128  **********************************************************************/