Cannot find proj.db

 原因

Cannot find proj.db_第1张图片

编译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个环境变量。

 

你可能感兴趣的:(PostGIS,服务器,linux)