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

}

相关推荐
炘爚21 分钟前
日志系统整体设计步骤以及功能函数梳理
运维·服务器·数据库
_下雨天.22 分钟前
PostgreSQL日常维护
数据库·postgresql
神の愛22 分钟前
本地连接MySql数据库报错??
数据库·mysql
黑牛儿22 分钟前
MySQL 索引实战详解:为什么B+类型的索引查询更快
数据库·mysql
小旭952724 分钟前
SpringBoot + 七牛云 + Quartz:图片存储与定时清理
java·spring boot·后端·mybatis
向上的车轮27 分钟前
如何用DeepSeek定制大模型——智能Text-to-SQL专家系统
数据库·sql
一个有温度的技术博主34 分钟前
Redis主从同步进阶:深入理解增量同步与性能优化
数据库·redis·性能优化
榮華43 分钟前
DOTA全图透视辅助下载DOTA全图科技辅助下载DOTA外挂下载魔兽争霸WAR3全图下载
数据库·科技·游戏·游戏引擎·游戏程序·ai编程·腾讯云ai代码助手
蓝眸少年CY1 小时前
Hbase - 入门到实战
大数据·数据库·hbase
DROm RAPS1 小时前
SQL中如何添加数据
数据库·sql