[GRASS5] r.to.sites: change proposal for -a

Bill Brown - staff brown at gis.uiuc.edu
Tue Oct 24 13:53:01 EDT 2000


>
>
>Aha! It seems you have a different version. Would you share it?

It's the grass5.0beta7 version I'm using - check your sites list
and see if your first site doesn't have a decimal.  If not, try
adding ".0" to the first cat, then you should get FCELL_TYPE with
s.info.

>
>But this "guessing from the first" is quite error prone (like my
>random example from previous mail). Of course it would be too time
>consuming to parse the entire sites list to determine the format.
>

Yes, it would be better if every sites file had a format in the header
and there was also a CAT type specified in the header.  But then all of
the old site lists would be incompatible.  The "guess by first" was done
mostly for backward compatibility, as was the need to use -a in 
r.to.sites.  It is not a very good solution.
I also noticed that G__site_put uses %g when printing fp attributes,
so you can get "1" instead of "1.0".  I guess the only way to make sure
it writes a decimal would be to use %#g which will write several zeros.

>
>I understand you prefer to keep the "-a" parameter? For me it's somewhat
>inconvenient as most of the sites modules don't accept site lists
>generated without "-a"...
>

It's just not backward compatible, so you don't know what scripts and
programs you might break by doing it. You can always do it and then see
who complains... :-).

- Bill


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