GEOS 3.14.0dev
TopologyPreservingSimplifier.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 Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 **********************************************************************
14 *
15 * Last port: simplify/TopologyPreservingSimplifier.java r536 (JTS-1.12+)
16 *
17 **********************************************************************
18 *
19 * NOTES:
20 *
21 **********************************************************************/
22
23#pragma once
24
25#include <geos/export.h>
26#include <geos/geom/Geometry.h>
27#include <geos/simplify/TaggedLinesSimplifier.h>
28#include <memory> // for unique_ptr
29#include <map>
30
31#ifdef _MSC_VER
32#pragma warning(push)
33#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
34#endif
35
36namespace geos {
37namespace simplify { // geos::simplify
38
57
58public:
59
60 static std::unique_ptr<geom::Geometry> simplify(
61 const geom::Geometry* geom,
62 double tolerance);
63
65
76 void setDistanceTolerance(double tolerance);
77
78 std::unique_ptr<geom::Geometry> getResultGeometry();
79
80private:
81
82 const geom::Geometry* inputGeom;
83
84 std::unique_ptr<TaggedLinesSimplifier> lineSimplifier;
85
86};
87
88} // namespace geos::simplify
89} // namespace geos
90
91#ifdef _MSC_VER
92#pragma warning(pop)
93#endif
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:197
Simplifies a geometry, ensuring that the result is a valid geometry having the same dimension and num...
Definition TopologyPreservingSimplifier.h:56
void setDistanceTolerance(double tolerance)
Sets the distance tolerance for the simplification.
Basic namespace for all GEOS functionalities.
Definition geos.h:39