GEOS  3.9.0dev
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
26 namespace geos {
27 namespace geom {
28 class Geometry;
29 }
30 }
31 
32 namespace geos {
33 namespace simplify { // geos::simplify
34 
35 
50 class GEOS_DLL DouglasPeuckerSimplifier {
51 
52 public:
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 
75 private:
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
Simplifies a Geometry using the standard Douglas-Peucker algorithm.
Definition: DouglasPeuckerSimplifier.h:50
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25