[STATSGRASS] unfilled matrices with R and gstat in grass
Roger.Bivand at nhh.no
Tue Feb 13 15:07:30 EST 2007
On Tue, 13 Feb 2007 roger at spinn.net wrote:
> This is a user's question, rather than a developer's question.
> I have R with the gstat library working with grass6.2.0beta3. On Linux
> 2.6.13 x86_64 (SuSE 10.0). The software generally works and I can confirm
> its results at least approximately against other software. The problem I'm
> having is that the resulting map is sometimes not completely filled. I get
> calculated values on diagonal lines in the map and the intervening areas are
> left unfilled -- they have null values. The same pattern is visible whether
> I look at the result from within R or export the result to a grass raster
> The pattern is not so simple as a limit to the size of the resulting map. I
> have a small set of data (about 60 locations) and need to construct a map of
> an area of about 20x30 km, using a grid with spacing of 30mX30m. The
> resulting map should have 686736 values, but the the result only contains
> 171684 non-null values. That is exactly 1/4 of the cells. If I increase
> the cell area to 60mX60m so that the grid only contains 171684 cells, then
> the result contains 85842 non-null values. That is 1/2 of the cells.
> I can construct a map using 16 tiles across the same area and patch them
> together to get a completely filled map, but for most purposes that is an
> excessive amount of work.
> With a different data set with about 250 points and trying to construct a
> map over a larger area using a grid with 169576 cells, each 120mX120m I do
> get a filled raster map in the result, though the result looks a little odd.
> I don't understand what is happening and I've found no mention of this
> problem elsewhere. Any ideas?
Without seeing your code, and perhaps save() of the input objects to the
kriging prediction function call, it's difficult to tell. It feels like
the newdata= argument for the prediction location being malformed. If you
can post code and put sample data for replicating the problem on a website
somewhere (the *.Rdata file from save), we can try to see what it is.
> Roger Miller
> statsgrass mailing list
> statsgrass at grass.itc.it
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the grass-stats