00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef GEOS_SIMPLIFY_TOPOLOGYPRESERVINGSIMPLIFIER_H
00024 #define GEOS_SIMPLIFY_TOPOLOGYPRESERVINGSIMPLIFIER_H
00025
00026 #include <geos/export.h>
00027 #include <geos/geom/Geometry.h>
00028 #include <geos/simplify/TaggedLinesSimplifier.h>
00029 #include <memory>
00030 #include <map>
00031
00032 #ifdef _MSC_VER
00033 #pragma warning(push)
00034 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00035 #endif
00036
00037 namespace geos {
00038 namespace simplify {
00039
00058 class GEOS_DLL TopologyPreservingSimplifier
00059 {
00060
00061 public:
00062
00063 static std::auto_ptr<geom::Geometry> simplify(
00064 const geom::Geometry* geom,
00065 double tolerance);
00066
00067 TopologyPreservingSimplifier(const geom::Geometry* geom);
00068
00079 void setDistanceTolerance(double tolerance);
00080
00081 std::auto_ptr<geom::Geometry> getResultGeometry();
00082
00083 private:
00084
00085 const geom::Geometry* inputGeom;
00086
00087 std::auto_ptr<TaggedLinesSimplifier> lineSimplifier;
00088
00089 };
00090
00091 }
00092 }
00093
00094 #ifdef _MSC_VER
00095 #pragma warning(pop)
00096 #endif
00097
00098 #endif // GEOS_SIMPLIFY_TOPOLOGYPRESERVINGSIMPLIFIER_H