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

Using PDAL for point-in-polygon on Entwine Point Tile #2

Closed balazsdukai closed 4 years ago

balazsdukai commented 4 years ago

This adds a node as an alternative to the LASInPolygon node. The node reads an EPT and uses PDAL's internal point-in-polygon query, instead of the current grid-based point-in-polygon test.

I noticed that in some cases with a restricted Classification[6:6], there can be small footprints with 0 point inside. In my test area in Rotterdam residential district, this happend 1/180, with a small shed that is completely covered by a tree. Now, I know Lidar goes through threes, but I assume the points there were misclassified. At least in the EPT there were all class 0. In short, when 0 points are added to the point cloud vector, the CGAL normal estimation function in the subsequent DetectPlanes node extited with a precondition violation (first != beyond). I realized that adjusting the whole flowchart to skip empty polygons is more work than I could do now, I hacked a workaround in a96d9ba .

The new EPT-node prints out the WKT of the polygon to cout in case it hase 0 points.

Ylannl commented 4 years ago

First of thanks again for the this addition! I already merged it excluding the last commit.

About the 'fix' for the empty point clouds, I'm hesitant to merge this. First of all I cannot reproduce the crash. I just tried a polygon that doesn't contain any points, and it does not crash (in fact it also happened many times in the noise3d data). It looks like CGAL is somehow behaving differently for you. In any case a better way to fix this would be to change the DetectPlanes node, since this is where the crash occurs. I will look into this.