Cannot find proj.db

 原因

编译GDAL完成后,我打了个包(包括.so)移动到了另外同环境的机器上。

应用gdal ogr2ogr时候提示找不到proj.db

解决办法:

把proj的share拷贝到另外环境上。 

#gdal新建othershare,proj的share复制过去
mkdir -p /usr/local/gdal-3.6.2/othershare
cp -r /usr/local/proj-9.2.1/share/proj /usr/local/gdal-3.6.2/othershare

#打包压缩
zip othershare.zip /usr/local/gdal-3.6.2/othershare -r

#使用,zip解压到gdal根目录下
export GDAL_HOME=/usr/local/gdal-3.6.2
export PROJ_LIB=$GDAL_HOME/othershare/proj

RFC 73:集成 PROJ6 for WKT2、后期绑定功能、时间支持和统一的 CRS 数据库 — GDAL 文档

Coordinate systems in GDAL, PROJ, and libgeotiff are missing modern capabilities and need a thorough refactoring:

  • The dreaded ad hoc CSV databases in PROJ_LIB and GDAL_DATA are frustrating for users, pose challenges for developers, and impede interoperability of definitions.

  • GDAL and PROJ are missing OGC WKT2 support.

  • PROJ 5.0+ no longer requires datum transformation pivots through WGS84, which can introduce errors of up to 2m, but the rest of the tools do not take advantage of it.

GDAL、PROJ 和 libgeotiff 中的坐标系统缺少现代功能,需要彻底重构:

PROJ_LIB 和 GDAL_DATA 中可怕的临时 CSV 数据库让用户感到沮丧,给开发人员带来了挑战,并阻碍了定义的互操作性。

所以需要配置这2个环境变量。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值