GEOS  3.14.0dev
SimpleGeometryPrecisionReducer.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2005-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 Public Licence as published
10  * by the Free Software Foundation.
11  * See the COPYING file for more information.
12  *
13  **********************************************************************/
14 
15 #pragma once
16 
17 #include <geos/export.h>
18 #include <memory>
19 
20 // Forward declarations
21 namespace geos {
22 namespace geom {
23 class PrecisionModel;
24 class Geometry;
25 }
26 }
27 
28 namespace geos {
29 namespace precision { // geos.precision
30 
45 
46 private:
47 
48  const geom::PrecisionModel* newPrecisionModel;
49 
50  bool removeCollapsed;
51 
52  //bool changePrecisionModel;
53 
54 public:
55 
57 
66  void setRemoveCollapsedComponents(bool nRemoveCollapsed);
67 
68  /*
69  * Sets whether the {@link PrecisionModel} of the new reduced Geometry
70  * will be changed to be the {@link PrecisionModel} supplied to
71  * specify the reduction. The default is to not change the
72  * precision model
73  *
74  * @param changePrecisionModel if <code>true</code> the precision
75  * model of the created Geometry will be the
76  * the precisionModel supplied in the constructor.
77  */
78  //void setChangePrecisionModel(bool nChangePrecisionModel);
79 
80  const geom::PrecisionModel* getPrecisionModel();
81 
82  bool getRemoveCollapsed();
83  std::unique_ptr<geom::Geometry> reduce(const geom::Geometry* geom);
84 };
85 
86 } // namespace geos.precision
87 } // namespace geos
88 
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:88
Reduces the precision of a geom::Geometry according to the supplied geom::PrecisionModel,...
Definition: SimpleGeometryPrecisionReducer.h:44
void setRemoveCollapsedComponents(bool nRemoveCollapsed)
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25