Bug report #17126

QGIS 2.18.12 dxf export generates one layer per feature

Added by Jochen Schwarze almost 7 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:DXF export
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

Description

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.

qgis_dxf_export_21812.jpg - qgis 2.18.12 dxf export result (964 KB) Jochen Schwarze, 2017-09-12 12:44 PM

qgis_dxf_export_21418.jpg - qgis 2.14.18 dxf export result (1.04 MB) Jochen Schwarze, 2017-09-12 12:45 PM

qgis_dxf_export_21812_config_a_res1.jpg - default config (A) result #1 (213 KB) Jochen Schwarze, 2017-09-13 12:53 PM

qgis_dxf_export_21812_config_a.jpg - default config (A) (141 KB) Jochen Schwarze, 2017-09-13 12:53 PM

qgis_dxf_export_21812_config_b.jpg - config with attribute as layer name (B) (141 KB) Jochen Schwarze, 2017-09-13 12:53 PM

qgis_dxf_export_21812_config_a_res2.jpg - default config (A) result #2 (116 KB) Jochen Schwarze, 2017-09-13 12:53 PM

qgis_dxf_export_21812_workaround.jpg - workaround (virtual field) (112 KB) Jochen Schwarze, 2017-09-13 12:53 PM

qgis_dxf_export_21812_workaround_config.jpg - workaround config. (attribute = 'layer') (145 KB) Jochen Schwarze, 2017-09-13 12:54 PM

qgis_dxf_export_21812_config_b_res.jpg - config with attribute as layer name (B) result (383 KB) Jochen Schwarze, 2017-09-13 12:54 PM

qgis_dxf_export_21812_workaround_config_res.jpg - workaround result (143 KB) Jochen Schwarze, 2017-09-13 12:54 PM


Related issues

Related to QGIS Application - Bug report #16762: DXF Export... does not work as in pre 2.18.9 Closed 2017-06-27
Duplicates QGIS Application - Bug report #16319: DXF Export generates many numbered layers (1 layer for ea... Closed 2017-03-08

Associated revisions

Revision 15bc5ed0
Added by Jürgen Fischer almost 7 years ago

dxf export: fix layer assignment (fixes #17126; followup 92091c536b)

Revision c81adf8f
Added by Jürgen Fischer almost 7 years ago

dxf export: fix layer assignment (fixes #17126; followup 6292c6ae1)

History

#1 Updated by Giovanni Manghi almost 7 years ago

  • Affected QGIS version set to 2.18.12
  • Project changed from QGIS Redmine (QGIS bug tracker) to QGIS Application
  • Category changed from Any to DXF export
  • Easy fix? set to No
  • Crashes QGIS or corrupts data set to No
  • Regression? set to No

#2 Updated by Jochen Schwarze almost 7 years ago

Should have set "Regression?" to 'yes' because worked fine in previous version.

#3 Updated by Giovanni Manghi almost 7 years ago

  • Priority changed from Normal to High
  • Regression? changed from No to Yes

#4 Updated by Jürgen Fischer almost 7 years ago

Which field did you select for the layer name?

#5 Updated by Giovanni Manghi almost 7 years ago

  • Status changed from Open to Feedback

#6 Updated by Jürgen Fischer almost 7 years ago

  • Priority changed from High to Normal

#7 Updated by Giovanni Manghi almost 7 years ago

Hi Jurgen, I have no time to test this today, not a regression?

#8 Updated by Jürgen Fischer almost 7 years ago

Giovanni Manghi wrote:

Hi Jurgen, I have no time to test this today, not a regression?

I suspect that the gml_id was selected as attribute definining the dxf layer name (instead of keeping the default - which is the qgis layer name)

#9 Updated by Giovanni Manghi almost 7 years ago

  • Regression? changed from Yes to No

#10 Updated by Jochen Schwarze almost 7 years ago

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.

#11 Updated by Jürgen Fischer almost 7 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

#12 Updated by Jürgen Fischer almost 7 years ago

#13 Updated by Jürgen Fischer over 6 years ago

  • Duplicates Bug report #16319: DXF Export generates many numbered layers (1 layer for each feature) added

Also available in: Atom PDF