I am trying to polygonize a line vector layer using "Polygonize" QGIS Geoalgorithm tool in PyQGIS. The polygon geometries are created successfully from the line features. But attributes of the line layer are not adopted to the created polygon layer upon polygonization. However, I have managed to adopt the attribute table's column headers from the input line layer to the polygonized layer using this command.
processing.runandload("qgis:polygonize",line_path,True,False,polygon_path)
How to transfer the attribute values of the input line layer to the created polygon layer during polygonization process using the 'Polygonize' tool?
processing.runandload("qgis:linestopolygons",line_path,polygon_path)– Joseph Nov 10 '16 at 10:48