Directional geometric primitive segmentation and topological reconstruction for fine-grained roof structure extraction