[Qgis-user] Join multiple Linestrings to single Linestring

Fuenfer-Koenigstein.Benjamin at swm.de Fuenfer-Koenigstein.Benjamin at swm.de
Wed Apr 19 23:40:45 PDT 2017


Hi Richard,
thanks again for your reply! I’m really amazed about the active community around QGIS, never experienced that with any other GIS-Software!
‘Merge Selected Features’ is exactly the tool that I initially wanted to use and then realized that it creates multiline-features which causes problems with my linestring db table. Meanwhile I will use QAD plugin that creates linestring or I will work with a local copy as you suggested.
So for me it works quite OK with this workaround, but maybe it would be helpful to have an option to choose between creating multilinestring or linestring when using the ‘Merge’ tool. What do others think? Useful and important enough to open an issue?

Regards
Benni

Von: Richard McDonnell [mailto:richard.mcdonnell at opw.ie]
Gesendet: Mittwoch, 19. April 2017 16:02
An: Fuenfer-Koenigstein.Benjamin G-PRA; qgis-user at lists.osgeo.org
Betreff: Re: AW: [Qgis-user] Join multiple Linestrings to single Linestring

Another option, you could try is using the Advanced Digitising Toolbar under View, Toolbars
Select the lines you want to merge/Join and click Merge Selected Features.
This should also allow you to edit the DB directly from QGIS.
I have not tried it, so your issue with Multi-Lines instead of single linestrings may still apply.
You could still use the above example on the locally saved version of the table though and upload and overwrite the changed dataset.
Sorry I cant be of more help.
Reagrds,

Richard.
On 19/04/2017 14:07, Fuenfer-Koenigstein.Benjamin at swm.de<mailto:Fuenfer-Koenigstein.Benjamin at swm.de> wrote:
Hi Richard,

thanks for your suggestion! I think Dissolve won’t work for me as it’s applied to the whole layer (hope I understood this right). I’m looking for a way to easily merge certain linestrings when I, for example, want to create one geometry by first creating a spline and then a straight line feature. I will try out your workaround with local files. But as the db-source is very large (> 500.000 rows) I’m happy for any other suggestion to solve it directly in QGIS with db-source.

Regards
Benjamin

Von: Richard McDonnell [mailto:richard.mcdonnell at opw.ie]
Gesendet: Mittwoch, 19. April 2017 10:10
An: David J. Bakeman; Fuenfer-Koenigstein.Benjamin G-PRA; qgis-user at lists.osgeo.org<mailto:qgis-user at lists.osgeo.org>
Betreff: Re: [Qgis-user] Join multiple Linestrings to single Linestring

Benjamin,
You could try Dissolve, under Geoprocessing Tools, alternatively you could try saving the dataset locally as a shapefile, edit using either of the methods you outlined below, In relation to saving the edits back to the table as linestring, use the DB Manager tool, select the table you wish to update, tick the options you want, making sure both Replace destination Table (if exists) and Create single-part geometries instead of multi-part This has worked for me in the past, admittedly for polygons, but it should also work for linestrings.

Hope this helps,

Richard.
On 18/04/2017 17:24, David J. Bakeman wrote:

On 04/18/2017 02:17 AM, Fuenfer-Koenigstein.Benjamin at swm.de<mailto:Fuenfer-Koenigstein.Benjamin at swm.de> wrote:

Hi there,



I want to merge multiple linestrings with same start/endpoint to a single linestring (all lines within one layer). As I use a PostGIS source with geometry type linestring, it is important that the new geometry is still linestring and not multilinestring type. "Merge selected features" tool and "JOIN" in QAD-Plugin both create multilinestrings. Has anyone an idea how to directly merge into linestring or how to change geometry type after merging? Thanks for your suggestions!

I'm not sure I completely understand what you want but you could run

multipart to singleparts from the Vector/Geometry Tools menu on the

multilinestring layer to generate a layer with just linestrings.



Best regards



Benjamin

_______________________________________________

Qgis-user mailing list

Qgis-user at lists.osgeo.org<mailto: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<mailto: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

--
Richard McDonnell
GIS Specialist PgD GIS AssocSCSI
OPW FRM Data Management
52 Stephens Green, Dublin 2.
TEL: 01 6476543
[Das Bild                  wurde vom Absender entfernt.]<http://www.opw.ie/>

--
Richard McDonnell
GIS Specialist PgD GIS AssocSCSI
OPW FRM Data Management
52 Stephens Green, Dublin 2.
TEL: 01 6476543
[Das Bild wurde vom Absender entfernt.]<http://www.opw.ie/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20170420/daf4ca34/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 1441 bytes
Desc: image001.jpg
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20170420/daf4ca34/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 1441 bytes
Desc: image002.jpg
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20170420/daf4ca34/attachment-0001.jpg>


More information about the Qgis-user mailing list