Bug report #17126
QGIS 2.18.12 dxf export generates one layer per feature
|Affected QGIS version:||2.18.12||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||25025|
QGIS 2.18.12 dxf export generates one layer per feature (cp. screenshot). In QGIS 2.14. we had one dxf layer per QGIS layer, not sure if this behaviour is a bug or caused by users mistake.
#10 Updated by Jochen Schwarze over 2 years ago
- File qgis_dxf_export_21812_config_a.jpg added
- File qgis_dxf_export_21812_config_a_res1.jpg added
- File qgis_dxf_export_21812_config_a_res2.jpg added
- File qgis_dxf_export_21812_config_b.jpg added
- File qgis_dxf_export_21812_config_b_res.jpg added
- File qgis_dxf_export_21812_workaround.jpg added
- File qgis_dxf_export_21812_workaround_config_res.jpg added
- File qgis_dxf_export_21812_workaround_config.jpg added
No, definitly the defaults where kept for the export process.
But having had a closer look at the results, I saw that the issue was not described exact enaugh. The default configuration generates one layer per feature and in addition one layer named after the QGIS layer name containing all features (Case A, cp. screenshots).
This behaviour can be observed for any layers, and the (unique(?)) attribute values used as layer names seem to be chosen accidently (e.g. for layer 'Adressen gesamt' attribute "hausnummer", cp. screenshots)
Selecting an attribute containing the layer name was tested also (here: attribute "gemarkungsnummer"), wich generates one layer for each "gemarkungsnummer", BUT NO layer named after the QGIS layer name (Case B, cp. screenshots).
This observation leads me to a simple workaround for 2.18.x: One might create a virtual field "layer" wich contains the 'layer name' (here: 'Flurstuecke gesamt') as the one and only attribute value and select this attribute for the layer name. This would be ok for one or at the most very few layers, but becomes painful for, say, ten or more.
Since this behaviour cannot be observed in 2.14.x, a Regression = 'Ja' might be justifyable.