首页 > 其他分享 >rt_raster_to_gdal: Could not load the output GDAL driver

rt_raster_to_gdal: Could not load the output GDAL driver

时间:2022-12-15 11:48:03浏览次数:59  
标签:rt raster ENABLE -- Could postgis GDAL POSTGIS gdal

问题记录:
postgis 安装后不能执行以下语句,查询入库的 tif 文件

SELECT ST_AsGDALRaster(rast, 'GTiff') As rastjpg FROM radar_data_xx WHERE rid=1;

解决办法:

1.  确认是否安装 GDAL ,否则安装GDAL  https://www.cnblogs.com/luochunxi/p/16981351.html

apt-get install gdal-bin
ogrinfo --version
apt-get install libgdal-dev
gdal-config --version

2. 添加环境变量,让 postgis 能找到  https://www.osgeo.cn/postgis-manual/postgis_administration.html#raster_configuration

vim /etc/profile
# 添加变量
POSTGIS_ENABLE_OUTDB_RASTERS=1
POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL
GDAL_DATA=/usr/share/gdal

source /etc/profile

如果是容器的话,从新在进入后环境变量没了 https://blog.csdn.net/tianyi520jx/article/details/127112668
vim  /root/.bashrc
# 添加 
source /etc/profile

source /root/.bashrc

3 如还是不行,重新启动容器,在命令上添加环境变量

docker run -t --name postgisxx --restart always -e POSTGIS_GDAL_ENABLED_DRIVERS='ENABLE_ALL' -e  POSTGIS_ENABLE_OUTDB_RASTERS=1 -e GDAL_DATA='/usr/share/gdal' -e POSTGRES_USER='nb_db' -e POSTGRES_PASSWORD='htht@2022' -e ALLOW_IP_RANGE=0.0.0.0/0 -p 8431:5432 -v /home/postgisxx:/var/lib/postgresql/data -d postgisxx1:latest

 

标签:rt,raster,ENABLE,--,Could,postgis,GDAL,POSTGIS,gdal
From: https://www.cnblogs.com/luochunxi/p/16984593.html

相关文章

  • 保护客户代码和应用安全,CodeArts有7招
    摘要:华为CodeArts致力于各种措施与方案,确保用户研发资产的安全。华为云有IAM统一认证。CodeArts原名“DevCloud”上每个项目均设有权限管理机制。CodeArts让企业级用户使......
  • devexpress report 分组统计不正常问题
    这个report分组功能要求给的数据源排序必须排正确了,比如产品苹果红色苹果绿色 橘子黄色,橘子绿色 这个水果按水果排序,则苹果一组,橘子一组,如果上......
  • win10 系统中 如何在 Virtualenv 中使用 idle
    1,下载安装Virtualenv pipinstallvirtualenv2,创建虚拟环境进入要创建的目录后,创建虚拟环境的文件夹,进入文件夹,创建虚拟环境C:\Users\DP\Documents\pyWork......
  • python错误ImportError: No module named _ssl(centos下)
    python错误ImportError:Nomodulenamed_ssl(centos下)场景安装好python之后,导入ssl模块报错:ImportError:Nomodulenamed_ssl解决办法1.查看openssl,openssl-dev......
  • 使用Arthas热更新线上代码
    一般线上问题比开发环境的问题更难解决,一个主要的原因便在于开发态可以任意debug断点调试,而线上环境一般不允许远程调试,所以在实践中,我一般习惯用Arthas来定位线上的问......
  • Crt常用设置
    目录自动批量创建会话标签自动登录脚本自动保存会话日志自动批量创建会话标签https://gitee.com/jiyuchen1/crtSessionTemplate自动登录脚本#$language="VBScript"#......
  • CF724E Goods transportation
    链接:https://www.luogu.com.cn/problem/CF724E题目描述:有\(n\)个城市,每个城市生产了\(p_{i}\)个货物,最多可以卖掉\(s_{i}\)个货物。对于每两个城市\((i,j)\),如果\(i<j\),则......
  • secureCRT yyds
    上一篇使用mobaxterm作为上位机,使用lrzlsz命令和开发收发文件,但是在使用中经常出现卡死,文件无法发送给开发板。后来找了其他软件SecureCRT,这是个付费软件。在知乎平台找到......
  • java.security.NoSuchAlgorithmException:Cannot find any provider supporting AES/C
    由于小程序开发的需求,需要在后台对微信接口返回的敏感信息加密数据进行解密,以便开发使用,但是,在解密时出现以下异常:java.security.NoSuchAlgorithmException:Cannotfindan......
  • 通过WebRTC 的 RTSP 视频获取
    背景由于项目需要,需要使用摄像头在Web页面上展现,由于海康威视摄像头推出的流为rtsp流,已知存在的基于FFmpeg的方案延迟都太高,所以就项目最终选择基于此方案。方案说明webr......