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.mcdonn...@opw.ie Email Disclaimer: https://www.opw.ie/en/disclaimer/ From: Karl Magnus Jönsson <karl-magnus.jons...@kristianstad.se> Sent: 05 May 2020 10:00 To: Richard McDonnell <richard.mcdonn...@opw.ie>; hdiens...@aol.com; qgis-user@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-boun...@lists.osgeo.org<mailto:qgis-user-boun...@lists.osgeo.org>> För Richard McDonnell Skickat: den 5 maj 2020 10:51 Till: hdiens...@aol.com<mailto:hdiens...@aol.com>; qgis-user@lists.osgeo.org<mailto:qgis-user@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.mcdonn...@opw.ie Email Disclaimer: https://www.opw.ie/en/disclaimer/ From: Qgis-user <qgis-user-boun...@lists.osgeo.org<mailto:qgis-user-boun...@lists.osgeo.org>> On Behalf Of hdiens...@aol.com<mailto:hdiens...@aol.com> Sent: 01 May 2020 17:15 To: qgis-user@lists.osgeo.org<mailto:qgis-user@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
_______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user