Re: [Qgis-user] Decimal places in Style Labels

2013-12-30 Thread simbamangu
There doesn't seem to be a way to do this within QGIS. However, if you have a
text editor that can do regex replacement, you can run through and change
all the labels in the project file. For example, to trim the decimal places
to 1 place only in an entire project:

Open the .qgs file in the text editor (I use Smultron 5 on Mac OS X):

Do an "advanced find and replace", to find:

*(label="\d+.\d{1})\d+ - (\d+.\d{1})\d+
*
... and replace with:

*$1 - $2*

Change the number in {} for the number of decimal places needed.

To remove decimal places entirely, search instead for:

(label="\d+).\d+ - (\d+).\d+ 



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Decimal-places-in-Style-Labels-tp5095713p5095812.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] Decimal places in Style Labels

2013-12-28 Thread Johanna Botman
When I create a style for a map, and use a Graduated set of categories, the
associated labels have four decimal places - all zeros. I can change each
one individually - but there are 10 categories and this map will be updated
on a weekly basis and I'm looking for an easier way.

 

I know that in the Labelling function, I can change the number of decimal
places. But that is the labelling for the items on the map. I'm looking for
the labels that will be displayed in the legend.

 

Johanna Botman



---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user