TopologyPreservingSimplifier.h

00001 /**********************************************************************
00002  *
00003  * GEOS - Geometry Engine Open Source
00004  * http://geos.osgeo.org
00005  *
00006  * Copyright (C) 2006 Refractions Research Inc.
00007  *
00008  * This is free software; you can redistribute and/or modify it under
00009  * the terms of the GNU Lesser General Licence as published
00010  * by the Free Software Foundation. 
00011  * See the COPYING file for more information.
00012  *
00013  **********************************************************************
00014  *
00015  * Last port: simplify/TopologyPreservingSimplifier.java r536 (JTS-1.12+)
00016  *
00017  **********************************************************************
00018  *
00019  * NOTES:
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> // for auto_ptr
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 { // geos::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 } // namespace geos::simplify
00092 } // namespace geos
00093 
00094 #ifdef _MSC_VER
00095 #pragma warning(pop)
00096 #endif
00097 
00098 #endif // GEOS_SIMPLIFY_TOPOLOGYPRESERVINGSIMPLIFIER_H

Generated on 30 Dec 2015 for GEOS by  doxygen 1.4.7