[GIS] Table output from QGIS graphical modeler

attribute-tableqgisqgis-modeler

I have developed my own model, which processes input vector layer. The final output is vector layer that contains many attribute fields, and of course, also the geometry, but I need a simpler output – geometry and most of those fields are unnecessary.

With this model, how can I get a simple table output with selected attribute fields of the output layer?

Best Answer

You could use the GDAL Ogr 2 Ogr algorithm to convert the vector file to a CSV, and then run that CSV through the QGIS algorithm "Delete column" to remove the geometry column (and any others you don't need). I haven't tried it, but it might work.

[Edit] Okey, did a quick test. The GDAL convert to CSV works fine in model builder, but it seems like the QGIS delete column operation can't handle non spatial data, so you need to remove your columns with that before you convert it to CSV. However, the convert to CSV operation does not create a geometry column in the CSV file, so that shouldn't be a problem.

Related Question