GEOS  3.13.1
EdgeSegmentIntersector.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (c) 2024 Martin Davis
7  * Copyright (C) 2024 Paul Ramsey <pramsey@cleverelephant.ca>
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 #pragma once
17 
18 
19 #include <geos/noding/SegmentIntersector.h>
20 #include <geos/algorithm/LineIntersector.h>
21 #include <geos/export.h>
22 
23 
24 // Forward declarations
25 namespace geos {
26 namespace noding {
27  class SegmentString;
28 }
29 namespace operation {
30 namespace relateng {
31  class RelateSegmentString;
32  class TopologyComputer;
33 }
34 }
35 }
36 
37 
41 
42 
43 namespace geos { // geos.
44 namespace operation { // geos.operation
45 namespace relateng { // geos.operation.relateng
46 
47 class GEOS_DLL EdgeSegmentIntersector : public SegmentIntersector {
48 
49 private:
50 
51  // Members
52  LineIntersector li;
53  TopologyComputer& topoComputer;
54 
55  // Methods
56 
57 
58  void addIntersections(
59  RelateSegmentString* ssA, std::size_t segIndexA,
60  RelateSegmentString* ssB, std::size_t segIndexB);
61 
62 
63 public:
64 
65  EdgeSegmentIntersector(TopologyComputer& p_topoComputer)
66  : topoComputer(p_topoComputer)
67  {};
68 
69  void processIntersections(
70  SegmentString* ss0, std::size_t segIndex0,
71  SegmentString* ss1, std::size_t segIndex1) override;
72 
73  bool isDone() const override;
74 
75 };
76 
77 } // namespace geos.operation.relateng
78 } // namespace geos.operation
79 } // namespace geos
80 
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition: LineIntersector.h:53
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