GEOS: TopologyPreservingSimplifier.h Source File

GEOS 3.5.0

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

- File List

TopologyPreservingSimplifier.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/TopologyPreservingSimplifier.java r536 (JTS-1.12+)
16 *
17 **********************************************************************
18 *
19 * NOTES:
20 *
21 **********************************************************************/
22
23 #ifndef GEOS_SIMPLIFY_TOPOLOGYPRESERVINGSIMPLIFIER_H
24 #define GEOS_SIMPLIFY_TOPOLOGYPRESERVINGSIMPLIFIER_H
25
26 #include <geos/export.h>
27 #include <geos/geom/Geometry.h>
28 #include <geos/simplify/TaggedLinesSimplifier.h>
29 #include <memory> // for auto_ptr
30 #include <map>
31
32 #ifdef _MSC_VER
33 #pragma warning(push)
34 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
35 #endif
36
37 namespace geos {
38 namespace simplify { // geos::simplify
39
58 class GEOS_DLL TopologyPreservingSimplifier
59 {
60
61 public:
62
63 static std::auto_ptr<geom::Geometry> simplify(
64 const geom::Geometry* geom,
65 double tolerance);
66
67 TopologyPreservingSimplifier(const geom::Geometry* geom);
68
79 void setDistanceTolerance(double tolerance);
80
81 std::auto_ptr<geom::Geometry> getResultGeometry();
82
83 private:
84
85 const geom::Geometry* inputGeom;
86
87 std::auto_ptr<TaggedLinesSimplifier> lineSimplifier;
88
89 };
90
91 } // namespace geos::simplify
92 } // namespace geos
93
94 #ifdef _MSC_VER
95 #pragma warning(pop)
96 #endif
97
98 #endif // GEOS_SIMPLIFY_TOPOLOGYPRESERVINGSIMPLIFIER_H
geos::simplify::TopologyPreservingSimplifier
Simplifies a geometry, ensuring that the result is a valid geometry having the same dimension and num...
Definition: TopologyPreservingSimplifier.h:58
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