Hi,
You should run the following considering you selected a vector layer
from qgis.core import QgsVectorFileWriter
layer = iface.activeLayer()
QgsVectorFileWriter.writeAsVectorFormat(layer, '/tmp/out.geojson', 'utf-8',
layer.crs(), 'GeoJSON', layerOptions=['RFC7946=True'])
Regards
Thomas Grati
Hello,
I'm using Qgis 3.14.16 with WIndows 10
I'm trying in a python script to export a layer in geojSon with the
option RFC7946=True
It works well with the gui, but I don't know how to write it in a python
script
Is there someone who could send me a sample of code which do this
Thanks
Pa