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 #ifdef _MSC_VER
00026 #pragma warning(push)
00027 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00028 #endif
00029
00030 namespace geos {
00031 namespace geom {
00032 class Geometry;
00033 }
00034 namespace precision {
00035
00036 }
00037 }
00038
00039 namespace geos {
00040 namespace precision {
00041
00051 class GEOS_DLL CommonBitsOp {
00052
00053 private:
00054
00055 bool returnToOriginalPrecision;
00056
00057 std::auto_ptr<CommonBitsRemover> cbr;
00058
00067 geom::Geometry* removeCommonBits(const geom::Geometry *geom0);
00068
00072 void removeCommonBits(
00073 const geom::Geometry* geom0,
00074 const geom::Geometry* geom1,
00075 std::auto_ptr<geom::Geometry>& rgeom0,
00076 std::auto_ptr<geom::Geometry>& rgeom1);
00077
00078
00079 public:
00080
00084 CommonBitsOp();
00085
00092 CommonBitsOp(bool nReturnToOriginalPrecision);
00093
00102 geom::Geometry* intersection(
00103 const geom::Geometry *geom0,
00104 const geom::Geometry *geom1);
00105
00114 geom::Geometry* Union(
00115 const geom::Geometry *geom0,
00116 const geom::Geometry *geom1);
00117
00126 geom::Geometry* difference(
00127 const geom::Geometry *geom0,
00128 const geom::Geometry *geom1);
00129
00138 geom::Geometry* symDifference(
00139 const geom::Geometry *geom0,
00140 const geom::Geometry *geom1);
00141
00149 geom::Geometry* buffer(
00150 const geom::Geometry *geom0,
00151 double distance);
00152
00164 geom::Geometry* computeResultPrecision(
00165 geom::Geometry *result);
00166 };
00167
00168 }
00169 }
00170
00171 #ifdef _MSC_VER
00172 #pragma warning(pop)
00173 #endif
00174
00175 #endif // GEOS_PRECISION_COMMONBITSOP_H
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188