[Qgis-user] QGIS 3.10: Dimensioning with on-board equipment

Richard McDonnell richard.mcdonnell at opw.ie
Tue May 5 02:38:15 PDT 2020


Thanks Karl,
Yes that’s correct, slight typo there. For two decimal places it would be as you have shown, so for the Meters part of the dimension adding the number of decimal places will be required, but for the Centimetre, leaving the number of places off, rounds the value to the nearest whole number, so keeping it as shown would be correct.
The corrected formula should look like below.

round( $length, 2) || ' m' || ' ( ' || round(100*( $length) ) || ' cm)'

Regards,

Richard


——
Richard McDonnell MSc GIS, FME Certified Professional
FRM Data Management

——
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
——
M +353 87 688 5964 T +353 1 647 6543
https://www.opw.ie

——
To send me files larger than 30MB, please use the link below https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie

Email Disclaimer: https://www.opw.ie/en/disclaimer/
From: Karl Magnus Jönsson <Karl-Magnus.Jonsson at kristianstad.se>
Sent: 05 May 2020 10:00
To: Richard McDonnell <richard.mcdonnell at opw.ie>; hdienst47 at aol.com; qgis-user at lists.osgeo.org
Subject: SV: [Qgis-user] QGIS 3.10: Dimensioning with on-board equipment

Hi!
Wouldn’t that be round($length,2) for getting two decimal places for meters?

Karl-Magnus Jönsson

Från: Qgis-user <qgis-user-bounces at lists.osgeo.org<mailto:qgis-user-bounces at lists.osgeo.org>> För Richard McDonnell
Skickat: den 5 maj 2020 10:51
Till: hdienst47 at aol.com<mailto:hdienst47 at aol.com>; qgis-user at lists.osgeo.org<mailto:qgis-user at lists.osgeo.org>
Ämne: Re: [Qgis-user] QGIS 3.10: Dimensioning with on-board equipment

Hi,
In my original response, I mentioned using round(100*( $length) ) || ' cm' which would give you the dimensions in centimetres only.
If you want meters only then remove the 100*, which would look like this round($length) || ' m'

Now if you want both dimensions shown, for example <-- 10.52m (1052cm) -->, then this can be achieved by using the following

round( $length) || ' m' || ' ( ' || round(100*( $length) ) || ' cm)'

Hope that helps!!
Regards,

Richard

——
Richard McDonnell MSc GIS, FME Certified Professional
FRM Data Management

——
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
——
M +353 87 688 5964 T +353 1 647 6543
https://www.opw.ie

——
To send me files larger than 30MB, please use the link below https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie

Email Disclaimer: https://www.opw.ie/en/disclaimer/

From: Qgis-user <qgis-user-bounces at lists.osgeo.org<mailto:qgis-user-bounces at lists.osgeo.org>> On Behalf Of hdienst47 at aol.com<mailto:hdienst47 at aol.com>
Sent: 01 May 2020 17:15
To: qgis-user at lists.osgeo.org<mailto:qgis-user at lists.osgeo.org>
Subject: Re: [Qgis-user] QGIS 3.10: Dimensioning with on-board equipment

Hi Richard,

As I had written to you on April 20, I have successfully implemented your proposal.

The only thing missing is an answer to my question:
How would I have to change the command to get a result in m.(,)cm (e.g. 10.52 m or 10,52 m) format?

Regards,

Hartmut

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20200505/d3091eef/attachment-0001.html>


More information about the Qgis-user mailing list