[Qgis-user] How to merge layers without a work-around?

Árni Geirsson arni at alta.is
Fri Mar 10 00:26:34 PST 2017


I have used a virtual layer to do the following
select * from layer1
union all
select * from layer2

The resulting virtual layer can then be saved.
This gives an opportunity to harmonize attribute names if necessary, by
replacing the * with individual attributes.

Arni


Árni Geirsson
*Alta ehf* // +354 582 5000 // +354 897 9549

On 10 March 2017 at 05:18, damien stephens <damien.stephens at gmail.com>
wrote:

> I would copy one and paste as a new layer eg shapefile, then select the
> next set of data and page to my new shape file.
> Not scratch layers, but it works.
> Cheers
>
>
> On Fri, 10 Mar 2017, 04:33 Tobias Wendorff <tobias.wendorff at tu-dortmund.de>
> wrote:
>
>> Hi there.
>>
>> Is there any way to merge two scratch layers? Even big ones...
>> I've tried the one in SAGA, in MMQGIS and the native QGIS one.
>>
>> SAGA's executable crashed after 5 minutes, but QGIS was alive.
>> MMQGIS also throw out an error after some minutes of processing.
>>
>> And the native one tells me:
>> "global name 'dataobjects' is not defined See log for more details"
>> Actually, this sems to be a bug in "Merge.py":
>> "layer = dataobjects.getObjectFromUri(layerSource)"
>>
>> I've ended up selection all elements and copy & paste them to a
>> new layer. But there's also an unexpected event: even when you've
>> selected all the elements in two layers, you can copy the layer,
>> which is currently selected in the layers panel. Is this a bug?
>>
>> How do you merge layers? Sure, there's ogr2ogr - but I want
>> to use QGIS. Of course, I'm merging layers with the same
>> geometry only (f.e. points).
>>
>> Best regards,
>> Tobias
>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20170310/4c4c5ed7/attachment.html>


More information about the Qgis-user mailing list