[GRASS5] How to code NULL in sites lists?

Markus Neteler neteler at geog.uni-hannover.de
Wed Oct 11 13:36:01 EDT 2000


On Wed, Oct 11, 2000 at 08:31:11AM -0700, Eric G . Miller wrote:
> On Wed, Oct 11, 2000 at 04:18:55PM +0100, Markus Neteler wrote:
> > Hi all,
> > 
> > I just don't know how to code NULL in a sites list with
> > floating point data...
> > 
> > Example:
> > 
> > 3570018.250000|5766419.000000|-35|%0.86
> > 3570018.250000|5766419.000000|-45|%1.04
> > 3570018.250000|5766419.000000|-110|%*
> >                                    ^^ this shall be no data.
> > 
> > Is that correct?
> 
> Yes, but how will code check for any NULL attribute?  I don't think the
> current library functions will allow NULLs for any attribute.  It's
> probably a good idea to allow, but library functions will have to be
> modified (not to mention modules).  Can we rely on using NAN to indicate
> a NULL value for a double and a zero-length string for NULL string
> attributes?  I know there are problems using NAN on older systems.
Maybe we should allow two values:

-9999 (for all data coming from ESRI world)
NAN  (but this is a strings?!)

I would be glad if NULL support is there in sites format. At least
s.in.ascii, s.to.rast and s.to.vect should accept it.

> Still, I think we should allow it, since it's completely logical that a
> site may not have a value for a particular attribute while others do.
> If the library functions are modified, I don't think we need to
> introduce yet another special character into the site_list file format.
> Simply having the metacharacter followed by a space should be enough to
> flag a NULL attribute.  The library functions need to be taught that
> this is okay.
> 
> 3567.1234|1234.567|#1 % %234.45 @"my label" @"alt name"
> 12345.009|1254.234|#2 %23.54 %22.123 @"the label" @ 
This sounds good to me.

Markus

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list