GEOS  3.13.0dev
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 #pragma once
20 
21 #include <geos/export.h>
22 
23 #include <vector>
24 #include <iostream>
25 
26 #include <geos/geom/Coordinate.h> // for use in vector
27 #include <geos/noding/SegmentIntersector.h> // for inheritance
28 
29 // Forward declarations
30 namespace geos {
31 namespace geom {
32 class Coordinate;
33 }
34 namespace noding {
35 class SegmentString;
36 }
37 namespace algorithm {
38 class LineIntersector;
39 }
40 }
41 
42 namespace geos {
43 namespace noding { // geos.noding
44 
51 
52 public:
53 
62  std::vector<geom::Coordinate>& v)
63  :
64  li(newLi),
65  interiorIntersections(v)
66  {}
67 
79  SegmentString* e0, std::size_t segIndex0,
80  SegmentString* e1, std::size_t segIndex1) override;
81 
82  std::vector<geom::Coordinate>&
83  getInteriorIntersections()
84  {
85  return interiorIntersections;
86  }
87 
93  bool
94  isDone() const override
95  {
96  return false;
97  }
98 
99 private:
101  std::vector<geom::Coordinate>& interiorIntersections;
102 
103  // Declare type as noncopyable
104  IntersectionFinderAdder(const IntersectionFinderAdder& other) = delete;
105  IntersectionFinderAdder& operator=(const IntersectionFinderAdder& rhs) = delete;
106 };
107 
108 } // namespace geos.noding
109 } // namespace geos
110 
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition: LineIntersector.h:53
Finds proper and interior intersections in a set of SegmentStrings, and adds them as nodes.
Definition: IntersectionFinderAdder.h:50
void processIntersections(SegmentString *e0, std::size_t segIndex0, SegmentString *e1, std::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:94
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:61
Processes possible intersections detected by a Noder.
Definition: noding/SegmentIntersector.h:45
An interface for classes which represent a sequence of contiguous line segments.
Definition: SegmentString.h:47
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25