[R-sig-Geo] [R-sig-GEO] data set manipulation, averaging
Edzer J. Pebesma
e.pebesma at geo.uu.nl
Wed Aug 23 09:12:30 CEST 2006
karl.sommer at dpi.vic.gov.au wrote:
> Hello list
>
> I am stuck with a problem regarding the manipulation of two data sets.
>
> The first data set contains electromagnetic induction (EMI) readings of a
> field obtained with a high sampling density,14965 records in a field 1000
> by 500 m. Each reading is geo-referenced.
> The second set contains soil related information (texture) taken from soil
> pits of the same field at a density of 75 x 75 m resulting in 111 readings.
> The position of each pit is geo-referenced as well.
>
> I would like to calculate an average of the EMI readings in the vicinity of
> the soil pits, say within a radius of 2 - 5 metres and relate this average
> to the soil texture data obtained from the pits.
>
> Averaging would also reduce the size of the EMI data set which at the
> moment is too big for ordinary kriging in GSTAT.
>
I assume you did not set a local neighbourhood for kriging? It seems to
work for me, but takes indeed almost 2 Gb of RAM,
> 15000^2*8
[1] 1.8e+09
bytes are needed for the single full covariance matrix alone.
> Can this be done with a few lines of code?
>
use gstat with a maxdist (search radius) of 2 to 5 m, and a pure nugget
variogram vgm(1, "Nug", 0) and you'll get the arithmetic mean of the data
within the search radius.
hth,
--
Edzer
> Regards
>
> _________________________________
> Karl J Sommer,
> Department of Primary Industries,
> Catchment & Agriculture Services,
> PO Box 905
> Mildura, VIC, Australia 3502
>
> Tel: +61 (0)3 5051 4390
> Fax +61 (0)3 5051 4534
>
> Email: karl.sommer at dpi.vic.gov.au
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
More information about the R-sig-Geo
mailing list