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

- File List

# CommonBitsOp.h

    00001 /**********************************************************************
    00002  * $Id: CommonBitsOp.h 2556 2009-06-06 22:22:28Z strk $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2005-2006 Refractions Research Inc.
    00008  *
    00009  * This is free software; you can redistribute and/or modify it under
    00010  * the terms of the GNU Lesser General Public Licence as published
    00011  * by the Free Software Foundation.
    00012  * See the COPYING file for more information.
    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> // for auto_ptr composition
    00021
    00022 #include <vector>
    00023 #include <memory>
    00024
    00025 namespace geos {
    00026         namespace geom {
    00027                 class Geometry;
    00028         }
    00029         namespace precision {
    00030                 //class CommonBitsRemover;
    00031         }
    00032 }
    00033
    00034 namespace geos {
    00035 namespace precision { // geos.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 } // namespace geos.precision
    00165 } // namespace geos
    00166
    00167 #endif // GEOS_PRECISION_COMMONBITSOP_H
    00168
    00169 /**********************************************************************
    00170  * $Log$
    00171  * Revision 1.3  2006/04/13 23:23:52  strk
    00172  * fixed bug in binary ops failing to consistently reduce operands.
    00173  *
    00174  * Revision 1.2  2006/04/06 14:36:52  strk
    00175  * Cleanup in geos::precision namespace (leaks plugged, auto_ptr use, ...)
    00176  *
    00177  * Revision 1.1  2006/03/23 09:17:19  strk
    00178  * precision.h header split, minor optimizations
    00179  *
    00180  **********************************************************************/