[Qgis-user] Labeled grouping by geometry

Stefan Giese Stefan.Giese at wheregroup.com
Mon Jun 25 02:58:03 PDT 2018


Hola Emilio,

you can try do generate a new virtual Layer with a union of the geometry 
grouped by the geometry itself and use this one for labeling. The 
following statement will define your new virtual layer:

*/select mylayer.labelfield, st_union(/**/mylayer/**/.geometry) from 
/**/mylayer/**/group by /**/mylayer/**/.geometry/*

The result will be a new layer with no double geometries.

Hope this helps

Best regards

Stefan

Mit freundlichen Grüßen
Stefan Giese
Projektleiter/Consultant
-----------------------------------
Aufwind durch Wissen!
Qualifizierte Open-Source-Schulungen
bei der www.foss-academy.com
-----------------------------------
WhereGroup GmbH & Co. KG
Schwimmbadstr. 2
79100 Freiburg
Germany

Fon: +49 (0)761 / 519 102 - 61
Fax: +49 (0)761 / 519 102 - 11

stefan.giese at wheregroup.com
www.wheregroup.com
Amtsgericht Bonn, HRA 6788
-------------------------------
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
-------------------------------

Am 25.06.2018 um 10:32 schrieb Emilio Abad Vidal:
> Hello everyone,
>
> I have a problem and I can not find the solution. I would appreciate any help.
>
> I have a layer of lines that represent stretches of electrical conductors. These sections have a point of origin and an end point. One of its attributes is the length of each of the sections.
>
> Some of these sections have the same point of origin and the same ending point, so when I label these lines by their length, this repeated data appears for each of the lines and the data is repeated.
>
> I need that when labeling the layer, only the label of one of the lines appears, that is, that the distance between each of the points is represented. I have tried to do it by means of a labeling based on rules, and some function of aggregation by geometry, so that only one label is shown for each space between points.
>
> I do not get it, so I would appreciate any help to solve this problem.
>
> Thank you very much in advance and greetings
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180625/8c748877/attachment.html>


More information about the Qgis-user mailing list