GEOS  3.13.0dev
PrecisionReducerCoordinateOperation.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2012 Sandro Santilli <strk@kbt.io>
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  * Last port: precision/PrecisionreducerCoordinateOperation.java r591 (JTS-1.12)
16  *
17  **********************************************************************/
18 
19 #pragma once
20 
21 #include <geos/geom/util/CoordinateOperation.h>
22 
23 // Forward declarations
24 namespace geos {
25 namespace geom {
26 class PrecisionModel;
27 class CoordinateSequence;
28 class Geometry;
29 }
30 }
31 
32 namespace geos {
33 namespace precision { // geos.precision
34 
35 class PrecisionReducerCoordinateOperation :
36  public geom::util::CoordinateOperation {
37  using CoordinateOperation::edit;
38 private:
39 
40  const geom::PrecisionModel& targetPM;
41 
42  bool removeCollapsed;
43 
44  PrecisionReducerCoordinateOperation(PrecisionReducerCoordinateOperation const&); /*= delete*/
45  PrecisionReducerCoordinateOperation& operator=(PrecisionReducerCoordinateOperation const&); /*= delete*/
46 
47 public:
48 
49  PrecisionReducerCoordinateOperation(const geom::PrecisionModel& pm,
50  bool doRemoveCollapsed)
51  :
52  targetPM(pm),
53  removeCollapsed(doRemoveCollapsed)
54  {}
55 
59  std::unique_ptr<geom::CoordinateSequence> edit(const geom::CoordinateSequence* coordinates,
60  const geom::Geometry* geom) override;
61 };
62 
63 } // namespace geos.precision
64 } // namespace geos
65 
std::unique_ptr< Geometry > edit(const Geometry *geometry, const GeometryFactory *factory) override
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25