GEOS  3.14.0dev
SegmentExtractingNoder.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2021 Paul Ramsey <pramsey@cleverelephant.ca>
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 
19 #include <geos/geom/Coordinate.h>
20 #include <geos/geom/Envelope.h>
21 #include <geos/noding/Noder.h>
22 #include <geos/noding/snap/SnappingPointIndex.h>
23 
24 
25 // Forward declarations
26 namespace geos {
27 namespace geom {
28 class Envelope;
29 class PrecisionModel;
30 }
31 namespace noding {
32 class SegmentString;
33 }
34 }
35 
36 namespace geos {
37 namespace noding { // geos::noding
38 
52 class GEOS_DLL SegmentExtractingNoder : public Noder {
53 
54 private:
55 
56  std::vector<SegmentString*>* segList;
57 
58  void extractSegments(
59  const std::vector<SegmentString*>& inputSegs,
60  std::vector<SegmentString*>& outputSegs);
61 
62  void extractSegments(
63  const SegmentString* ss,
64  std::vector<SegmentString*>& outputSegs);
65 
66 
67 public:
68 
72  SegmentExtractingNoder() : segList(nullptr)
73  {};
74 
75  void computeNodes(std::vector<SegmentString*>* segStrings) override;
76 
81  std::vector<SegmentString*>* getNodedSubstrings() const override;
82 
83 
84 };
85 
86 
87 } // namespace geos::noding
88 } // namespace geos
Computes all intersections between segments in a set of SegmentString.
Definition: Noder.h:46
Definition: SegmentExtractingNoder.h:52
void computeNodes(std::vector< SegmentString * > *segStrings) override
Computes the noding for a collection of SegmentStrings.
std::vector< SegmentString * > * getNodedSubstrings() const override
SegmentExtractingNoder()
Definition: SegmentExtractingNoder.h:72
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