[GRASS-dev] d.legend: -2147483648 -> null?
Glynn Clements
glynn at gclements.plus.com
Wed Aug 20 07:52:54 EDT 2008
Markus Neteler wrote:
> using d.rast.leg (d.legend) on a NO DATA integer map, it prints "-2147483648"
> instead of null.
>
> Below dirty hack cures the problem - how to do it correctly?
After;
G_get_range_min_max(&range, &min_ind, &max_ind);
add e.g.:
if (G_is_c_null_value(&min_ind))
G_fatal_error(_("Input map contains no data"));
[Note that if min_ind is null, max_ind will also be null, and
vice-versa.]
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list