GEOS 3.6.2
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
26namespace geos {
27 namespace geom {
28 class Geometry;
29 }
30}
31
32namespace geos {
33namespace simplify { // geos::simplify
34
35
50class GEOS_DLL DouglasPeuckerSimplifier {
51
52public:
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
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:167
void setDistanceTolerance(double tolerance)
Sets the distance tolerance for the simplification.
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25