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设置失败");

}

相关推荐
6Hzlia4 分钟前
【Classic 150 刷题计划】 LeetCode 205. 同构字符串 | C++ 双向绑定与哈希表映射
c++·算法·leetcode
神仙别闹6 小时前
基于 C++ 实现(控制台)学生成绩管理系统
开发语言·c++
会周易的程序员6 小时前
5 节点边缘冗余方案(上):基于 aiRaft 的物联网高可用控制面设计
c++·分布式·物联网·raft·iot·共识
Hrain-AI7 小时前
多 Agent 并行不打架:worktree 隔离与反馈回流落地(附脚本)
网络·数据库·人工智能·架构
净水深流8 小时前
中央厨房冷链技术实践:多温区改造、WMS落地与IoT温控架构
大数据·数据库·人工智能·冷库冷链
l1t8 小时前
测试DuckDB 2.1的match_recognize模式匹配语句
数据库·duckdb
IpdataCloud9 小时前
AI智能体调用工具怎么核验来源IP?归属地、网络类型与代理风险识别(含Python代码)
数据库·python·tcp/ip
qq_199886879 小时前
第6板块·第4节:构建系统与多文件项目
c++·人工智能·gpu算力
曹牧9 小时前
Java:SQL 注入漏洞
数据库
程序员JerrySUN10 小时前
Jetson Edge AI 实战01:Nano、Xavier、Orin 怎么选?Jetson 硬件选型详解【视频讲解】
java·数据库·redis·安全·mybatis