Skip to main content
1 of 5

Qgis3 How to polygonize LineString Features to Polygon Features and keep the Attribute table values

i am trying to create a circular raster in Qgis3.8.3-Zanzibar with the python console. I am able to make it with LineStrings (combine of Polyline and Circular String) and fill each feature with attributes (see picture).RadarRaster

Attribue table of LineString Layer

Now I want to make each feature to a polygon. Therefore I use the function polygonize (Processing Toolbox --> QGIS Geoalgorithms --> Polygonize). I check the "Keep table structure of layer" option and run the process:

Processing algorithm… Algorithm 'Polygonize' starting… Input parameters: { 'INPUT' : 'LineString?crs=epsg:25832&field=id:integer&field=name:string(20)&field=WINKEL:integer&field=METER:integer&field=KILOMETER:Double&field=AREA_METER:Double&index=yes&uid={feb5e364-45f5-4e97-aeee-7ab4cd65bbf3}', 'KEEP_FIELDS' : True, 'OUTPUT' : 'TEMPORARY_OUTPUT' } Processing lines… Noding lines… Polygonizing… Saving polygons… Execution completed in 0.98 seconds Results: {'OUTPUT': 'Polygons_from_lines_9dcc9791_d9e2_4399_b9ff_3bf1c61f6e1c'} Loading resulting layers Algorithm 'Polygonize' finished

Ok it works....all features are now polygon. But alle the attribute table values are gone.

polygon attribute table no values

How do I keep the attribute values. And why did the polygonize function give all the new polygon features random id's. It is impossible for me to give them new values because there are distributed random, not like before when I add the as LineStrings.

I am hoping you are understand what my problem is and that you can help me.

Thank You and best regards,
Sebastian