Hi Jan,
Even simpler, once you have a SpatialPolygons object you can use
spsample() to make a grid in that polygon. For reading polygons look at
the rgdal package or readShapePoly() in the maptools package. See
http://spatial.nhh.no/R/etc/world_map_intro.html for a shapefile for the
whole world, probably you could get a map of germany from that quite easily.
Be sure to take a look at the automap package, it is a wrapper around
gstat, automating interpolation. Just see what you get from that as a
start. automap is not (yet) on cran, but you can download it from my
website (I wrote the package and now I'm advertising it :))
http:/intamap.geo.uu.nl/~paul/Downloads.html.
cheers,
Paul
Virgilio Gomez Rubio schreef:
Jan,
If you have the boundaries of Germany and you want to make your own
grid, you can use the overlay method to 'cut' the grid so that you only
get the points inside Germany. You can use this object in gstat to make
your predictions.
Hope this helps,
Virgilio
El mar, 24-02-2009 a las 18:21 +0100, Jan Hackenberg escribió:
Hello
im doing a project with Interpolating ( Kriging ) Temperature Data from many
Stations in Germany. To do a Kriging i have to use a Grid. So I have now 2
options. The better one is too download a prepared grid with the borders of
Germany. Then the interpolated map will look great, because i have only
Points inside German borders. So does anyone have got such a grid?
If no, the other is to make a grid inside a German Bounding Box. Then my map
will be a quare :). I have looked in the meuse Data set how such a grid
looks like :
meuse.grid
Object of class SpatialPixelsDataFrame
Object of class SpatialPixels
Grid topology:
cellcentre.offset cellsize cells.dim
x 178460 40 78
y 329620 40 104
SpatialPoints:
x y
[1,] 181180 333740
[2,] 181140 333700
[3,] 181180 333700
and so on.
So is there any Possibility to make such a grid, if i know : Coordinates of
my Bounding Box (upper left coodinates for example (200000,540000), upper
right(900000,650000)) and Cellsize for Example 10000?
I woult prefer too download an existing grid.
Sorry for my bad english and bad knowledge of R. :)
Greetings Jan Hackenberg
[[alternative HTML version deleted]]
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
--
Drs. Paul Hiemstra
Department of Physical Geography
Faculty of Geosciences
University of Utrecht
Heidelberglaan 2
P.O. Box 80.115
3508 TC Utrecht
Phone: +3130 274 3113 Mon-Tue
Phone: +3130 253 5773 Wed-Fri
http://intamap.geo.uu.nl/~paul
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo