GEOS 3.9.1
DouglasPeuckerSimplifier.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/DouglasPeuckerSimplifier.java rev. 1.5 (JTS-1.7)
16 *
17 **********************************************************************/
18
19#ifndef GEOS_SIMPLIFY_DOUBGLASPEUCKERSIMPLIFIER_H
20#define GEOS_SIMPLIFY_DOUBGLASPEUCKERSIMPLIFIER_H
21
22#include <geos/export.h>
23#include <memory> // for unique_ptr
24
25// Forward declarations
26namespace geos {
27namespace geom {
28class Geometry;
29}
30}
31
32namespace geos {
33namespace simplify { // geos::simplify
34
35
51
52public:
53
54 static std::unique_ptr<geom::Geometry> simplify(
55 const geom::Geometry* geom,
56 double tolerance);
57
59
70 void setDistanceTolerance(double tolerance);
71
72 std::unique_ptr<geom::Geometry> getResultGeometry();
73
74
75private:
76
77 const geom::Geometry* inputGeom;
78
79 double distanceTolerance;
80};
81
82
83} // namespace geos::simplify
84} // namespace geos
85
86#endif // GEOS_SIMPLIFY_DOUBGLASPEUCKERSIMPLIFIER_H
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Simplifies a Geometry using the standard Douglas-Peucker algorithm.
Definition: DouglasPeuckerSimplifier.h:50
void setDistanceTolerance(double tolerance)
Sets the distance tolerance for the simplification.
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26