[GRASSLIST:1208] Re: s.sample question

Eric G . Miller egm2 at jps.net
Fri Dec 1 20:59:23 EST 2000


On Fri, Dec 01, 2000 at 11:41:41AM -0600, bob at math.umn.edu wrote:
> Aloha.
> 
> I've been trying to get s.sample to work.  And it refuses to do so.
> 
> GRASS:~/grass > s.sample input=s.cost.start.test rast=g10g
> Reading sites list ...               100%
> Checking sites ...                  Segmentation fault
> 
> This is with grass5b8.  With grass 5b5, we have this result:
> 
> GRASS:~/grass > s.sample input=s.cost.start.test rast=g10g
> Reading sites list ...               100%
> ERROR: No sites found
> 
> The input file s.cost.start.test (which works with other s.* applications) is
> 
> 19:10:45E 44:17:15N %100
> 
> Any ideas on what could be going wrong for me?

This is fixed in the CVS version (as well as adding several options for
attribute selection).   I think there was an erroneous assumption about
the structure of the site data file.  The "official" format says the
layout is:

east|north|[dim1|dim2|...|][#cat] [%double1 %double2 ...] [@string1 @"string 2" ...]

Where the [] denote optional members.  Also, the library functions are
very strict about the format being consistent for every site_list
record.  That means you can't have an attribute in one record that
doesn't exist in others.  We hope to rewrite stuff so it'll allow NULL
values for attributes (other than "east" and "north") in future
revision.

A beta9 should be coming along fairly soon which has many bug fixes and
enhancements.

As an interim method, I think if you replace the %100 with #100, maybe
it'll work (I forget what it's old behavior was).  

sed -e '=\|\(\s\{0,\}\)\(%\)\(\d\{1,\}\)=#\3=' < mysite > mysite.2

Or something like that...

-- 
Eric G. Miller <egm2 at jps.net>




More information about the grass-user mailing list