GEOS 3.3.4

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

- File List

DouglasPeuckerSimplifier.h
1 /**********************************************************************
2 * $Id: DouglasPeuckerSimplifier.h 2785 2009-12-03 19:55:11Z mloskot $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2006 Refractions Research Inc.
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************
15 *
16 * Last port: simplify/DouglasPeuckerSimplifier.java rev. 1.5 (JTS-1.7)
17 *
18 **********************************************************************/
19
20 #ifndef GEOS_SIMPLIFY_DOUBGLASPEUCKERSIMPLIFIER_H
21 #define GEOS_SIMPLIFY_DOUBGLASPEUCKERSIMPLIFIER_H
22
23 #include <geos/export.h>
24 #include <memory> // for auto_ptr
25
26 // Forward declarations
27 namespace geos {
28 namespace geom {
29 class Geometry;
30 }
31 }
32
33 namespace geos {
34 namespace simplify { // geos::simplify
35
36
51 class GEOS_DLL DouglasPeuckerSimplifier {
52
53 public:
54
55 static std::auto_ptr<geom::Geometry> simplify(
56 const geom::Geometry* geom,
57 double tolerance);
58
59 DouglasPeuckerSimplifier(const geom::Geometry* geom);
60
71 void setDistanceTolerance(double tolerance);
72
73 std::auto_ptr<geom::Geometry> getResultGeometry();
74
75
76 private:
77
78 const geom::Geometry* inputGeom;
79
80 double distanceTolerance;
81 };
82
83
84 } // namespace geos::simplify
85 } // namespace geos
86
87 #endif // GEOS_SIMPLIFY_DOUBGLASPEUCKERSIMPLIFIER_H
88
89 /**********************************************************************
90 * $Log$
91 * Revision 1.2 2006/04/13 10:39:12 strk
92 * Initial implementation of TaggedLinesSimplifier class
93 *
94 * Revision 1.1 2006/04/11 16:04:34 strk
95 * geos::simplify::DouglasPeukerSimplifier class + unit test
96 *
97 **********************************************************************/