00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GEOS_PRECISION_COMMONBITSOP_H
00016 #define GEOS_PRECISION_COMMONBITSOP_H
00017
00018 #include <geos/export.h>
00019 #include <geos/precision/CommonBitsRemover.h>
00020
00021 #include <vector>
00022 #include <memory>
00023
00024 #ifdef _MSC_VER
00025 #pragma warning(push)
00026 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00027 #endif
00028
00029 namespace geos {
00030 namespace geom {
00031 class Geometry;
00032 }
00033 namespace precision {
00034
00035 }
00036 }
00037
00038 namespace geos {
00039 namespace precision {
00040
00050 class GEOS_DLL CommonBitsOp {
00051
00052 private:
00053
00054 bool returnToOriginalPrecision;
00055
00056 std::auto_ptr<CommonBitsRemover> cbr;
00057
00066 geom::Geometry* removeCommonBits(const geom::Geometry *geom0);
00067
00071 void removeCommonBits(
00072 const geom::Geometry* geom0,
00073 const geom::Geometry* geom1,
00074 std::auto_ptr<geom::Geometry>& rgeom0,
00075 std::auto_ptr<geom::Geometry>& rgeom1);
00076
00077
00078 public:
00079
00083 CommonBitsOp();
00084
00091 CommonBitsOp(bool nReturnToOriginalPrecision);
00092
00101 geom::Geometry* intersection(
00102 const geom::Geometry *geom0,
00103 const geom::Geometry *geom1);
00104
00113 geom::Geometry* Union(
00114 const geom::Geometry *geom0,
00115 const geom::Geometry *geom1);
00116
00125 geom::Geometry* difference(
00126 const geom::Geometry *geom0,
00127 const geom::Geometry *geom1);
00128
00137 geom::Geometry* symDifference(
00138 const geom::Geometry *geom0,
00139 const geom::Geometry *geom1);
00140
00148 geom::Geometry* buffer(
00149 const geom::Geometry *geom0,
00150 double distance);
00151
00163 geom::Geometry* computeResultPrecision(
00164 geom::Geometry *result);
00165 };
00166
00167 }
00168 }
00169
00170 #ifdef _MSC_VER
00171 #pragma warning(pop)
00172 #endif
00173
00174 #endif // GEOS_PRECISION_COMMONBITSOP_H