[GRASS-windows] problem with v.distance in Windows

Moritz Lennert mlennert at club.worldonline.be
Sun May 25 05:56:06 EDT 2008


On Sat, May 24, 2008 23:44, Jonathan Aguero-Valverde wrote:
> I am experienced some trouble with v.distance in my win box. I am running
> the latest version 6.3.0
> my tables are in PG, my db.connect gives:
>
> db.connect -p
> driver:pg
> database:host=localhost,dbname=thesisWA,port=5432
> schema:public
> group:
>
> but when I run v.distance I get:
> $ v.distance from=cent_g to=road_inv_d6_b dmax=5 upload=cat,dist
> column=cat_ce
> nt,distance
> DBMI-Postgres driver error:
> Cannot connect to Postgres: could not connect to server: Connection
> refused
> (0x0000274D/10061)
>         Is the server running on host "localhost" and accepting
>         TCP/IP connections on port 6543?
>
> GRASS_INFO_WARNING(4116,1): Cannot open database
> 'host=localhost,dbname=thesisWA,port=6543'
> GRASS_INFO_END(4116,1)
>
> GRASS_INFO_ERROR(4116,2): Unable to open database
> <host=localhost,dbname=thesisWA,port=6543> by driver <pg>
> GRASS_INFO_END(4116,2)
>
> It looks like somehow the port is hardcoded to 6543 in v.distance. If I
> tried db.tables -p it gives me the list of my tables so it looks like my
> connection settings are fine.


v.distance does not define the db settings itself, but uses standard db
functions. Maybe you could run v.distance in debug mode (g.gisenv
set=DEBUG=3) and see if that gives us any useful information.

Please also tell us which version of Windows you are using.

Moritz



More information about the grass-windows mailing list