Hello r community,

This is to request for help on how to reprojrect longitude from 0 - 360 to
-180 - 180
With the following script below, i get output transformed to something like
rectangle. Is there a better way of doing it?
### script
convert longitude from 0 - 360 to -180 - 180
library(raster)
rst <- raster('D:/prec/b1980p.tif')
rst <- raster(matrix(1:100, ncol=10), 0, 360, -90, 90, crs="+proj=merc")
r2 <- rotate(rst)
r2

Thanks for your help

John

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to