For context, I’d like to derive room polygons from linestring geometries in DXF files.
There is nothing in the data that says “these linestrings form this room”. There are however points for the centers of each room. With an algorithm to find the closest set of lines surrounding a point, I can then use these lines to create an approximate room polygon. In the picture below, an example polygon is represented by the dashed line.