GEOS  3.9.1dev
TopologyPreservingSimplifier.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2006 Refractions Research Inc.
7  *
8  * This is free software; you can redistribute and/or modify it under
9  * the terms of the GNU Lesser General Licence as published
10  * by the Free Software Foundation.
11  * See the COPYING file for more information.
12  *
13  **********************************************************************
14  *
15  * Last port: simplify/TopologyPreservingSimplifier.java r536 (JTS-1.12+)
16  *
17  **********************************************************************
18  *
19  * NOTES:
20  *
21  **********************************************************************/
22 
23 #ifndef GEOS_SIMPLIFY_TOPOLOGYPRESERVINGSIMPLIFIER_H
24 #define GEOS_SIMPLIFY_TOPOLOGYPRESERVINGSIMPLIFIER_H
25 
26 #include <geos/export.h>
27 #include <geos/geom/Geometry.h>
29 #include <memory> // for unique_ptr
30 #include <map>
31 
32 #ifdef _MSC_VER
33 #pragma warning(push)
34 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
35 #endif
36 
37 namespace geos {
38 namespace simplify { // geos::simplify
39 
58 
59 public:
60 
61  static std::unique_ptr<geom::Geometry> simplify(
62  const geom::Geometry* geom,
63  double tolerance);
64 
66 
77  void setDistanceTolerance(double tolerance);
78 
79  std::unique_ptr<geom::Geometry> getResultGeometry();
80 
81 private:
82 
84 
85  std::unique_ptr<TaggedLinesSimplifier> lineSimplifier;
86 
87 };
88 
89 } // namespace geos::simplify
90 } // namespace geos
91 
92 #ifdef _MSC_VER
93 #pragma warning(pop)
94 #endif
95 
96 #endif // GEOS_SIMPLIFY_TOPOLOGYPRESERVINGSIMPLIFIER_H
#define GEOS_DLL
Definition: export.h:28
Simplifies a geometry, ensuring that the result is a valid geometry having the same dimension and num...
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Basic namespace for all GEOS functionalities.
std::unique_ptr< TaggedLinesSimplifier > lineSimplifier