[Qgis-user] Converting from degree decimal into degree-minutes-secondes

Charles Dixon-Paver charles at kartoza.com
Thu Jul 22 14:29:50 PDT 2021


QGIS Expression builder has a to_dms function available.

For example, you could use the field calculator to update a text field like
so:

to_dms( "x_field" ,'x', 3) || ', ' || to_dms( "y_field" ,'y', 3)

Should yield results such as the following:
x_field: 23.3978700906344
y_field : -30.810918277945603
dms_field: 23°23′52.332″, -30°48′39.306″

You can get point positions also using QGIS expressions and the $x and $y
parameters

Regards

On Thu, 22 Jul 2021 at 22:59, jean Lukusa <lukusam at gmail.com> wrote:

>
> Hi all.
> Would you help me how to convert  longitude and latitude coordinates of a
> point from decimal degree into degree-minutes-secondes directly in an
> attribute table of shapefile ?
>
> Jean Lukusa
> B.Sc. Geology
> Trained on Jorc  Code
> GIS  Operator
> +243812156128
> _______________________________________________
> Qgis-user mailing list
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210722/9c88530d/attachment.html>


More information about the Qgis-user mailing list