/src/geos/include/geos/operation/relateng/EdgeSegmentIntersector.h
Line | Count | Source |
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 | | namespace geos { // geos. |
38 | | namespace operation { // geos.operation |
39 | | namespace relateng { // geos.operation.relateng |
40 | | |
41 | | class GEOS_DLL EdgeSegmentIntersector : public geos::noding::SegmentIntersector { |
42 | | using SegmentString = geos::noding::SegmentString; |
43 | | using LineIntersector = geos::algorithm::LineIntersector; |
44 | | |
45 | | private: |
46 | | |
47 | | // Members |
48 | | LineIntersector li; |
49 | | TopologyComputer& topoComputer; |
50 | | |
51 | | // Methods |
52 | | |
53 | | |
54 | | void addIntersections( |
55 | | RelateSegmentString* ssA, std::size_t segIndexA, |
56 | | RelateSegmentString* ssB, std::size_t segIndexB); |
57 | | |
58 | | |
59 | | public: |
60 | | |
61 | | EdgeSegmentIntersector(TopologyComputer& p_topoComputer) |
62 | 0 | : topoComputer(p_topoComputer) |
63 | 0 | {}; |
64 | | |
65 | | void processIntersections( |
66 | | SegmentString* ss0, std::size_t segIndex0, |
67 | | SegmentString* ss1, std::size_t segIndex1) override; |
68 | | |
69 | | bool isDone() const override; |
70 | | |
71 | | }; |
72 | | |
73 | | } // namespace geos.operation.relateng |
74 | | } // namespace geos.operation |
75 | | } // namespace geos |
76 | | |