[STATSGRASS] Grass link to Gstat
Markus Neteler
neteler at itc.it
Tue Apr 1 04:23:46 EST 2003
On Mon, Mar 31, 2003 at 07:34:59PM +0200, Agustin Lobo wrote:
>
> Hi there!
> Is there any info on actually how to use
> Gstat on grass raster layers? The links in
> the gstat and grass web pages are circular.
> The gstat page indicates how to compile for
> grass support but not how to use it. The pdf
> manual does not include any mention to grass.
You need to run gstat from inside GRASS. The variables of interest need to
be floating point numbers (DOUBLE) in sites list or stored in a raster map.
The instructions for gstat are stored in an ASCII file (see gstat manual).
When using GRASS sites lists as input, following column order conventions
have to be followed:
Easting|Northing|#site_no %FP_data [%FP_data]
These are the same conventions as for standard GRASS sites lists.
gstat reads GRASS site data from the current MAPSET with the
data()
function.
Variable positions are defined as:
x=1: column 1 contains the x-coordinate
y=2: column 2 contains the y-coordinate
z=3: column 3 contains the z-coordinate (optional)
v=1: column 1 contains the first data (measurement) variable,
when 0, a grid map (aka raster map) is read
E.g. using the maas location:
http://grass.itc.it/statsgrass/maas_grass_location.tar.gz
Create a file 'gstat.maas1.zn' with following contents:
data(zinc): 'Zn', x=1, y=2, v=1;
data(ln_zinc): 'Zn', x=1, y=2, v=1, log;
variogram(zinc): 10000 Nug() + 140000 Sph(800);
variogram(ln_zinc): 1 Nug() + 1 Sph(800);
Then run
gstat gstat.maas1.zn
Hope this helps,
Markus
--
Markus Neteler
ITC-irst, Istituto per la Ricerca Scientifica e Tecnologica
Project on Predictive Models for the Environment
Via Sommarive, 18 - 38050 Povo (Trento), Italy
tel +39 0461 314 520 (fax -591) http://mpa.itc.it
More information about the grass-stats
mailing list