GEOS 3.11.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#pragma once
20
21#include <geos/export.h>
22#include <memory> // for unique_ptr
23
24// Forward declarations
25namespace geos {
26namespace geom {
27class Geometry;
28}
29}
30
31namespace geos {
32namespace simplify { // geos::simplify
33
34
50
51public:
52
53 static std::unique_ptr<geom::Geometry> simplify(
54 const geom::Geometry* geom,
55 double tolerance);
56
58
69 void setDistanceTolerance(double tolerance);
70
71 std::unique_ptr<geom::Geometry> getResultGeometry();
72
73
74private:
75
76 const geom::Geometry* inputGeom;
77
78 double distanceTolerance;
79};
80
81
82} // namespace geos::simplify
83} // namespace geos
84
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Simplifies a Geometry using the standard Douglas-Peucker algorithm.
Definition: DouglasPeuckerSimplifier.h:49
void setDistanceTolerance(double tolerance)
Sets the distance tolerance for the simplification.
Basic namespace for all GEOS functionalities.
Definition: geos.h:39