[Qgis-user] Copy field definitions from one vector layer to another?

Damien Stephens Damien.Stephens at sandfire.com.au
Wed Oct 21 21:58:49 PDT 2015


You can change the prefix of the column names in 2.10 there is a tick box  in the join dialog. not sure if you can set it to blank, but might work?


From: Qgis-user [mailto:qgis-user-bounces at lists.osgeo.org] On Behalf Of Richard Males
Sent: Thursday, 22 October 2015 11:17 AM
To: Luca Lanteri
Cc: qgis-user
Subject: Re: [Qgis-user] Copy field definitions from one vector layer to another?

The join works without a common field of any kind, which is what I wanted, but unfortunately the field names get prefixed with the join layer.   When I export as shape file from the joined layer, I get field names like 'exported', 'exported_1', etc.   So I don't think the join will work, since what I want to do is preserve field names, just copying them from one layer to another.
Maybe some other approach?   I was hoping for an existing plug-in, but have not found anything in the repository.   Maybe a python script to export field names from existing layer?  I will explore that approach, although I am not very familiar with python scripting for QGIS, see if I can get started.
Thanks.


On Tue, Oct 20, 2015 at 2:21 AM, Luca Lanteri <mescal72 at gmail.com<mailto:mescal72 at gmail.com>> wrote:
why do you need the same geometry type in order to make a join ?
You just need one common field.

Luca

2015-10-19 21:44 GMT+02:00 Joris Hintjens <jorishin at gmail.com<mailto:jorishin at gmail.com>>:
I’d try “join layers” if they are the same geometry type

Joris

Op 17-okt.-2015, om 11:40 heeft Luca Lanteri <mescal72 at gmail.com<mailto:mescal72 at gmail.com>> het volgende geschreven:


You can make a join and then save as layer
I have been looking for a capability (plugin or native QGIS) that will easily copy the field definitions (not the attribute data) from one layer to another layer.   To date I have not found it, I may be missing something obvious.  Any help/advice much appreciated.

I have a layer with a bunch of fields already defined, and another layer with geometry but no additional fields.   I would like to add the field definitions from the first layer to the second layer, and then populate with the appropriate data for that layer.
Thanks.
Dick Males
Cincinnati, Ohio, USA

_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org<mailto:Qgis-user at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org<mailto:Qgis-user at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/qgis-user




______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20151022/2588c164/attachment.html>


More information about the Qgis-user mailing list