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

hdienst47 at aol.com hdienst47 at aol.com
Tue May 5 06:52:46 PDT 2020


Hi Richard and Karl,

Thanks for your help. The final solution to my problem is:

round( $length, 2) || ' m' || ' '

 �

Regards,

Hartmut

 �

From: Richard McDonnell <richard.mcdonnell at opw.ie> 
Sent: Tuesday, May 5, 2020 11:38 AM
To: Karl Magnus Jönsson <Karl-Magnus.Jonsson at kristianstad.se>; hdienst47 at aol.com; qgis-user at lists.osgeo.org
Subject: RE: [Qgis-user] QGIS 3.10: Dimensioning with on-board equipment

 �

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 <mailto:Karl-Magnus.Jonsson at kristianstad.se> > 
Sent: 05 May 2020 10:00
To: Richard McDonnell <richard.mcdonnell at opw.ie <mailto:richard.mcdonnell at opw.ie> >; hdienst47 at aol.com <mailto:hdienst47 at aol.com> ; qgis-user at lists.osgeo.org <mailto: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 < <mailto:qgis-user-bounces at lists.osgeo.org> qgis-user-bounces at lists.osgeo.org> För Richard McDonnell
Skickat: den 5 maj 2020 10:51
Till:  <mailto:hdienst47 at aol.com> hdienst47 at aol.com;  <mailto:qgis-user at lists.osgeo.org> 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> 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> https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie

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

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


More information about the Qgis-user mailing list