Please sign in to comment.
Use an exact test when checking if a curve is closed
Otherwise we get cases where calling isClosed() on a curve with small (<1E-08) differences between the first and last vertex incorrectly returns true. This is an issue when converting rings to GEOS, as it rejects them as being unclosed, yet calling QgsCurve::close on them has no effect... This is the underlying root cause of #36346. In this particular case the calculation of the bounds of the marker symbol (used for the label obstacle calculation) results in a very small rectangle (since it's in map (geographic) units, and the map is very zoomed in) -- so the 1E-08 tolerance here is completely unsuitable and calling close() on the marker bounds had no effect, ultimately resulting in an unclosed ring being passed to GEOS. Fixes #36346
- Loading branch information
Showing with 16 additions and 3 deletions.