GEOS 3.14.0dev
SinglePassNoder.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2006 Refractions Research Inc.
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 <vector>
20
21#include <geos/noding/Noder.h>
22
23// Forward declarations
24namespace geos {
25namespace noding {
26class SegmentString;
27class SegmentIntersector;
28}
29}
30
31namespace geos {
32namespace noding { // geos.noding
33
34
48class GEOS_DLL SinglePassNoder : public Noder { // implements Noder
49
50protected:
51
54
55public:
56
57 SinglePassNoder(SegmentIntersector* nSegInt = nullptr): segInt(nSegInt) {}
58
59 ~SinglePassNoder() override {}
60
71 virtual void
73 {
74 segInt = newSegInt;
75 }
76
82 void computeNodes(std::vector<SegmentString*>* segStrings) override = 0;
83
91 std::vector<SegmentString*>* getNodedSubstrings() const override = 0;
92
93};
94
95} // namespace geos.noding
96} // namespace geos
Computes all intersections between segments in a set of SegmentString.
Definition Noder.h:46
Processes possible intersections detected by a Noder.
Definition noding/SegmentIntersector.h:45
Base class for Noders which make a single pass to find intersections.
Definition SinglePassNoder.h:48
void computeNodes(std::vector< SegmentString * > *segStrings) override=0
Computes the noding for a collection of SegmentStrings.
std::vector< SegmentString * > * getNodedSubstrings() const override=0
Returns a Collection of fully noded SegmentStrings.
SegmentIntersector * segInt
Externally owned.
Definition SinglePassNoder.h:53
virtual void setSegmentIntersector(SegmentIntersector *newSegInt)
Sets the SegmentIntersector to use with this noder.
Definition SinglePassNoder.h:72
Basic namespace for all GEOS functionalities.
Definition geos.h:39