<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Emilio,<br>
I have a partial solution, its not perfect.<br>
Create two new columns called:-<br>
<br>
<ol>
<li><code style="margin: 0px; padding: 0px; border: 0px;
font-style: inherit; font-variant: inherit; font-weight:
inherit; font-stretch: inherit; line-height: inherit;
font-family: Consolas, Menlo, Monaco, "Lucida
Console", "Liberation Mono", "DejaVu Sans
Mono", "Bitstream Vera Sans Mono",
"Courier New", monospace, sans-serif; font-size:
13px; vertical-align: baseline; box-sizing: inherit;
background-color: rgb(239, 240, 241); white-space: inherit;"><b>wnt
</b>with </code><i><b><span style="color: rgb(36, 39, 41); font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(239, 240, 241); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"><i><b>geomToWKT</b></i>( <i><b>$geometry</b></i> )</span></b></i>
<code style="margin: 0px; padding: 0px; border: 0px; font-style:
inherit; font-variant: inherit; font-weight: inherit;
font-stretch: inherit; line-height: inherit; font-family:
Consolas, Menlo, Monaco, "Lucida Console",
"Liberation Mono", "DejaVu Sans Mono",
"Bitstream Vera Sans Mono", "Courier New",
monospace, sans-serif; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; background-color: rgb(239, 240,
241); white-space: inherit;"></code></li>
<li><code style="margin: 0px; padding: 0px; border: 0px;
font-style: inherit; font-variant: inherit; font-weight:
inherit; font-stretch: inherit; line-height: inherit;
font-family: Consolas, Menlo, Monaco, "Lucida
Console", "Liberation Mono", "DejaVu Sans
Mono", "Bitstream Vera Sans Mono",
"Courier New", monospace, sans-serif; font-size:
13px; vertical-align: baseline; box-sizing: inherit;
background-color: rgb(239, 240, 241); white-space: inherit;"><b>disp_label
</b>with values of<b> 0 </b>as default, then update with the
following</code></li>
<li><code style="margin: 0px; padding: 0px; border: 0px;
font-style: inherit; font-variant: inherit; font-weight:
inherit; font-stretch: inherit; line-height: inherit;
font-family: Consolas, Menlo, Monaco, "Lucida
Console", "Liberation Mono", "DejaVu Sans
Mono", "Bitstream Vera Sans Mono",
"Courier New", monospace, sans-serif; font-size:
13px; vertical-align: baseline; box-sizing: inherit;
background-color: rgb(239, 240, 241); white-space: inherit;"><i><b>CASE
WHEN
count("wnt","wnt") > 1
THEN 1
ELSE 0
END</b></i></code></li>
</ol>
What this does is to mark all duplicate geometries as <b>1</b>,
which you can filter.... the only issue so far is to allow for the
first value to be <b>0</b>, and mark the remaining!<br>
You can then use, under<b> Rendering </b>the data defined Show
rendering, with a simple expression like <i><b>"disp_label" = 0 </b></i>you
can only display the unique values!<br>
<br>
Apologies for it only being a partial solution, but maybe someone
can improve on it!<br>
Regards,<br>
<br>
Richard.<br>
<br>
REFERENCED:<br>
<a class="moz-txt-link-freetext" href="https://gis.stackexchange.com/questions/72198/add-wkt-representation-of-the-geometry-as-field-in-qgis">https://gis.stackexchange.com/questions/72198/add-wkt-representation-of-the-geometry-as-field-in-qgis</a><br>
<a class="moz-txt-link-freetext" href="https://gis.stackexchange.com/questions/27822/identifying-duplicate-attributes-in-field-using-qgis">https://gis.stackexchange.com/questions/27822/identifying-duplicate-attributes-in-field-using-qgis</a><br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 25/06/2018 11:28, Emilio Abad Vidal
wrote:<br>
</div>
<blockquote
cite="mid:458683436.529829.1529922512448.JavaMail.root@mail.cesga.es"
type="cite">
<pre wrap="">Thank you very much Stefan,
but that solution means having one more layer. But my intention was to apply it in the labeling layer itself, if possible, of course.
Anyway, thanks for the reply
Emilio
----- Mensaje original -----
De: "Stefan Giese" <a class="moz-txt-link-rfc2396E" href="mailto:Stefan.Giese@wheregroup.com"><Stefan.Giese@wheregroup.com></a>
Para: "Emilio Abad Vidal" <a class="moz-txt-link-rfc2396E" href="mailto:eav@cesga.gal"><eav@cesga.gal></a>, <a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
Enviados: Lunes, 25 de Junio 2018 11:58:03
Asunto: Re: [Qgis-user] Labeled grouping by geometry
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 <a class="moz-txt-link-abbreviated" href="http://www.foss-academy.com">www.foss-academy.com</a> -----------------------------------
WhereGroup GmbH & Co. KG
Schwimmbadstr. 2
79100 Freiburg
Germany
Fon: +49 (0)761 / 519 102 - 61
Fax: +49 (0)761 / 519 102 - 11 <a class="moz-txt-link-abbreviated" href="mailto:stefan.giese@wheregroup.com">stefan.giese@wheregroup.com</a> <a class="moz-txt-link-abbreviated" href="http://www.wheregroup.com">www.wheregroup.com</a> 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
_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<b><u>Richard McDonnell</u></b><br>
<b><small><small><small>GIS Specialist PgD GIS AssocSCSI</small></small></small></b><br>
<b><small>OPW FRM Data Management</small></b><br>
<b><small>52 Stephens Green, Dublin 2.</small></b><br>
<small><small>TEL: 01 6476543</small></small></div>
<br>
<br>
<div class="moz-cite-prefix">On 25/06/2018 11:28, Emilio Abad Vidal
wrote:<br>
</div>
<blockquote
cite="mid:458683436.529829.1529922512448.JavaMail.root@mail.cesga.es"
type="cite">
<pre wrap="">Thank you very much Stefan,
but that solution means having one more layer. But my intention was to apply it in the labeling layer itself, if possible, of course.
Anyway, thanks for the reply
Emilio
----- Mensaje original -----
De: "Stefan Giese" <a class="moz-txt-link-rfc2396E" href="mailto:Stefan.Giese@wheregroup.com"><Stefan.Giese@wheregroup.com></a>
Para: "Emilio Abad Vidal" <a class="moz-txt-link-rfc2396E" href="mailto:eav@cesga.gal"><eav@cesga.gal></a>, <a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
Enviados: Lunes, 25 de Junio 2018 11:58:03
Asunto: Re: [Qgis-user] Labeled grouping by geometry
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 <a class="moz-txt-link-abbreviated" href="http://www.foss-academy.com">www.foss-academy.com</a> -----------------------------------
WhereGroup GmbH & Co. KG
Schwimmbadstr. 2
79100 Freiburg
Germany
Fon: +49 (0)761 / 519 102 - 61
Fax: +49 (0)761 / 519 102 - 11 <a class="moz-txt-link-abbreviated" href="mailto:stefan.giese@wheregroup.com">stefan.giese@wheregroup.com</a> <a class="moz-txt-link-abbreviated" href="http://www.wheregroup.com">www.wheregroup.com</a> 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
_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<b><u>Richard McDonnell</u></b><br>
<b><small><small><small>GIS Specialist PgD GIS AssocSCSI</small></small></small></b><br>
<b><small>OPW FRM Data Management</small></b><br>
<b><small>52 Stephens Green, Dublin 2.</small></b><br>
<small><small>TEL: 01 6476543</small></small></div>
<p>
<a href="http://www.opw.ie/"><img src="http://www.opw.ie/en/media/opw-logo-december-2016.gif" width="405" height="225" /></a>
</p>
<br /><br />Email Disclaimer: <a href="http://www.opw.ie/en/disclaimer/">http://www.opw.ie/en/disclaimer/</a>
</body>
</html>