rspatial / raster

R raster package https://rspatial.github.io/raster/reference/raster-package.html
GNU General Public License v3.0
161 stars 53 forks source link

.makeCRS() vulnerable to sp evolution status 2 #303

Closed rsbivand closed 11 months ago

rsbivand commented 1 year ago

See https://github.com/edzer/sp/pull/130.

https://github.com/rspatial/raster/blob/a4d923e0fb85a217ebc1a630f847358494e3a772/R/projection.R#L52-L54 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.

rhijmans commented 11 months ago

I believe this has been handled.