Warning 1: PROJ: proj_create_from_database

完整错误如下

Warning 1: PROJ: proj_create_from_database: C:\Program Files\PostgreSQL\14\share\contrib\postgis-3.2\proj\proj.db contains DATABASE.LAYOUT.VERSION.MINOR = 0 whereas a number >= 6 is expected. It comes from another PROJ installation.

Warning 1: The definition of projected CRS EPSG:32650 got from GeoTIFF keys is not the same as the one from the EPSG registry, which may cause issues during reprojection operations. Set GTIFF_SRS_SOURCE configuration option to EPSG to use official parameters (overriding the ones from GeoTIFF keys), or to GEOKEYS to use custom values from GeoTIFF keys and drop the EPSG code.

其实根本原因是,proj找proj.db时找到了老版本的,那么proj是如何找到proj.db呢?答案就是通过

PROJ_DATA环境变量。那么要想让它找到正确的PROJ_DATA就是重写PROJ_DATA就行了,例如我这里是这样写的

if (!qputenv("PROJ_DATA", (qgis.pkgDataPath() + "/resources/proj").toUtf8()))

{

qDebug() << QStringLiteral("PROJ_DATA设置失败");

}

相关推荐
java资料站17 分钟前
四、Spring AIAlibaba · Tools(工具调用)
数据库·sql·spring
Lhan.zzZ24 分钟前
Qt/QML:业务记录单展示、签名确认与 PDF 导出开发
c++·qt·pdf
傲世仙尊25 分钟前
类和对象上-class与struct实例化内存对齐与this指针
c++
步行cgn29 分钟前
Spring 事务传播行为详解
java·数据库·spring
C++ 老炮儿的技术栈31 分钟前
C++ const 的3个核心作用
服务器·c语言·c++·算法·c
小黄人软件32 分钟前
粘贴助手C++版 支持 Windows 7 / 10 / 11 不会出现缺少api-ms-win-core-path-11-1-0.dll
开发语言·c++·windows
有毒的教程43 分钟前
Dev-C++ 避免爆栈(Stack Overflow)完整方案
c++·算法·深度优先
程序员老陆44 分钟前
从汇编层面理解 C++ 多线程
开发语言·c++·程序设计
anxiao_m1 小时前
跨地域大文件怎么传?2026主流传输软件实测对比
大数据·数据库·文件传输
Su米苏1 小时前
基于 Token 预算的上下文压缩控制器(Context Compaction Controller)
前端·数据库·人工智能