[GRASS5] Re: d.vect.thematic wish: handle null values

Moritz Lennert mlennert at club.worldonline.be
Tue Aug 30 09:25:00 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daniel Calvelo Aros wrote:
> 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.

Great, now it works for me. Thanks !

> 
> 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.

I agree.

BTW: I just committed a slight addition to the legend drawing
routine for drawing black lines around the legend boxes. Just
thought it looks nicer that way...now if only these legends could be
exported in a more usable form...(will commit a wish for this just
for memory)

Moritz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDFF4srIrMbm76jD8RAstWAJ9MM6l3oLGxBfLYQNxtwUMw5Pj4agCeKPbO
lOXYOACxZdQwlciec5Z2rsY=
=nS1Z
-----END PGP SIGNATURE-----




More information about the grass-dev mailing list