GEOS: CommonBitsOp.h Source File

GEOS 3.5.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

CommonBitsOp.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 #ifndef GEOS_PRECISION_COMMONBITSOP_H
16 #define GEOS_PRECISION_COMMONBITSOP_H
17
18 #include <geos/export.h>
19 #include <geos/precision/CommonBitsRemover.h> // for auto_ptr composition
20
21 #include <vector>
22 #include <memory>
23
24 #ifdef _MSC_VER
25 #pragma warning(push)
26 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
27 #endif
28
29 namespace geos {
30 namespace geom {
31 class Geometry;
32 }
33 namespace precision {
34 //class CommonBitsRemover;
35 }
36 }
37
38 namespace geos {
39 namespace precision { // geos.precision
40
50 class GEOS_DLL CommonBitsOp {
51
52 private:
53
54 bool returnToOriginalPrecision;
55
56 std::auto_ptr<CommonBitsRemover> cbr;
57
66 geom::Geometry* removeCommonBits(const geom::Geometry *geom0);
67
71 void removeCommonBits(
72 const geom::Geometry* geom0,
73 const geom::Geometry* geom1,
74 std::auto_ptr<geom::Geometry>& rgeom0,
75 std::auto_ptr<geom::Geometry>& rgeom1);
76
77
78 public:
79
83 CommonBitsOp();
84
91 CommonBitsOp(bool nReturnToOriginalPrecision);
92
101 geom::Geometry* intersection(
102 const geom::Geometry *geom0,
103 const geom::Geometry *geom1);
104
113 geom::Geometry* Union(
114 const geom::Geometry *geom0,
115 const geom::Geometry *geom1);
116
125 geom::Geometry* difference(
126 const geom::Geometry *geom0,
127 const geom::Geometry *geom1);
128
137 geom::Geometry* symDifference(
138 const geom::Geometry *geom0,
139 const geom::Geometry *geom1);
140
148 geom::Geometry* buffer(
149 const geom::Geometry *geom0,
150 double distance);
151
163 geom::Geometry* computeResultPrecision(
164 geom::Geometry *result);
165 };
166
167 } // namespace geos.precision
168 } // namespace geos
169
170 #ifdef _MSC_VER
171 #pragma warning(pop)
172 #endif
173
174 #endif // GEOS_PRECISION_COMMONBITSOP_H
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:167
geos::precision::CommonBitsOp
Provides versions of Geometry spatial functions which use common bit removal to reduce the likelihood...
Definition: CommonBitsOp.h:50
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25