00001 /********************************************************************** 00002 * $Id: SimpleGeometryPrecisionReducer.h 1820 2006-09-06 16:54:23Z mloskot $ 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_SIMPLEGEOMETRYPRECISIONREDUCER_H 00017 #define GEOS_PRECISION_SIMPLEGEOMETRYPRECISIONREDUCER_H 00018 00019 00020 // Forward declarations 00021 namespace geos { 00022 namespace geom { 00023 class PrecisionModel; 00024 class Geometry; 00025 } 00026 } 00027 00028 namespace geos { 00029 namespace precision { // geos.precision 00030 00044 class SimpleGeometryPrecisionReducer { 00045 00046 private: 00047 00048 const geom::PrecisionModel *newPrecisionModel; 00049 00050 bool removeCollapsed; 00051 00052 //bool changePrecisionModel; 00053 00054 public: 00055 00056 SimpleGeometryPrecisionReducer(const geom::PrecisionModel *pm); 00057 00066 void setRemoveCollapsedComponents(bool nRemoveCollapsed); 00067 00068 /* 00069 * Sets whether the {@link PrecisionModel} of the new reduced Geometry 00070 * will be changed to be the {@link PrecisionModel} supplied to 00071 * specify the reduction. The default is to not change the 00072 * precision model 00073 * 00074 * @param changePrecisionModel if <code>true</code> the precision 00075 * model of the created Geometry will be the 00076 * the precisionModel supplied in the constructor. 00077 */ 00078 //void setChangePrecisionModel(bool nChangePrecisionModel); 00079 00080 const geom::PrecisionModel* getPrecisionModel(); 00081 00082 bool getRemoveCollapsed(); 00083 geom::Geometry* reduce(const geom::Geometry *geom); 00084 }; 00085 00086 } // namespace geos.precision 00087 } // namespace geos 00088 00089 #endif // GEOS_PRECISION_SIMPLEGEOMETRYPRECISIONREDUCER_H 00090 00091 /********************************************************************** 00092 * $Log$ 00093 * Revision 1.2 2006/04/03 13:56:55 strk 00094 * Made externally-owned PrecisionModel const 00095 * 00096 * Revision 1.1 2006/03/23 09:17:19 strk 00097 * precision.h header split, minor optimizations 00098 * 00099 **********************************************************************/