00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GEOS_PRECISION_COMMONBITSOP_H
00017 #define GEOS_PRECISION_COMMONBITSOP_H
00018
00019 #include <geos/export.h>
00020 #include <geos/precision/CommonBitsRemover.h>
00021
00022 #include <vector>
00023 #include <memory>
00024
00025 namespace geos {
00026 namespace geom {
00027 class Geometry;
00028 }
00029 namespace precision {
00030
00031 }
00032 }
00033
00034 namespace geos {
00035 namespace precision {
00036
00046 class GEOS_DLL CommonBitsOp {
00047
00048 private:
00049
00050 bool returnToOriginalPrecision;
00051
00052 std::auto_ptr<CommonBitsRemover> cbr;
00053
00062 geom::Geometry* removeCommonBits(const geom::Geometry *geom0);
00063
00067 void removeCommonBits(
00068 const geom::Geometry* geom0,
00069 const geom::Geometry* geom1,
00070 std::auto_ptr<geom::Geometry>& rgeom0,
00071 std::auto_ptr<geom::Geometry>& rgeom1);
00072
00073
00074 public:
00075
00079 CommonBitsOp();
00080
00087 CommonBitsOp(bool nReturnToOriginalPrecision);
00088
00097 geom::Geometry* intersection(
00098 const geom::Geometry *geom0,
00099 const geom::Geometry *geom1);
00100
00109 geom::Geometry* Union(
00110 const geom::Geometry *geom0,
00111 const geom::Geometry *geom1);
00112
00121 geom::Geometry* difference(
00122 const geom::Geometry *geom0,
00123 const geom::Geometry *geom1);
00124
00133 geom::Geometry* symDifference(
00134 const geom::Geometry *geom0,
00135 const geom::Geometry *geom1);
00136
00144 geom::Geometry* buffer(
00145 const geom::Geometry *geom0,
00146 double distance);
00147
00159 geom::Geometry* computeResultPrecision(
00160 geom::Geometry *result);
00161 };
00162
00163
00164 }
00165 }
00166
00167 #endif // GEOS_PRECISION_COMMONBITSOP_H
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180