GEOS 3.3.4

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

- File List

CommonBitsOp.h
1 /**********************************************************************
2 * $Id: CommonBitsOp.h 3255 2011-03-01 17:56:10Z mloskot $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2005-2006 Refractions Research Inc.
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************/
15
16 #ifndef GEOS_PRECISION_COMMONBITSOP_H
17 #define GEOS_PRECISION_COMMONBITSOP_H
18
19 #include <geos/export.h>
20 #include <geos/precision/CommonBitsRemover.h> // for auto_ptr composition
21
22 #include <vector>
23 #include <memory>
24
25 #ifdef _MSC_VER
26 #pragma warning(push)
27 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
28 #endif
29
30 namespace geos {
31 namespace geom {
32 class Geometry;
33 }
34 namespace precision {
35 //class CommonBitsRemover;
36 }
37 }
38
39 namespace geos {
40 namespace precision { // geos.precision
41
51 class GEOS_DLL CommonBitsOp {
52
53 private:
54
55 bool returnToOriginalPrecision;
56
57 std::auto_ptr<CommonBitsRemover> cbr;
58
67 geom::Geometry* removeCommonBits(const geom::Geometry *geom0);
68
72 void removeCommonBits(
73 const geom::Geometry* geom0,
74 const geom::Geometry* geom1,
75 std::auto_ptr<geom::Geometry>& rgeom0,
76 std::auto_ptr<geom::Geometry>& rgeom1);
77
78
79 public:
80
84 CommonBitsOp();
85
92 CommonBitsOp(bool nReturnToOriginalPrecision);
93
102 geom::Geometry* intersection(
103 const geom::Geometry *geom0,
104 const geom::Geometry *geom1);
105
114 geom::Geometry* Union(
115 const geom::Geometry *geom0,
116 const geom::Geometry *geom1);
117
126 geom::Geometry* difference(
127 const geom::Geometry *geom0,
128 const geom::Geometry *geom1);
129
138 geom::Geometry* symDifference(
139 const geom::Geometry *geom0,
140 const geom::Geometry *geom1);
141
149 geom::Geometry* buffer(
150 const geom::Geometry *geom0,
151 double distance);
152
164 geom::Geometry* computeResultPrecision(
165 geom::Geometry *result);
166 };
167
168 } // namespace geos.precision
169 } // namespace geos
170
171 #ifdef _MSC_VER
172 #pragma warning(pop)
173 #endif
174
175 #endif // GEOS_PRECISION_COMMONBITSOP_H
176
177 /**********************************************************************
178 * $Log$
179 * Revision 1.3 2006/04/13 23:23:52 strk
180 * fixed bug in binary ops failing to consistently reduce operands.
181 *
182 * Revision 1.2 2006/04/06 14:36:52 strk
183 * Cleanup in geos::precision namespace (leaks plugged, auto_ptr use, ...)
184 *
185 * Revision 1.1 2006/03/23 09:17:19 strk
186 * precision.h header split, minor optimizations
187 *
188 **********************************************************************/