Skip to content
Prev 11139 / 29559 Next

long 0-360, shift to -180 to 180

I have a raster with longitude data over 0 to 360.

bar <- raster(t(foo[,,1]),xmn=0,xmx=356.25,ymn=-87.159094555863,ymx=87.159094555863,
              crs="+proj=longlat +datum=WGS84")

I'd like to shift those longitudes to -180 to 180. I tried paying with the +long_wrap argument to crs but to no avail. Can somebody help? I'll need to overlay and extract data from the negative side (e.g., 100W or -100) and it would be nice to have the coordinates the same.

Thanks in advance, 
Andy