Context: I want to store the TIFF data to use it for running a linear regression model later on. Ultimate goal: Create a carbon map using field data as a basis.



plotcoord <- SpatialPointsDataFrame(AGCplot[,3:4], AGCplot[,1:2],proj4string=CRS('+proj=longlat')) 
pspcoord<-spTransform(plotcoord, CRS('+proj=utm +zone=21')) #Omzetten naar UTM21N (= S1)

s1 <- stack('Some.tif')

colnamen = c("plotid","AGC","B2","B3","B4","B5","B6","B7","B8","B8A","B11","B12","NDVI","NDWI","MMRI","IRECI","MASI","VV","VH")

s1_e <- extract(s1,pspcoord,method='bilinear')

Upon extraction I get the following message:

Warning message:
In proj4string(x) : CRS object has comment, which is lost in output

1 Answer 1


This is not related to R 4.0.1 but to rgdal 1.5-8 and the migration to gdal 3 and proj 6. This is a very long and complex process that impact hundreds maybe thouthands of packages. All the packages are not yet up-to-date with what is coming.

You can have a look to ?rgdal::set_thin_PROJ6_warnings() to eliminate those warnings.

Edit after Roger's comment: See also

  • 5
    Please refer to r-spatial.org/r/2020/03/17/wkt.html and rgdal.r-forge.r-project.org/articles/… to understand that everybody needs to understand that proper representation of coordinate reference systems matters crucially for all spatial work, unless you will never need accuracy of greater than a degree. Relating one data source to another means that all should be registered correctly. The warnings are indicating that your work may be affected by the change introduced with PROJ 6 (and GDAL 3), adopted by R-spatial and rspatial. Jul 14, 2020 at 12:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.