0

I would like to polygonyze my layer. It includes between 6-20 separate lines.

I was following the hint here:

Converting line to polygon using QGIS

but at some point I've got an error:

Feature (2) has invalid geometry and has been skipped. Please fix the geometry or change the Processing setting to the "Ignore invalid input features" option.

Next, I've selected "Ignore invalid input features" option in the Toolbox options, like shown here:

Ignoring invalid input features with Intersection tool in QGIS?

but the problem comes back, unfortunately.

See below my problem:

enter image description here

How can I sort this out?

Maybe is it some tool, which would build the polygon from any lines available in the vicinity instead of only enclosed ones?

Geographos
  • 4,087
  • 2
  • 27
  • 88
  • 1
    Are the upper (northern) and lower (southern) line connected - or just like a kind of parallel lines? Can you provide sample data? – Babel May 17 '21 at 15:38
  • 1
    No, they aren't. As you can see, only the "ovals" are enclosed. The upper (northern) and Lower (southern) line just sticks to these "ovals". That's why it doesn't work I guess. – Geographos May 17 '21 at 15:43
  • Merge the lines (upper, lower + ovals), than you should be able to create a polygon. From this, you can clip the ovals. – Babel May 17 '21 at 15:53
  • it would generate an invalid polygon – Ian Turton May 17 '21 at 16:14
  • Is there any option to ake polygon for surrounding lines? Or all of them must be enclosed, like in these ovals? – Geographos May 17 '21 at 16:37

1 Answers1

1

I found the reason for it.

Since you import your linear layer to the QGIS, you don't need to remove all unnecessary lines. Instead of it, let polygonize your layer with all linear features. Next, you will have some chopped polygons, which in turn can be merged by using Edit -> Merge selected features. Obviously, you need to select them first.

enter image description here

Geographos
  • 4,087
  • 2
  • 27
  • 88