[GRASSLIST:9582] Re: v.rast.stats

Hamish hamish_nospam at yahoo.com
Mon Dec 19 18:21:16 EST 2005


> Or how many digits are displayed using v.label? I cannot find this in
> the documentation.

to do this the db_convert_value_to_string() fn in lib/db/valuefmt.c
would need to be updated.

Same issue with d.what.vect output.

Sometimes replacing %lf with %15g for TYPE_DOUBLE makes it nicer, but
for eastings and northings it is nice to have 5000000.000 format and %g
makes a million into 1e+06..  There is code elsewhere in GRASS to strip
trailing zeros from FP numbers if not needed, maybe it could be used.

We need to be careful that we don't lose any information on data output
because we decided to make it look pretty, as that uses the same lib
fn..

In GRASS 5 I added a precision= option to d.site.labels for just this.
In d.legend I tried to set the number of digits correctly by range and
all sorts of rules. I don't find either of these solutions are very nice...


For you probably the easiest is to edit the paint/labels/ file directly.
Maybe someone can suggest a awk command to reformat the text: lines?



Hamish




More information about the grass-user mailing list