[GRASS5] Re: d.vect.thematic wish: handle null values
Daniel Calvelo Aros
dcalvelo at minag.gob.pe
Mon Aug 29 20:49:47 EDT 2005
From: "Moritz Lennert" <mlennert at club.worldonline.be>
Sent: Sun, 28 Aug 2005 11:53:34 +0200 (CEST)
> > When I was dealing with this problem I only used the DBF driver,
> > which gave zeros for nulls under unspecified cirsumstances.
>
> Thinking about this a bit more this seems more like a bug to me.
> Making nulls into zeroes gives very different results than if nulls
> are excluded from the calculations.
>
> At the user should be warned about this.
> As I mentioned earlier, we have to think a about whether it is
> better to silently exclude nulls, or whether we should explicitely
> give the opportunity to exclude a certain value (or range or values)
> from the classification. This would then allow those with nulls in
> their files to transform them to any value (e.g. -99999) and exclude
> it from the calculations.
>
> > I can fix the script to filter out nulls, but I'm pretty sure the
> > problem will
> > remain under certain configurations.
>
> Maybe above solution is more generic. But in any case nulls should
> be handled more gracefully...or at least a warning included in the
> man page...
I fixed CVS to *ignore* nulls.
I'd say that is a good choice for use in d.vect.thematic. If you really really
want to use a symbol/color for NULL values, there is always the possibility of
overlaying d.vect.thematic with a d.vect where="the_field is null".
Furthermore, current db.execute allows for things like 'update table set
field=cat+23 where field is null', which allows to take care of any case I can
think of, either inserting new fields and marking them appropriately or
modifying existing fields in-place.
Daniel.
More information about the grass-dev
mailing list