GEOS: TopologyPreservingSimplifier.h Source File

GEOS 3.3.8

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

- File List

TopologyPreservingSimplifier.h
1 /**********************************************************************
2 * $Id: TopologyPreservingSimplifier.h 3626 2012-05-09 18:02:09Z strk $
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/TopologyPreservingSimplifier.java r536 (JTS-1.12+)
17 *
18 **********************************************************************
19 *
20 * NOTES:
21 *
22 **********************************************************************/
23
24 #ifndef GEOS_SIMPLIFY_TOPOLOGYPRESERVINGSIMPLIFIER_H
25 #define GEOS_SIMPLIFY_TOPOLOGYPRESERVINGSIMPLIFIER_H
26
27 #include <geos/export.h>
28 #include <geos/geom/Geometry.h>
29 #include <geos/simplify/TaggedLinesSimplifier.h>
30 #include <memory> // for auto_ptr
31 #include <map>
32
33 #ifdef _MSC_VER
34 #pragma warning(push)
35 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
36 #endif
37
38 namespace geos {
39 namespace simplify { // geos::simplify
40
59 class GEOS_DLL TopologyPreservingSimplifier
60 {
61
62 public:
63
64 static std::auto_ptr<geom::Geometry> simplify(
65 const geom::Geometry* geom,
66 double tolerance);
67
68 TopologyPreservingSimplifier(const geom::Geometry* geom);
69
80 void setDistanceTolerance(double tolerance);
81
82 std::auto_ptr<geom::Geometry> getResultGeometry();
83
84 private:
85
86 const geom::Geometry* inputGeom;
87
88 std::auto_ptr<TaggedLinesSimplifier> lineSimplifier;
89
90 };
91
92 } // namespace geos::simplify
93 } // namespace geos
94
95 #ifdef _MSC_VER
96 #pragma warning(pop)
97 #endif
98
99 #endif // GEOS_SIMPLIFY_TOPOLOGYPRESERVINGSIMPLIFIER_H
100
101 /**********************************************************************
102 * $Log$
103 * Revision 1.3 2006/04/13 16:04:10 strk
104 * Made TopologyPreservingSimplifier implementation successfully build
105 *
106 * Revision 1.2 2006/04/13 14:25:17 strk
107 * TopologyPreservingSimplifier initial port
108 *
109 **********************************************************************/