spTransform()在R中警告PROJ



我在R v 4.0.4 - sp v 1.4-5,和rgdal 1.5-23。我正在使用rgdal包加载shapefile,然后尝试简单地应用spTransform(),但我得到了一组荒谬的警告,我无法摆脱。有人对此有什么看法吗?

options("rgdal_show_exportToProj4_warnings"="none")
library(rgdal)
library(sp)
## Shapefile has a projection of WGS84
X <- readOGR(dsn=".", layer="myshapefile.shp")
UTM30 <- sf::st_crs(32630)$proj4string
transf <- spTransform(X,UTM30)
############################################################
### This warning gets repeated tens to hundreds of times ###
proj_as_proj_string: C:PostgreSQL13sharecontribpostgis-3.1projproj.db lacks DATABASE.LAYOUT.VERSION.MAJOR / DATABASE.LAYOUT.VERSION.MINOR metadata. It comes from another PROJ installation.
proj_as_wkt: C:PostgreSQL13sharecontribpostgis-3.1projproj.db lacks DATABASE.LAYOUT.VERSION.MAJOR / DATABASE.LAYOUT.VERSION.MINOR metadata. It comes from another PROJ installation.
proj_create: C:PostgreSQL13sharecontribpostgis-3.1projproj.db lacks DATABASE.LAYOUT.VERSION.MAJOR / DATABASE.LAYOUT.VERSION.MINOR metadata. It comes from another PROJ installation.

有人遇到过这个并设法压制它吗?

欢呼

从rgdal找到这个解释:

'GDAL'和'PROJ'库是包的外部,当从源代码安装包时,必须首先正确安装;重要的是,"GDAL"<3 .与'PROJ' <6. 从'rgdal' 1.5-8,安装到'GDAL'>=3, 'PROJ'>=6和'sp'>= 1.4,坐标参考系使用'WKT2_2019'字符串,而不是'PROJ'字符串。

最新更新