Save an empty layer to GeoJSON drop all fields #26260
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Data Provider
Related to specific vector, raster or mesh data providers
Author Name: Etienne Trimaille (@Gustry)
Original Redmine Issue: 18370
Affected QGIS version: 3.1(master)
Redmine category:data_provider
I could replicate this issue on both QGIS 2.18 and 3.1, with Python script and using the UI.
If I create an empty memory layer and if I save to geojson, then all my fields are lost:
The python code shows the problem:
It will output on both QGIS 2 and 3:
I hope it's not some layer/dataset creation option. I looked in the OGR documentation too. Nothing I could notice.
This is an issue because I expect to have the same attribute table.
The text was updated successfully, but these errors were encountered: