GEOS 3.15.0dev
ValidatingNoder.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2020 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
18#include <geos/export.h>
19#include <geos/noding/Noder.h>
20#include <geos/noding/SegmentString.h>
21
22#include <memory> // for unique_ptr
23
24// Forward declarations
25namespace geos {
26namespace algorithm {
27class LineIntersector;
28}
29namespace geom {
30class Geometry;
31}
32}
33
34namespace geos {
35namespace noding { // geos.noding
36
51class GEOS_DLL ValidatingNoder : public Noder {
52
53private:
54
55 std::vector<std::unique_ptr<SegmentString>> nodedSS;
56 noding::Noder& noder;
57
58
59public:
60
61 ValidatingNoder(Noder& noderArg)
62 : noder(noderArg)
63 {}
64
65 ~ValidatingNoder() override;
66
67 void computeNodes(const std::vector<SegmentString*>& segStrings) override;
68
69 void validate() const;
70
71 std::vector<std::unique_ptr<SegmentString>> getNodedSubstrings() override;
72
73 // Declare type as noncopyable
74 ValidatingNoder(ValidatingNoder const&) = delete;
75 ValidatingNoder& operator=(ValidatingNoder const&) = delete;
76
77};
78
79} // namespace geos.noding
80} // namespace geos
81
Computes all intersections between segments in a set of SegmentString.
Definition Noder.h:44
Definition ValidatingNoder.h:51
std::vector< std::unique_ptr< SegmentString > > getNodedSubstrings() override
Returns a collection of fully noded SegmentStrings. The SegmentStrings have the same context as their...
void computeNodes(const std::vector< SegmentString * > &segStrings) override
Computes the noding for a collection of SegmentStrings.
Basic namespace for all GEOS functionalities.
Definition geos.h:38