Hi everyone,
I would like to know a good way in which to convert a SpatialPointsDataFrame to a SpatialGridDataFrame. The reason that I ask is that when I change the CRS of a SpatialGridDataFrame, I inadvertently create a point data frame with the new CRS. To better illustrate my problem: I have a grid file grid90m <- readGDAL("edgeroi_dem.asc") names(grid90m) <- "edgeroi_dem" I give it a CRS proj4string(grid90m)<- CRS("+init=epsg:4283") Then I change it to a projected CRS grid90.UTM <- spTransform(grid90m, CRS("+init=epsg:32755")) Get a summary summary(grid.UTM) Object of class SpatialPointsDataFrame Coordinates: min max x 738742 790718.3 y 6643860 6679923.8 Is projected: TRUE proj4string : [+init=epsg:32755 +proj=utm +zone=55 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs +towgs84=0,0,0] Number of points: 220805 Data attributes: Min. 1st Qu. Median Mean 3rd Qu. Max. 180.2 200.7 225.0 254.1 280.6 988.6 I have tried various ways to convert this points file to grid via a few methods with resultant failure. Essentially I need to input some measure of the pixel size. My original thoughts were that the problem was to do with the asymmetrical shape of my DEM layer. This may be true, but it would be useful if people could provide some ideas on how to get around this. Cheers, Brendan Malone PhD candidate University of Sydney [[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