GEOS  3.8.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 #ifndef GEOS_PRECISION_PRECISIONREDUCERCOORDINATEOPERATION_H
20 #define GEOS_PRECISION_PRECISIONREDUCERCOORDINATEOPERATION_H
21 
22 #include <geos/geom/util/CoordinateOperation.h>
23 
24 // Forward declarations
25 namespace geos {
26 namespace geom {
27 class PrecisionModel;
28 class CoordinateSequence;
29 class Geometry;
30 }
31 }
32 
33 namespace geos {
34 namespace precision { // geos.precision
35 
36 class PrecisionReducerCoordinateOperation :
37  public geom::util::CoordinateOperation {
38  using CoordinateOperation::edit;
39 private:
40 
41  const geom::PrecisionModel& targetPM;
42 
43  bool removeCollapsed;
44 
45  PrecisionReducerCoordinateOperation(PrecisionReducerCoordinateOperation const&); /*= delete*/
46  PrecisionReducerCoordinateOperation& operator=(PrecisionReducerCoordinateOperation const&); /*= delete*/
47 
48 public:
49 
50  PrecisionReducerCoordinateOperation(const geom::PrecisionModel& pm,
51  bool doRemoveCollapsed)
52  :
53  targetPM(pm),
54  removeCollapsed(doRemoveCollapsed)
55  {}
56 
58  //
60  std::unique_ptr<geom::CoordinateSequence> edit(const geom::CoordinateSequence* coordinates,
61  const geom::Geometry* geom) override;
62 };
63 
64 } // namespace geos.precision
65 } // namespace geos
66 
67 #endif // GEOS_PRECISION_PRECISIONREDUCERCOORDINATEOPERATION_H
68 
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
std::unique_ptr< Geometry > edit(const Geometry *geometry, const GeometryFactory *factory) override