Can't transform lines to polygons
So... I'm answering my own question. I'm just selecting my answer because it's not using GRASS and, at the moment, I'm trying to stick to the QGIS environment (in the future, I'm almost sure I'll need to invest more in GRASS).
So... this is what I've did:
- I selected the select attributes by rectangle
- selected my whole layer
- Opened the layer attribute table, where I found this:
- Then turned into edit mode, inverted the selection, deleted those 2 attributes (ID 104 and ID 106), saved and exited edit mode. The table became:
- After that... just needed to run Poligonize:
- And... here it is, the final result:
Resuming... it was not the "save as" that corrected the layer. It was those 2 attributes (some kind of trash from previous handling of the shapefile) that were corrupting the file logic, after removing them Polygonize was able to run without any kind of trouble.
Cleaning the original shapefile using GRASS v.clean snap from the Processing Toolkit (using a Threshold of 10) produces a line shapefile that can be polygonised using 'Polygonize' also from the Processing Toolkit.
I too faced similar problem when trying to polygonize lines using the "Lines to Polygons" tool. Obtained sliver polygons similar to the above images. But when I tried polygonization using "Polygonize" tool from the Processing Toolbox, got the exact desired polygons. Refer this link