Feature request #13138

Name creation for DXF layer based on certain DB fields

Added by Joerg Hippe over 8 years ago. Updated over 8 years ago.

Status:Closed
Priority:Normal
Assignee:Jürgen Fischer
Category:Vectors
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:21202

Description

When exporting vector layers, it should be available as an option to allow the creation of layername based on certain DB fields.
This is useful when within a layer are different classified information, but which should each represent a separate layer in the DXF.

dxf_export_layer_by_attribute.png - Screenshot DXF layer export by attribute name (46.7 KB) Andreas Neumann, 2015-07-22 11:26 PM

new_dxf_export_dialog.png - Improved DXF Export layer dialog (49.4 KB) Andreas Neumann, 2015-07-23 11:20 PM

Associated revisions

Revision b26d9ac8
Added by Jürgen Fischer over 8 years ago

add column headers and tooltips to dxf export dialog (fixes #13138)

History

#1 Updated by Andreas Neumann over 8 years ago

Hi Joerg,

This is already possible. When you use the "Project" -> "DXF Export" function you can choose an attribute in each layer to be exported. This attribute is then used to determine the DXF layer.

Please note that DXF is a special format, not a regular GIS format. That's why there is the separate DXF export functionality.

Hope this satisfies you needs? If yes, please close the bug.

Andreas

#2 Updated by Joerg Hippe over 8 years ago

Hi Andreas,
I have expressed myself probably a bit inconvenient. What I mean is this:
I have for example a layer with data of the classified road network of Saxony. About the database field "class" distinction is in highway, national highway, state highway and county road. For further processing, I need a DXF where each road class should return exactly one DXF layer.
Currently, I appeals myself as follows:
I have the plugin "Split Layers By Field" installed. So that I separate the layers in QGIS according to my wishes. Then I can via Project -> DXF Export to export the resulting layer. Then I have to delete it, because I have only needed temporarily these layers in QGIS.
Very practical would it be if the functionality of the plugin at DXF export would directly usable.
This is surely also useful for other types of data to be exported.

Jörg

the same in german:

Hallo Andreas,
ich habe mich wahrscheinlich etwas ungünstig ausgedrückt. Was ich meine ist folgendes:
Ich habe beispielsweise EINEN Layer mit Daten des klassifizierten Straßennetzes von Sachsen. Über das Datenbankfeld "KLASSE" wird unterschieden in Autobahn, Bundesstraße, Staatsstraße und Kreisstraße. Zur Weiterverarbeitung benötige ich eine DXF, wo jede Straßenklasse genau ein DXF-Layer ergeben soll.
Momentan behelfe ich mir folgendermaßen:
Ich habe das Plugin "Split Layers By Field" installiert. Damit trenne ich den Layer in QGIS entsprechend meinen Wünschen auf. Dann kann ich per Projekt -> DXF-Export die entstandenen Layer exportieren. Anschließend muss ich diese Layer in QGIS wieder löschen, da ich sie nur temporär benötigt habe.
Sehr praktisch wäre es, wenn die Funktionalität des Plugins beim DXF-Export direkt nutzbar wäre.
Dies ist sicherlich auch für andere zu exportierende Datenarten sinnvoll.

Jörg

#3 Updated by Andreas Neumann over 8 years ago

Hi Jörg,

But this is exactly what the "Project" -> "DXF Export" functionality does - see my uploaded screenshot. Next to each layer there is a drop-down list box where you can select an attribute that determines the DXF layer name in the exported file. By default, it shows the QGIS layer name.

I agree, the UI is not quite clear. It doesn't really tell you what this checkbox does. But it does what you want. Please try it.

For the next version we should improve the UI a bit ...

Andreas

#4 Updated by Andreas Neumann over 8 years ago

In my last mail it should read "It doesn't really tell you what this selection list does."

#5 Updated by Joerg Hippe over 8 years ago

Hi Andreas,

That's perfect, so I need that. I had not found before. This function is really hidden. Thanks a lot for your help.

Jörg

#6 Updated by Andreas Neumann over 8 years ago

  • Assignee set to Jürgen Fischer

Hi Jürgen,

For the DXF export - could you please add some text above the layer tree widget in the UI explaining that the selection list next to the layer tree is meant for the selection of a "layer attribute column"?

This is really not obvious to the average user - see this bug report and the comments above.

After that small UI improvement, we can of course close this bug.

Thanks a lot for doing this small improvement. You can report this effort on the Uster support pool.

Andreas

#7 Updated by Andreas Neumann over 8 years ago

Or maybe the layer tree widget could have a header line, like "Layer", "Layer attribute column"

#8 Updated by Jürgen Fischer over 8 years ago

  • Status changed from Open to Closed

#9 Updated by Andreas Neumann over 8 years ago

Jörg,

For your interest - attached is a screenshot how the improved DXF export dialog now looks like - it contains a new header line with "Layer" and "Output layer attribute" and a tooltip explaining what it does: "Attribute containing the name of the destination layer in the DXF output".

I hope this is now sufficiently clear.

Thanks to Jürgen for fixing it!

#10 Updated by Joerg Hippe over 8 years ago

Hi Andreas, hi Jürgen,

thats perfect. So everyone sees immediately that this is at all possible, and also how it works.

many thanks
Jörg

#11 Updated by Jürgen Fischer over 8 years ago

Joerg Hippe wrote:

thats perfect. So everyone sees immediately that this is at all possible, and also how it works.

In German it's "Ausgabelayerattribut" and "Attribut, das den Namen des Ziellayers in der DXF-Ausgabe enthält."

many thanks

np

Also available in: Atom PDF