Roof connectivity


I am currently trying to identify connected roof planes (that come from the same surfaces: twee-onder-een-kapwoning, rijtjeshuis).

From the (amazing!) BAG dataset, it has been convenient to to find the neighbourhood of each building, then identify all roof surfaces and calculate their azimuth. Sorry if my question is naive (I have no background in Geometrics) but here it is. I can think of checking if two roof surfaces from adjacent building share the same azimuth and intersect with each other, and maybe put a lower bound on the surface area, but I doubt that is enough. Besides, the python shapely intersection method that I use proves to be rather unstable with 3d points, as the shared edges don’t always align perfectly.

It would be hugely appreciated if anyone care to give some suggestions and pointers on this matter! Thank you in advance, cheers.