DouglasPeuckerSimplifier.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: simplify/DouglasPeuckerSimplifier.java rev. 1.5 (JTS-1.7)
*
**********************************************************************/
#pragma once
#include <geos/export.h>
#include <memory> // for unique_ptr
// Forward declarations
namespace geos {
namespace geom {
class Geometry;
}
}
namespace geos {
namespace simplify { // geos::simplify
class GEOS_DLL DouglasPeuckerSimplifier {
public:
static std::unique_ptr<geom::Geometry> simplify(
const geom::Geometry* geom,
double tolerance);
DouglasPeuckerSimplifier(const geom::Geometry* geom);
void setDistanceTolerance(double tolerance);
std::unique_ptr<geom::Geometry> getResultGeometry();
private:
const geom::Geometry* inputGeom;
double distanceTolerance;
};
} // namespace geos::simplify
} // namespace geos
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
geos::simplify::DouglasPeuckerSimplifier::setDistanceTolerance
void setDistanceTolerance(double tolerance)
Sets the distance tolerance for the simplification.
geos::geom
Definition Angle.h:26
geos::simplify
Classes which implement algorithms for simplifying or generalizing geometries.
Definition Corner.h:26
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38