[Qgis-user] Decimal places in Style Labels

simbamangu simbamangu+osgeo at gmail.com
Mon Dec 30 09:45:38 PST 2013


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.



More information about the Qgis-user mailing list