GEOS 3.9.1
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
33namespace geos {
34namespace geom {
35class Coordinate;
36}
37namespace noding {
38class SegmentString;
39}
40namespace algorithm {
41class LineIntersector;
42}
43}
44
45namespace geos {
46namespace noding { // geos.noding
47
54
55public:
56
65 std::vector<geom::Coordinate>& v)
66 :
67 li(newLi),
68 interiorIntersections(v)
69 {}
70
82 SegmentString* e0, size_t segIndex0,
83 SegmentString* e1, size_t segIndex1) override;
84
85 std::vector<geom::Coordinate>&
86 getInteriorIntersections()
87 {
88 return interiorIntersections;
89 }
90
96 bool
97 isDone() const override
98 {
99 return false;
100 }
101
102private:
104 std::vector<geom::Coordinate>& interiorIntersections;
105
106 // Declare type as noncopyable
108 IntersectionFinderAdder& operator=(const IntersectionFinderAdder& rhs) = delete;
109};
110
111} // namespace geos.noding
112} // namespace geos
113
114#endif // GEOS_NODING_INTERSECTIONFINDERADDER_H
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition LineIntersector.h:49
Finds proper and interior intersections in a set of SegmentStrings, and adds them as nodes.
Definition IntersectionFinderAdder.h:53
void processIntersections(SegmentString *e0, size_t segIndex0, SegmentString *e1, size_t segIndex1) override
This method is called by clients of the SegmentIntersector class to process intersections for two seg...
bool isDone() const override
Definition IntersectionFinderAdder.h:97
IntersectionFinderAdder(algorithm::LineIntersector &newLi, std::vector< geom::Coordinate > &v)
Creates an intersection finder which finds all proper intersections and stores them in the provided C...
Definition IntersectionFinderAdder.h:64
Processes possible intersections detected by a Noder.
Definition noding/SegmentIntersector.h:48
An interface for classes which represent a sequence of contiguous line segments.
Definition SegmentString.h:46
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26