GEOS
3.4.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2005-2006 Refractions Research Inc. 00007 * 00008 * This is free software; you can redistribute and/or modify it under 00009 * the terms of the GNU Lesser General Public Licence as published 00010 * by the Free Software Foundation. 00011 * See the COPYING file for more information. 00012 * 00013 **********************************************************************/ 00014 00015 #ifndef GEOS_PRECISION_COMMONBITSREMOVER_H 00016 #define GEOS_PRECISION_COMMONBITSREMOVER_H 00017 00018 #include <geos/export.h> 00019 #include <geos/geom/Coordinate.h> // for composition 00020 00021 // Forward declarations 00022 namespace geos { 00023 namespace geom { 00024 class Geometry; 00025 } 00026 namespace precision { 00027 class CommonBitsRemover; 00028 class CommonCoordinateFilter; 00029 } 00030 } 00031 00032 namespace geos { 00033 namespace precision { // geos.precision 00034 00040 class GEOS_DLL CommonBitsRemover { 00041 00042 private: 00043 00044 geom::Coordinate commonCoord; 00045 00046 CommonCoordinateFilter *ccFilter; 00047 00048 public: 00049 00050 CommonBitsRemover(); 00051 00052 ~CommonBitsRemover(); 00053 00062 void add(const geom::Geometry *geom); 00063 00067 geom::Coordinate& getCommonCoordinate(); 00068 00077 geom::Geometry* removeCommonBits(geom::Geometry *geom); 00078 00086 geom::Geometry* addCommonBits(geom::Geometry *geom); 00087 }; 00088 00089 } // namespace geos.precision 00090 } // namespace geos 00091 00092 #endif // GEOS_PRECISION_COMMONBITSREMOVER_H