[GRASSLIST:2058] Re: mapcalc for sites?

Hamish hamish_nospam at yahoo.com
Tue Dec 16 04:56:40 EST 2003


> Is there a way within GRASS to do calculations on sites?  I have some 
> depth soundings that imports into float attributes to my sites and
> need to convert them to elevations (and to meters) before I run one of
> the surf commands.  I would rather not go outside of GRASS to do it
> (too much import/export hassle), but I have the tools if necessary.

Probably best to do it externally.
 
 s.out.ascii sites_file -ad fs=, > site_data.dat


Then

if the number of soundings is small:
load into a spreadsheet and make the changes you need.

if the number of soundings is large:
load into something like Octave or Matlab & do your thing.


Save in a similar CSV format & re-import with s.in.ascii. Mind the
spreadsheet hasn't rounded your data on a whim as some of them are want
to do.


Within GRASS, you can only do stats on the site data, not actually
change them, AFAIK.


good luck,
Hamish




More information about the grass-user mailing list