Skip to content

Visibility: Multi fixes

lbartoletti requested to merge fix_visibility_wkt into master

This merge request aims to address several issues with the Visibility algorithm. While it worked fine with Clang on FreeBSD, macOS, and MinGW, it exhibited assertions or crashes on Linux (Ubuntu and Fedora).

The first issue pertained to ensuring the assertion on geometry addition in WkbReader. I added a check to ensure that _geometry is not null.

Secondly, there was an error in the segment order when converting an SFCGAL polygon to a CGAL polygon using to_polygon_with_holes. It required enforcing the orientation. This change rectifies the errors for the testVisibility_SegmentInPolygonHole test.

Lastly, a known issue was related to the WKT output. Due to precision errors, it sometimes resulted in -0.0 instead of 0.0, which could vary across different architectures, systems, and compilers. I added a method to address this and corrected another test.

Merge request reports