I have a vector layer with several polyline segments that represent borders of different areas. Each segment is connected to at least two other segments (at its start and its end). Some segments are connected to more then two other segments.
I need to convert those multiple polylines to multiple polygons. (See fig.)
When I use polygonize tool in vector->geometry menu it treats each segment as it's own polygonepolygon and makes garbage. (See fig 2)
Merging all segments into a single one doesn't help. Clipping large polygonepolygon with lines also doesnt'doesn't help in this case since line segments doesn't cross the whole large polygonepolygon.
This problem seems obvious but I'm stuck. I can do it in GRASS with ease, but I have no idea how to do it in QGisQGIS. I don't mind using pythonPython scripting for this.