00001 /********************************************************************** 00002 * $Id: TopologyPreservingSimplifier.h 2785 2009-12-03 19:55:11Z mloskot $ 00003 * 00004 * GEOS - Geometry Engine Open Source 00005 * http://geos.refractions.net 00006 * 00007 * Copyright (C) 2006 Refractions Research Inc. 00008 * 00009 * This is free software; you can redistribute and/or modify it under 00010 * the terms of the GNU Lesser General Licence as published 00011 * by the Free Software Foundation. 00012 * See the COPYING file for more information. 00013 * 00014 ********************************************************************** 00015 * 00016 * Last port: simplify/TopologyPreservingSimplifier.java rev. 1.4 (JTS-1.7) 00017 * 00018 ********************************************************************** 00019 * 00020 * NOTES: 00021 * 00022 **********************************************************************/ 00023 00024 #ifndef GEOS_SIMPLIFY_TOPOLOGYPRESERVINGSIMPLIFIER_H 00025 #define GEOS_SIMPLIFY_TOPOLOGYPRESERVINGSIMPLIFIER_H 00026 00027 #include <geos/export.h> 00028 #include <geos/geom/Geometry.h> 00029 #include <geos/simplify/TaggedLinesSimplifier.h> 00030 #include <memory> // for auto_ptr 00031 #include <map> 00032 00033 namespace geos { 00034 namespace simplify { // geos::simplify 00035 00054 class GEOS_DLL TopologyPreservingSimplifier 00055 { 00056 00057 public: 00058 00059 static std::auto_ptr<geom::Geometry> simplify( 00060 const geom::Geometry* geom, 00061 double tolerance); 00062 00063 TopologyPreservingSimplifier(const geom::Geometry* geom); 00064 00075 void setDistanceTolerance(double tolerance); 00076 00077 std::auto_ptr<geom::Geometry> getResultGeometry(); 00078 00079 private: 00080 00081 const geom::Geometry* inputGeom; 00082 00083 std::auto_ptr<TaggedLinesSimplifier> lineSimplifier; 00084 00085 }; 00086 00087 } // namespace geos::simplify 00088 } // namespace geos 00089 00090 #endif // GEOS_SIMPLIFY_TOPOLOGYPRESERVINGSIMPLIFIER_H 00091 00092 /********************************************************************** 00093 * $Log$ 00094 * Revision 1.3 2006/04/13 16:04:10 strk 00095 * Made TopologyPreservingSimplifier implementation successfully build 00096 * 00097 * Revision 1.2 2006/04/13 14:25:17 strk 00098 * TopologyPreservingSimplifier initial port 00099 * 00100 **********************************************************************/