6

I am trying to convert a line shapefile into a polygon shapefile using Polygonizer plugin, and when my new polygons are created all the cells in my id field are "Null", although I have clicked "copy table field from line layer". I have tried both Polygonizer 2 and Polygonizer 2.1.

Any idea why the ids from my line layer are not copied to my polygonized shapefile?

3
  • Is this the Polygonizer plugin you are using?
    – PolyGeo
    Dec 9, 2012 at 21:53
  • Yes! Polygonizer plugin. I 've tried it with both versions 2 and 2.1 and still didn't work.
    – marika
    Dec 9, 2012 at 22:40
  • 1
    If you need to convert your lines to polygons, you can try 'Lines to polygons' tool (QGIS standard geoalgorithms) as well. It preserves attributes.
    – Yaroslav
    Jan 26, 2017 at 13:07

1 Answer 1

1

There are two tools that can handle convert line to polygon and both preserve the information in attribute table:

  1. Using Lines to Polygons from Processing toolbox -> QGIS geoalgrithms -> Vector geometry tools -> Lines to Polygons
  2. Using Convert lines to polygons from Processing toolbox -> SAGA -> Vector polygon tools -> Convert lines to polygons

Example:

This is a polyline that has a specific id and a Name fields as you can see below:

enter image description here

Using the first tool from Processing toolbox -> QGIS geoalgrithms -> Vector geometry tools -> Lines to Polygons

enter image description here

Using the second tool from Processing toolbox -> SAGA -> Vector polygon tools -> Convert lines to polygons

enter image description here

You do not need to use the Polygonizer plugin as you can achieve what you want using the above two tools.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.