[R-sig-Geo] Kriging on "srtm" data

Roger Bivand Roger.Bivand at nhh.no
Mon Jan 22 12:05:45 CET 2007


On Sat, 20 Jan 2007, epifanio wrote:

> Hi,
> i've tryed to delete the  "\" backslash,
> now i've a different error, at the same line :
> 
>  > grd <- GridTopology(cellcentre.offset=c(G$west+(G$ewres/2), G$south 
> +(G$nsres/2)), cellsize=c(G$ewres, G$nsres), cells.dim=c(G$cols, G 
> $rows));
> Errore in validObject(.Object) : invalid class "GridTopology" object:  
> cellsize has incorrect dimension

If you had looked at the G object, you would have seen that the internal 
representation has changed (problems with g.region) since these notes were 
written.

Use the function gmeta2grd() instead of rolling it by hand - the function 
uses the updated representation without users needing to follow internal 
details.

Roger

> 
> 
> 
> this is my setting :
> 
>  > sessionInfo()
> R version 2.4.1 (2006-12-18)
> i386-apple-darwin8.8.1
> locale:
> C
> attached base packages:
> [1] "stats"     "graphics"  "grDevices" "utils"     "datasets"   
> "methods"
> [7] "base"
> other attached packages:
>     gstat  spatial spgrass6    rgdal maptools  foreign       sp
> "0.9-35" "7.2-31"  "0.3-4"  "0.5-5"  "0.6-6" "0.8-18"  "0.9-4"
>  >
> 
>   g.region eboli90 -p
> projection: 1 (UTM)
> zone:       33
> datum:      wgs84
> ellipsoid:  wgs84
> north:      4506030
> south:      4493970
> west:       499590
> east:       514350
> nsres:      90
> ewres:      90
> rows:       134
> cols:       164
> cells:      21976
> 
> thanks for any help!
> 
> regards,
> Massimo
> 
> 
> 
> 
> Il giorno 20/gen/07, alle ore 12:00, r-sig-geo- 
> request at stat.math.ethz.ch ha scritto:
> 
> > On Fri, 19 Jan 2007, epifanio wrote:
> >
> >>          hi i've some problem to do a tutorial on the kriging
> >> interpolation
> >>          i found instruction on how to interpolate the srtm data to
> >> increase the resolution :
> >>
> >> 	http://grass.itc.it/newsletter/GRASS_OSGeo_News_vol4.pdf
> >>
> >> 	at page 20 ...  at the line :
> >>
> >>         grd <- GridTopology(cellcentre.offset=c(G\$west+(G\$ewres/2),
> >>         G\$south+(G\$nsres/2)),cellsize=c(G\$ewres, G\
> >> $nsres),cells.dim=c(G\$cols, G\$rows));
> >>
> >
> > Perhaps the LaTeX \$ markup which got though into the published  
> > version is
> > the problem? Try removing the backslashes?
> >
> >> cars$speed
> >  [1]  4  4  7  7  8  9 10 10 10 11 11 12 12 12 12 13 13 13 13 14 14  
> > 14 14
> > 15 15
> > [26] 15 16 16 17 17 17 18 18 18 18 19 19 19 20 20 20 20 20 22 23 24  
> > 24 24
> > 24 25
> >> cars\$speed
> > Error: syntax error in "cars\"
> >
> > Roger
> >
> >>
> >>        i have a sintax error in grid function.
> >>
> >> i'm missing or wrong something?
> >>
> >> thanks for any suggestion :-)
> >>
> >> Massimo.
> >>
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 

-- 
Roger Bivand
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 R-sig-Geo mailing list