rspatial/raster

.makeCRS() vulnerable to sp evolution status 2

rsbivand opened this issue · 1 comments

See edzer/sp#130.

raster/R/projection.R

Lines 52 to 54 in a4d923e

if (prj != "") {
.CRS(prj, SRS_string=wkt)
} else {
and L56 assume that sp evolution status 2 worked like sp evolution status 0, preferring the SRS-string if projargs is a non-NA string. I've made the above PR to sp, but to test (CI) with sp at evolution status 2 now, you'd need to say .CRS(NA_character_, SRS_string=wkt) in line 53, or drop conditioning on prj != "". You can wait to patch raster, but that means you can't test evolution status 2 (using sf for instantiating CRS, transformation, etc.), until sp with the patch above is released. sp now also has internal options to change evolution status in a running, loaded sp: https://github.com/edzer/sp/blob/54ce54b7d3fea714b704aec5cc0f883aae0553ab/R/spOptions.R#L71-L80. sp will switch from evolution status 0L to 2L in June 2023.

I believe this has been handled.