/src/geos/include/geos/noding/ArcIntersectionAdder.h
Line | Count | Source |
1 | | /********************************************************************** |
2 | | * |
3 | | * GEOS - Geometry Engine Open Source |
4 | | * http://geos.osgeo.org |
5 | | * |
6 | | * Copyright (C) 2025 ISciences, LLC |
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 | | #pragma once |
16 | | |
17 | | #include <geos/export.h> |
18 | | #include <geos/algorithm/CircularArcIntersector.h> |
19 | | #include <geos/noding/ArcIntersector.h> |
20 | | |
21 | | namespace geos::noding { |
22 | | |
23 | | class GEOS_DLL ArcIntersectionAdder : public ArcIntersector { |
24 | | |
25 | | public: |
26 | | explicit ArcIntersectionAdder(algorithm::CircularArcIntersector& cai) : |
27 | 0 | m_intersector(cai) {} |
28 | | |
29 | | void processIntersections(ArcString& e0, std::size_t segIndex0, ArcString& e1, std::size_t segIndex1) override; |
30 | | |
31 | | void processIntersections(ArcString& e0, std::size_t segIndex0, SegmentString& e1, std::size_t segIndex1) override; |
32 | | |
33 | | void processIntersections(SegmentString& e0, std::size_t segIndex0, SegmentString& e1, std::size_t segIndex1) override; |
34 | | |
35 | | private: |
36 | | static bool isAdjacentSegments(std::size_t i1, std::size_t i2); |
37 | | |
38 | | bool isTrivialIntersection(const PathString* e0, std::size_t segIndex0, |
39 | | const PathString* e1, std::size_t segIndex1) const; |
40 | | |
41 | | algorithm::CircularArcIntersector& m_intersector; |
42 | | }; |
43 | | |
44 | | } |