[geos-commits] r3437 - trunk/include/geos/operation/buffer
svn_geos at osgeo.org
svn_geos at osgeo.org
Wed Jul 20 05:03:35 EDT 2011
Author: strk
Date: 2011-07-20 02:03:35 -0700 (Wed, 20 Jul 2011)
New Revision: 3437
Modified:
trunk/include/geos/operation/buffer/BufferOp.h
Log:
Add setSingleSided interface to BufferOp-accessible BufferParam setters
Patch by Tai Meng <tai.meng at safe.com>
Modified: trunk/include/geos/operation/buffer/BufferOp.h
===================================================================
--- trunk/include/geos/operation/buffer/BufferOp.h 2011-07-20 08:46:43 UTC (rev 3436)
+++ trunk/include/geos/operation/buffer/BufferOp.h 2011-07-20 09:03:35 UTC (rev 3437)
@@ -211,6 +211,28 @@
inline void setQuadrantSegments(int nQuadrantSegments);
/**
+ * Sets whether the computed buffer should be single-sided.
+ *
+ * A single-sided buffer is constructed on only one side
+ * of each input line.
+ *
+ * The side used is determined by the sign of the buffer distance:
+ * - a positive distance indicates the left-hand side
+ * - a negative distance indicates the right-hand side
+ *
+ * The single-sided buffer of point geometries is
+ * the same as the regular buffer.
+ *
+ * The End Cap Style for single-sided buffers is
+ * always ignored,
+ * and forced to the equivalent of <tt>CAP_FLAT</tt>.
+ *
+ * @param isSingleSided true if a single-sided buffer
+ * should be constructed
+ */
+ inline void setSingleSided(bool isSingleSided);
+
+ /**
* Returns the buffer computed for a geometry for a given buffer
* distance.
*
@@ -235,6 +257,12 @@
bufParams.setEndCapStyle((BufferParameters::EndCapStyle)s);
}
+void
+BufferOp::setSingleSided(bool isSingleSided)
+{
+ bufParams.setSingleSided(isSingleSided);
+}
+
} // namespace geos::operation::buffer
} // namespace geos::operation
} // namespace geos
More information about the geos-commits
mailing list