GEOS 3.11.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#pragma once
20
21#include <geos/geom/util/CoordinateOperation.h>
22
23// Forward declarations
24namespace geos {
25namespace geom {
26class PrecisionModel;
27class CoordinateSequence;
28class Geometry;
29}
30}
31
32namespace geos {
33namespace precision { // geos.precision
34
35class PrecisionReducerCoordinateOperation :
36 public geom::util::CoordinateOperation {
37 using CoordinateOperation::edit;
38private:
39
40 const geom::PrecisionModel& targetPM;
41
42 bool removeCollapsed;
43
44 PrecisionReducerCoordinateOperation(PrecisionReducerCoordinateOperation const&); /*= delete*/
45 PrecisionReducerCoordinateOperation& operator=(PrecisionReducerCoordinateOperation const&); /*= delete*/
46
47public:
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: geos.h:39