<div dir="ltr">Hi,<div><br></div><div>I'm experiencing an issue that the first and the last segment is missing when using offestCurve on a closed linestring. It is relatively easy to reproduce that issue, using the following code sample which results a geometry of 3 points instead of 5:</div><div><br></div><div>// Create the LINESTRING<br>GEOSCoordSequence* sequence = GEOSCoordSeq_create_r(handle, 5, 2);<br>GEOSCoordSeq_setXY_r(handle, sequence, 0, 252.68873929007674, 411.71254313074394);<br>GEOSCoordSeq_setXY_r(handle, sequence, 1, 505.82866421616694, 411.71254313074394);<br>GEOSCoordSeq_setXY_r(handle, sequence, 2, 505.82866421616694, 158.57261820465371);<br>GEOSCoordSeq_setXY_r(handle, sequence, 3, 252.68873929007674, 158.57261820465371);<br>GEOSCoordSeq_setXY_r(handle, sequence, 4, 252.68873929007674, 411.71254313074394);  // Closing the LINESTRING<br><br>GEOSGeometry* line = GEOSGeom_createLineString_r(handle, sequence);<br><br>// Set the offset and other parameters<br>double offset = 5.0;<br>GEOSBufJoinStyles joinStyle = GEOSBUF_JOIN_MITRE;<br>double mitreLimit = fabs(offset * 1.5);<br><br>// Apply the offset curve<br>GEOSGeometry* offsetResult = GEOSOffsetCurve_r(handle, line, offset, 4, joinStyle, mitreLimit);<br></div><div><br></div><div>I've checked that this behavior was introduced in 3.11.0 (3.10.6 was OK) and it still exists in the latest stable branch.</div><div>Similar issue has already been reported against qgis in the following ticket:</div><div><br></div><div><a href="https://github.com/qgis/QGIS/issues/51583">https://github.com/qgis/QGIS/issues/51583</a><br></div><div><br></div><div>Do we have a workaround or plans to fix this issue?</div><div><br></div><div>Thanks,</div><div><br></div><div>Tamas</div><div><br></div><div><br></div></div>