GEOS: DouglasPeuckerSimplifier.h Source File

GEOS 3.5.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

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 auto_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::auto_ptr<geom::Geometry> simplify(
55 const geom::Geometry* geom,
56 double tolerance);
57
58 DouglasPeuckerSimplifier(const geom::Geometry* geom);
59
70 void setDistanceTolerance(double tolerance);
71
72 std::auto_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
geos::simplify::DouglasPeuckerSimplifier
Simplifies a Geometry using the standard Douglas-Peucker algorithm.
Definition: DouglasPeuckerSimplifier.h:50
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:167
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25