[geos-commits] r3734 - trunk/src/operation/buffer

svn_geos at osgeo.org svn_geos at osgeo.org
Wed Dec 5 01:06:53 PST 2012


Author: strk
Date: 2012-12-05 01:06:53 -0800 (Wed, 05 Dec 2012)
New Revision: 3734

Modified:
   trunk/src/operation/buffer/BufferOp.cpp
Log:
Add note about rounding in fixed precision buffer op (#605)

Modified: trunk/src/operation/buffer/BufferOp.cpp
===================================================================
--- trunk/src/operation/buffer/BufferOp.cpp	2012-12-05 07:56:41 UTC (rev 3733)
+++ trunk/src/operation/buffer/BufferOp.cpp	2012-12-05 09:06:53 UTC (rev 3734)
@@ -240,9 +240,19 @@
 	bufBuilder.setNoder(&noder);
 
 	// Reduce precision of the input geometry
-	// TODO: perhaps this should be done within BufferBuilder,
-	//       after (or as part of) input simplification ?
-	// NOTE: this reduction is not in JTS (yet)
+	//
+	// NOTE: this reduction is not in JTS and should supposedly 
+	//       not be needed because the PrecisionModel we pass
+	//       to the BufferBuilder above (with setWorkingPrecisionModel)
+	//       should be used to round coordinates emitted by the
+	//       OffsetCurveBuilder, thus effectively producing a fully
+	//       rounded input to the noder.
+	//       Nonetheless the amount of scrambling done by rounding here
+	//       is known to fix at least one case in which MCIndexNoder
+	//       would fail: http://trac.osgeo.org/geos/ticket/605
+	//
+	// TODO: follow JTS in MCIndexSnapRounder usage
+	//
 	const Geometry *workGeom = argGeom;
 	const PrecisionModel& argPM = *(argGeom->getFactory()->getPrecisionModel());
 	std::auto_ptr<Geometry> fixedGeom;



More information about the geos-commits mailing list