GEOS: IntersectionFinderAdder.h Source File

GEOS 3.5.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

IntersectionFinderAdder.h
1 /**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2006 Refractions Research Inc.
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 **********************************************************************
14 *
15 * Last port: noding/IntersectionFinderAdder.java rev. 1.5 (JTS-1.9)
16 *
17 **********************************************************************/
18
19 #ifndef GEOS_NODING_INTERSECTIONFINDERADDER_H
20 #define GEOS_NODING_INTERSECTIONFINDERADDER_H
21
22 #include <geos/export.h>
23
24 #include <vector>
25 #include <iostream>
26
27 #include <geos/inline.h>
28
29 #include <geos/geom/Coordinate.h> // for use in vector
30 #include <geos/noding/SegmentIntersector.h> // for inheritance
31
32 // Forward declarations
33 namespace geos {
34 namespace geom {
35 class Coordinate;
36 }
37 namespace noding {
38 class SegmentString;
39 }
40 namespace algorithm {
41 class LineIntersector;
42 }
43 }
44
45 namespace geos {
46 namespace noding { // geos.noding
47
53 class GEOS_DLL IntersectionFinderAdder: public SegmentIntersector {
54
55 public:
56
64 IntersectionFinderAdder(algorithm::LineIntersector& newLi,
65 std::vector<geom::Coordinate>& v)
66 :
67 li(newLi),
68 interiorIntersections(v)
69 {}
70
81 void processIntersections(
82 SegmentString* e0, int segIndex0,
83 SegmentString* e1, int segIndex1);
84
85 std::vector<geom::Coordinate>& getInteriorIntersections() {
86 return interiorIntersections;
87 }
88
94 virtual bool isDone() const {
95 return false;
96 }
97
98 private:
99 algorithm::LineIntersector& li;
100 std::vector<geom::Coordinate>& interiorIntersections;
101
102 // Declare type as noncopyable
103 IntersectionFinderAdder(const IntersectionFinderAdder& other);
104 IntersectionFinderAdder& operator=(const IntersectionFinderAdder& rhs);
105 };
106
107 } // namespace geos.noding
108 } // namespace geos
109
110 #endif // GEOS_NODING_INTERSECTIONFINDERADDER_H
geos::noding::IntersectionFinderAdder
Finds proper and interior intersections in a set of SegmentStrings, and adds them as nodes...
Definition: IntersectionFinderAdder.h:53
geos::noding::SegmentString
An interface for classes which represent a sequence of contiguous line segments.
Definition: SegmentString.h:46
geos::noding::IntersectionFinderAdder::IntersectionFinderAdder
IntersectionFinderAdder(algorithm::LineIntersector &newLi, std::vector< geom::Coordinate > &v)
Definition: IntersectionFinderAdder.h:64
geos::algorithm::LineIntersector
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition: LineIntersector.h:49
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
geos::noding::SegmentIntersector
Processes possible intersections detected by a Noder.
Definition: noding/SegmentIntersector.h:47
geos::noding::IntersectionFinderAdder::isDone
virtual bool isDone() const
Definition: IntersectionFinderAdder.h:94