无法将光栅加载到postgis

时间:2016-01-17 16:37:10

标签: postgresql postgis raster

我想在postgis中加载一个光栅文件 在命令提示符下我正在运行

C:\Program Files\PostgreSQL\9.4\bin>raster2pgsql -I -C -s 4326 D:\Aparna\Data\PNV\pnv_new.tiff public.testraster|psql -d geodjango

我收到以下错误

ERROR: Unable to read raster file: D:\Aparna\Data\PNV\pnv_new.tiff
psql: could not connect to server: Connection refused (0x0000274D/10061)
        Is the server running on host "localhost" (::1) and accepting
        TCP/IP connections on port 5432?
received invalid response to SSL negotiation: -

我的端口是5433.经过几篇帖子我改变了pg_hba.conf中的一行 来自

# IPv4 local connections:
host    all             all             127.0.0.1/32          md5

# IPv4 local connections:
host    all             all             0.0.0.0/0            trust

但它不起作用。我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

如果您没有在端口5432上运行postgres,则需要在命令中添加-p <port>,即-p 5433,但根据错误消息,您似乎在两端都有问题“ - 连接服务器和读取文件。