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