Geoserver错误:函数postgis_lib_version() [英] Geoserver ERROR: function postgis_lib_version()

查看:2431
本文介绍了Geoserver错误:函数postgis_lib_version()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在geoserver中,当我需要在创建新的工作区之后创建新的数据存储时,出现此错误

in geoserver whene i need to creat a new data store after to creat new workspace, i have this error

创建数据存储区时出错,请检查参数.错误消息:无法获得连接:错误:函数postgis_lib_version()不存在索引:没有函数与给定的名称和参数类型匹配.您可能需要添加显式类型转换.位置:8

推荐答案

该错误表示您正在尝试添加 PostgreSQL 数据库而不是 PostGIS 数据库.您需要使用以下命令将PostGIS扩展名添加到数据库中:

That error implies that you are attempting to add a PostgreSQL database rather than a PostGIS database. You need to add the PostGIS extension to the database with this command:

psql -d yourdatabase -c "CREATE EXTENSION postgis;"
psql -d yourdatabase -c "CREATE EXTENSION postgis_topology;"

然后,您可以将几何(和地理)存储在表中,然后GeoServer可以将其显示为地图图层.

This will then allow you to store geometries (and geographies) in your tables which GeoServer can then display as map layers.

这篇关于Geoserver错误:函数postgis_lib_version()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆