[GRASS-dev] d.legend: -2147483648 -> null?

Markus Neteler neteler at osgeo.org
Wed Aug 20 08:19:31 EDT 2008


On Wed, Aug 20, 2008 at 1:52 PM, Glynn Clements
<glynn at gclements.plus.com> wrote:
>
> 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.]

Thanks, submitted to 6.4.svn and trunk.

Markus


More information about the grass-dev mailing list