<div dir="ltr"><div class="gmail_extra"><div>Hi All,</div><div>Thanks for the replies, that did it.</div><div><br></div><div>I've opened <a href="https://hub.qgis.org/issues/11008">https://hub.qgis.org/issues/11008</a> per Andreas' suggestion.</div>

<div><br></div><div>Cheers,</div><div>Jonathan<br><br></div>
<br><br><div class="gmail_quote">On 5 August 2014 10:58, Andreas Neumann <span dir="ltr"><<a href="mailto:a.neumann@carto.net" target="_blank">a.neumann@carto.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

Hi,<br>
<br>
For me it is very strange that<br>
<br>
x(centroid($geometry))<br>
y(centroid($geometry))<br>
<br>
does not work in the QGIS expressions.<br>
<br>
There is a $x and $y - but this does only work directly on a current<br>
feature if it is a point feature.<br>
<br>
The workaround with xmin/ymin<br>
<br>
xmin(centroid($geometry))<br>
ymin(centroid($geometry))<br>
<br>
works, but seems cumbersome.<br>
<br>
Could you open a ticket please?<br>
<br>
Andreas<br>
<br>
Am 04.08.2014 17:22, schrieb Goyo:<br>
<div><div class="h5">> This works in master:<br>
><br>
> xmin(centroid($geometry))<br>
> ymin(centroid($geometry))<br>
><br>
> Goyo<br>
><br>
> 2014-08-04 18:28 GMT+02:00 Jonathan Moules <<a href="mailto:jonathanmoules@warwickshire.gov.uk">jonathanmoules@warwickshire.gov.uk</a>>:<br>
>> Hi list,<br>
>> Quick question, how do you use the Field Calculator to get the centroid as<br>
>> an attribute? I'm aware of this question answer:<br>
>> <a href="http://gis.stackexchange.com/questions/11705/using-field-calculator-in-qgis-to-update-columns-with-centroid-coordinates" target="_blank">http://gis.stackexchange.com/questions/11705/using-field-calculator-in-qgis-to-update-columns-with-centroid-coordinates</a><br>


>> - but want to do it using just the field calculator.<br>
>><br>
>> I see under "Geometry" that there's a "centroid" function, but can't figure<br>
>> out how to use it for this purpose.<br>
>><br>
>> Suggestions welcome.<br>
>> Thanks,<br>
>> Jonathan<br>
>><br>
>> This transmission is intended for the named addressee(s) only and may<br>
>> contain confidential, sensitive or personal information and should be<br>
>> handled accordingly. Unless you are the named addressee (or authorised to<br>
>> receive it for the addressee) you may not copy or use it, or disclose it to<br>
>> anyone else. If you have received this transmission in error please notify<br>
>> the sender immediately. All email traffic sent to or from us, including<br>
>> without limitation all GCSX traffic, may be subject to recording and/or<br>
>> monitoring in accordance with relevant legislation.<br>
>> _______________________________________________<br>
>> Qgis-user mailing list<br>
>> <a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
>> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
> _______________________________________________<br>
> Qgis-user mailing list<br>
> <a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
><br>
<br>
</div></div>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div><br></div></div>

<br>
<span style="color:rgb(34,34,34);font-family:Arial;background-color:rgb(255,255,255)">This transmission is intended for the named addressee(s) only and may contain confidential, sensitive or personal information and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.</span>