Skip to content
Prev 164315 / 398503 Next

exporting rast from R to GRASS

Thyb?rio Luna Freire <thyberio <at> gmail.com> writes:
It means what it says, as the help page to krige.conv() says.

To make progress, you need to create a SpatialGridDataFrame matching the 
GRASS location (region, resolution).

Use this to generate the prediction locations.

The output object "predict" component contains the predictions. Add it to 
the SpatialGridDataFrame (or SpatialPixelsDataFrame), and proceed as 
writeRAST6() suggests in the helpfile:

kc <- krige.conv(coords=coordinates(SPz2), data=SPz2$day16, 
  locations=coordinates(SPDF_utm), krige=krige.control(obj.model=fvg))
SPDF_utm$geoR_pred <- kc$predict
writeRAST6(SPDF_utm["geoR_pred"], "geoR_pred")

or similar (untried).

Note that either of the statgrass or R-sig-geo lists are more relevant 
than this one.

Roger Bivand