[R-sig-Geo] How to make a SpatialGrid according to a polygon ?

Roger Bivand Roger.Bivand at nhh.no
Tue Nov 30 08:52:37 CET 2010

On Tue, 30 Nov 2010, lu wrote:

> Hellow, I have a polygon and some points, and I want to use the krige 
> method to interpolate the polygon.The first step is to make a 
> SpatialGrid. But how to make a SpatialGrid which has the same figure as 
> the polygon?  Thanks!
> 	[[alternative HTML version deleted]]

Your choice of spsample(..., type="regular") in sp, then convert using 
gridded() and fullgrid(), or Sobj_SpatialGrid() in maptools. If you need 
precise control over the placing of the grid, use GridTopology() to 
construct it by hand before SpatialGrid, based on your choice of the south 
wset cell centre.


> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> 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