GEOS  3.13.0dev
CommonBitsRemover.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 <geos/geom/Coordinate.h> // for composition
19 
20 // Forward declarations
21 namespace geos {
22 namespace geom {
23 class Geometry;
24 }
25 namespace precision {
26 class CommonBitsRemover;
27 class CommonCoordinateFilter;
28 }
29 }
30 
31 namespace geos {
32 namespace precision { // geos.precision
33 
39 class GEOS_DLL CommonBitsRemover {
40 
41 private:
42 
43  geom::Coordinate commonCoord;
44 
45  CommonCoordinateFilter* ccFilter;
46 
47  CommonBitsRemover(const CommonBitsRemover&) = delete;
48  CommonBitsRemover& operator=(const CommonBitsRemover&) = delete;
49 
50 public:
51 
53 
55 
64  void add(const geom::Geometry* geom);
65 
70 
79 
88 };
89 
90 } // namespace geos.precision
91 } // namespace geos
92 
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:216
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Allow computing and removing common mantissa bits from one or more Geometries.
Definition: CommonBitsRemover.h:39
geom::Coordinate & getCommonCoordinate()
geom::Geometry * addCommonBits(geom::Geometry *geom)
Adds the common coordinate bits back into a Geometry. The coordinates of the Geometry are changed.
void removeCommonBits(geom::Geometry *geom)
Removes the common coordinate bits from a Geometry. The coordinates of the Geometry are changed.
void add(const geom::Geometry *geom)
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25