Hi Lene,

 

have you tried the "toint" and "tostring" function ?

 

This formula is to retrieve $area in square km with 2 decimal digit, but I
guess, you will adapt it for you :

tostring(toint($area/10000.0)/100.0) || ' km²'

 

Be warned that the "toint" make a round operation.

 

Regards.

 

Mathieu LATTES

Directeur Technique

[email protected]

http://www.interatlas.fr <http://www.interatlas.fr/> 
http://www.urbimap.com <http://www.urbimap.com/> 

 

De : [email protected]
[mailto:[email protected]] De la part de Lene Fischer
Envoyé : jeudi 8 août 2013 05:09
À : [email protected]
Objet : [Qgis-user] Label using $area and decimals

 

Hello 

In Master I´m trying to set a label with the function $area. This works
fine.

But I´m trying to use the formatting for numbers with only 1 decimal -  no
succes. 

It works fine if I use a coloumn containing the area.

 

But this is not a solution because the $area is not dynamic in the coloum of
the attribut table.

 

Secondly - how do I activate the functions in the Labeltoolbar -ex Move or
Show/Hide

 

Regards

Lene Fischer




_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to