geoflow3d / gfp-building-reconstruction

Geoflow plugin for building LoD2 reconstruction from a point cloud
GNU Affero General Public License v3.0
14 stars 4 forks source link

Geometric errors in reconstructed mesh #14

Open Ylannl opened 4 years ago

Ylannl commented 4 years ago
  1. Spikes. See image below. Happens in both LoD1.3 and LoD2.2 output.
  2. Holes and missing faces

IMAGE 2020-05-07 11:41:31

Ylannl commented 4 years ago

This problem occurs because co-linear and intersecting segments are inserted in the arrangement for the roof partition. Such segments can lead to degenerate polygons later on.

PR #16 should reduce this problem. The main change that supports this reduction is the omission of footprint segments in the line regularisation step. Most spiked were originating from footprint segments.

Not 100% if sure this issue is completely fixed, so leaving it open for now.

Ylannl commented 4 years ago

See also #18

Ylannl commented 4 years ago

this issue still persists in rare case where a detected line (usually an intersection of planes) happens to be (nearly) exactly co-linear with a line segment from the footprint. A related problem is the duplication of vertices (they are topologically/combinatorically different but geometrically almost exactly the same). That leads to other types of errors, such as missing faces and topological holes.

The two possible approaches to fix this are 1) fix such issues afterwards by post processing the arrangement after inserting all the lines or 2) prevent such issues to appear in the arrangement in the first place by very carefully inserting the lines and checking for (near) colinearity and (near) point duplicates prior to insertion and then insert the line in such a way that no duplicate geometries are created.

I already have some limited success with 1) for detecting most duplicate vertices. However, I believe it preferred, and more elegant to proceed with approach 2). Mainly because 1) brings the risk of introducing other errors/ or missing some specific cases. 1) on the other hand seems to be a more fundamental and ultimately simpler fix.

Ylannl commented 4 years ago

I have improved the construction of the initial footprint arrangement, following option 2) from my previous comment. See 0a0fb483c8f8b7eea688d902a02964c9f1231d29 (prevention of duplicate vertices) and 2cdb74ed2178ed2fe85b07ee5bcdd0d3008884d6 (preventing insertion of (nearly) overlapping and (nearly) co-linear line segments).

Based on preliminary tests it seems this fixes ~50% of the invalids without introducing new issues.

This should also fix the remaining spikes.