GEOS 3.15.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
26namespace geos {
27namespace geom {
28class Envelope;
29class PrecisionModel;
30}
31namespace noding {
32class SegmentString;
33}
34}
35
36namespace geos {
37namespace noding { // geos::noding
38
52class GEOS_DLL SegmentExtractingNoder : public Noder {
53
54private:
55
56 std::vector<std::unique_ptr<SegmentString>> segList;
57
58 void extractSegments(
59 const std::vector<SegmentString*>& inputSegs,
60 std::vector<std::unique_ptr<SegmentString>>& outputSegs);
61
62 void extractSegments(
63 const SegmentString* ss,
64 std::vector<std::unique_ptr<SegmentString>>& outputSegs);
65
66
67public:
68
73
74 void computeNodes(const std::vector<SegmentString*>& segStrings) override;
75
80 std::vector<std::unique_ptr<SegmentString>> getNodedSubstrings() override;
81
82 // Declare type as noncopyable
84 SegmentExtractingNoder& operator=(SegmentExtractingNoder const&) = delete;
85
86};
87
88
89} // namespace geos::noding
90} // namespace geos
Computes all intersections between segments in a set of SegmentString.
Definition Noder.h:44
Definition SegmentExtractingNoder.h:52
std::vector< std::unique_ptr< SegmentString > > getNodedSubstrings() override
void computeNodes(const std::vector< SegmentString * > &segStrings) override
Computes the noding for a collection of SegmentStrings.
An interface for classes which represent a sequence of contiguous line segments.
Definition SegmentString.h:47
Basic namespace for all GEOS functionalities.
Definition geos.h:38