GEOS 3.9.1
GeometryNoder.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2012 Sandro Santilli <strk@kbt.io>
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 * NOTE: this is not in JTS. JTS has a snapround/GeometryNoder though
16 *
17 **********************************************************************/
18
19#ifndef GEOS_NODING_GEOMETRYNODER_H
20#define GEOS_NODING_GEOMETRYNODER_H
21
22#include <geos/export.h>
23#include <geos/noding/SegmentString.h> // for NonConstVect
24
25#include <memory> // for unique_ptr
26
27// Forward declarations
28namespace geos {
29namespace geom {
30class Geometry;
31}
32namespace noding {
33class Noder;
34}
35}
36
37namespace geos {
38namespace noding { // geos.noding
39
40class GEOS_DLL GeometryNoder {
41public:
42
43 static std::unique_ptr<geom::Geometry> node(const geom::Geometry& geom);
44
45 GeometryNoder(const geom::Geometry& g);
46
47 std::unique_ptr<geom::Geometry> getNoded();
48
49private:
50
51 const geom::Geometry& argGeom;
52
53 SegmentString::NonConstVect lineList;
54
55 static void extractSegmentStrings(const geom::Geometry& g,
56 SegmentString::NonConstVect& to);
57
58 Noder& getNoder();
59
60 std::unique_ptr<Noder> noder;
61
62 std::unique_ptr<geom::Geometry> toGeometry(SegmentString::NonConstVect& noded);
63
64 GeometryNoder(GeometryNoder const&); /*= delete*/
65 GeometryNoder& operator=(GeometryNoder const&); /*= delete*/
66};
67
68} // namespace geos.noding
69} // namespace geos
70
71#endif // GEOS_NODING_NODER_H
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26