[R-sig-Geo] Best practices for transforming raster data without altering values

Valentin Stefan stefan.valentin87 at yahoo.com
Sun Jan 8 21:00:19 CET 2017


Dear all,
I have several global rasters from http://worldclim.org/ and I want to project them in a equal area projection shifted on Pacific.A sample code is:bio_1.WGS84.global  <- raster("bio_1.bil")
# I use World Cylindrical Equal Area (CEA)crs.cea <- "+proj=cea +lon_0=180 +lat_ts=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"bio_1.1km <- projectRaster(from=bio_1.WGS84.global, res=1000, method='bilinear', crs = crs.cea)
I came across the very helpful page maintained by Robert Hijmans at http://rspatial.org/spatial/rst/6-crs.html#transforming-raster-data ,where he mentions that "Because projection of rasters affects the cells values, in most cases you will want to avoid projecting raster data and rather project vector data."
So, I know that the new (projected) cell values have been altered. There are not huge differences, nevertheless, is there a "good practice" to avoid changes in data while transforming a raster?
I presume I can't work on unprojected data and I should use a equal area projection as I need to further aggregate the rasters at various resolutions (e.g. 5, 10, 20 km) and extract some cell statistics at given points across the Pacific.
Kind regards,Valentin Stefan



	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list