[Qgis-user] Centroid of polygon

Carlos Cerdán sig.upagu at gmail.com
Mon Aug 4 10:04:49 PDT 2014


Jonathan


Not a "nice" sentence, but you can use min or max:


ymin( centroid( $geometry ) )


xmin( centroid( $geometry ) )


Carlos





2014-08-04 11:28 GMT-05:00 Jonathan Moules <
jonathanmoules at warwickshire.gov.uk>:

> Hi list,
> Quick question, how do you use the Field Calculator to get the centroid as
> an attribute? I'm aware of this question answer:
> http://gis.stackexchange.com/questions/11705/using-field-calculator-in-qgis-to-update-columns-with-centroid-coordinates
> - but want to do it using just the field calculator.
>
> I see under "Geometry" that there's a "centroid" function, but can't
> figure out how to use it for this purpose.
>
> Suggestions welcome.
> Thanks,
> Jonathan
>
> 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.
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140804/ee12838b/attachment.html>


More information about the Qgis-user mailing list