[R-sig-Geo] Need help in creating a grid

Bernd Vogelgesang bernd.vogelgesang at gmx.de
Tue Aug 25 16:24:08 CEST 2015


Hi,
just found that some days ago. No Idea if that is what you meant or need.

bb <- bbox(spdf)
cs <- c(0.1,0.1)  # cell size
cc <- bb[, 1] + (cs/2)  # cell offset
cd <- ceiling(diff(t(bb))/cs)  # number of cells per direction
grd <- GridTopology(cellcentre.offset=cc, cellsize=cs, cells.dim=cd)
sp_grd <- SpatialGridDataFrame(grd,
                            data=data.frame(id=1:prod(cd)))


from: http://gis.stackexchange.com/a/153958/8202

Cheers
Bernd


Am 20.08.2015, 21:49 Uhr, schrieb prabhu <prabhu142003 at gmail.com>:

> I have to create a grid to view the heatmap of my data on a geo location.
>
> I am stuck with using some libraries that are used to create such grid.
> Anyone here to help please ?
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo


-- 
Bernd Vogelgesang
Siedlerstraße 2
91083 Baiersdorf/Igelsdorf
Tel: 09133-825374



More information about the R-sig-Geo mailing list