GEOS 3.9.1
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
25namespace geos {
26namespace geom {
27class PrecisionModel;
28class CoordinateSequence;
29class Geometry;
30}
31}
32
33namespace geos {
34namespace precision { // geos.precision
35
36class PrecisionReducerCoordinateOperation :
37 public geom::util::CoordinateOperation {
38 using CoordinateOperation::edit;
39private:
40
41 const geom::PrecisionModel& targetPM;
42
43 bool removeCollapsed;
44
45 PrecisionReducerCoordinateOperation(PrecisionReducerCoordinateOperation const&); /*= delete*/
46 PrecisionReducerCoordinateOperation& operator=(PrecisionReducerCoordinateOperation const&); /*= delete*/
47
48public:
49
50 PrecisionReducerCoordinateOperation(const geom::PrecisionModel& pm,
51 bool doRemoveCollapsed)
52 :
53 targetPM(pm),
54 removeCollapsed(doRemoveCollapsed)
55 {}
56
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
std::unique_ptr< Geometry > edit(const Geometry *geometry, const GeometryFactory *factory) override
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26