DouglasPeuckerSimplifier.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/DouglasPeuckerSimplifier.java rev. 1.5 (JTS-1.7)
00016  *
00017  **********************************************************************/
00018 
00019 #ifndef GEOS_SIMPLIFY_DOUBGLASPEUCKERSIMPLIFIER_H
00020 #define GEOS_SIMPLIFY_DOUBGLASPEUCKERSIMPLIFIER_H
00021 
00022 #include <geos/export.h>
00023 #include <memory> // for auto_ptr
00024 
00025 // Forward declarations
00026 namespace geos {
00027         namespace geom {
00028                 class Geometry;
00029         }
00030 }
00031 
00032 namespace geos {
00033 namespace simplify { // geos::simplify
00034 
00035 
00050 class GEOS_DLL DouglasPeuckerSimplifier {
00051 
00052 public:
00053 
00054         static std::auto_ptr<geom::Geometry> simplify(
00055                         const geom::Geometry* geom,
00056                         double tolerance);
00057 
00058         DouglasPeuckerSimplifier(const geom::Geometry* geom);
00059 
00070         void setDistanceTolerance(double tolerance);
00071 
00072         std::auto_ptr<geom::Geometry> getResultGeometry();
00073 
00074 
00075 private:
00076 
00077         const geom::Geometry* inputGeom;
00078 
00079         double distanceTolerance;
00080 };
00081 
00082 
00083 } // namespace geos::simplify
00084 } // namespace geos
00085 
00086 #endif // GEOS_SIMPLIFY_DOUBGLASPEUCKERSIMPLIFIER_H

Generated on 15 May 2014 for GEOS by  doxygen 1.4.7