Linux
发布时间:2022-03-31 发布网站:大佬教程 code.js-code.com
大佬教程收集整理的这篇文章主要介绍了st_frechetdistance函数报错解决(postgis)--Linux,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
概述
st_frechetdistance函数报错解决(
Postgis) 一。问题描述
SELECT st_frechetdistance(‘LINE
StriNG(0 0,100 0)‘::geometry, ‘LINE
StriNG(0 0,50 50,100 0)‘::geometry
); ERROR: The GEOS version this
PostgIS binary was c
一。问题描述
SELECT st_frechetdistance(‘LINE
StriNG(0 0,100 0)‘::geometry,‘LINE
StriNG(0 0,50 50,100 0)‘::geometry
);
ERROR: The GEOS version this
PostgIS binary was compiled against (36) doesn‘t support ‘GEOSFechetDistance‘ function (3.7.0+
required)
查看
Postgis版本,发现geos版本确实是36
PostgIS="2.5.0 r16836" [EXTENSION] PG
sql="100" GEOS="3.6.1-CAPI-1.10.1 r0" PROJ="Re
l. 4.9.3,15 August 2016" GDAL="GDAL 2.1.2,released 2016/10/24" LIBXML="2.9.7"
LIBJSON="0.13.1" TOPOLOGY RASTER
2.卸载geos(之前是安装到/usr/local/geos-3.6.1这边的)
cd /usr/local
rm -f -r geos-3.6.1
rm -f -r geos-3.6.1
rm -f -r geos-3.6.1.tar
.bz2
3.重装更高版本的geos
tar -jxf geos-3.7.1.tar
.bz2
cd geos-3.7.1
./con
figure --prefix=/usr/local/geos-3.7.1
make
make install
#编辑
内容如下(之前geos是3.6.1,现改成3.7.1)
include ld
.so.conf.d/*.conf
/usr/local/proj-4.9.3/lib
/usr/local/gdal-2.1.2/lib
/usr/local/geos-3.7.1/lib
/usr/local/json-c-0.13.1/lib
/usr/local/libxml2-2.9.7/lib
#保存配置,重启生效
make uninstall
cd ../
tar -zxvf
Postgis-2.5.0.tar.gz
./con
figure --prefix=/usr/local/pg
sql --with-gdalcon
fig=/usr/local/gdal-2.1.2/bin/gdal-con
fig --with-pgcon
fig=/usr/local/pg
sql/bin/
pg_con
fig --with-geoscon
fig=/usr/local/geos-3.7.1/bin/geos-con
fig --with-projdir=/usr/local/proj-4.9.3 --with-xml2con
fig=/usr/local/libxml2-2.9.7/bin/xml2-con
fig --with-jsondir=/usr/local/json-c-0.13.1
make
make install
6.验证
6-1.依赖验证 ldd /usr/local/pg
sql/lib/
Postgis_topology-2.5
.so
发现
Postgis依赖已经指向新装的geos3.7.1
6-2.版本验证
geos也是变成了3.7.1
SELECT st_frechetdistance(‘LINE
StriNG(0 0,100 0)‘::geometry
);
可以正常执行了
大佬总结
以上是大佬教程为你收集整理的st_frechetdistance函数报错解决(postgis)--Linux全部内容,希望文章能够帮你解决st_frechetdistance函数报错解决(postgis)--Linux所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。