- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# DouglasPeuckerSimplifier.h

    00001 /**********************************************************************
    00002  * $Id: DouglasPeuckerSimplifier.h 1820 2006-09-06 16:54:23Z 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/DouglasPeuckerSimplifier.java rev. 1.5 (JTS-1.7)
    00017  *
    00018  **********************************************************************/
    00019
    00020 #ifndef _GEOS_SIMPLIFY_DOUBGLASPEUCKERSIMPLIFIER_H_
    00021 #define _GEOS_SIMPLIFY_DOUBGLASPEUCKERSIMPLIFIER_H_
    00022
    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 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_
    00087
    00088 /**********************************************************************
    00089  * $Log$
    00090  * Revision 1.2  2006/04/13 10:39:12  strk
    00091  * Initial implementation of TaggedLinesSimplifier class
    00092  *
    00093  * Revision 1.1  2006/04/11 16:04:34  strk
    00094  * geos::simplify::DouglasPeukerSimplifier class + unit test
    00095  *
    00096  **********************************************************************/