[QGIS-Developer] QgsVectorFileWriter for GeoJSON

matteo matteo.ghetta at gmail.com
Thu May 23 00:15:34 PDT 2019


Hi Ale,


> https://qgis.org/pyqgis/master/core/QgsJsonExporter.html?highlight=json#module-QgsJsonExporter

didn't know this class, thanks!

The correct way to use it is something like:

gl = QgsJsonExporter(vl, 6)
gl.exportFeatures([i for i in vl.getFeatures()])

and then write the final geojson file "manually"?

Thanks!

Matteo


More information about the QGIS-Developer mailing list