GEOS  3.3.3
TopologyPreservingSimplifier.h
1 /**********************************************************************
2  * $Id: TopologyPreservingSimplifier.h 2958 2010-03-29 11:29:40Z 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/TopologyPreservingSimplifier.java rev. 1.4 (JTS-1.7)
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 
60 {
61 
62 public:
63 
64  static std::auto_ptr<geom::Geometry> simplify(
65  const geom::Geometry* geom,
66  double tolerance);
67 
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  **********************************************************************/