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

Jonathan Aguero-Valverde jua130 at psu.edu
Sun May 25 15:20:47 EDT 2008


Ok, I am using Vista ~I know, I know, I shouldn't but it came with my laptop 
:-(
Anyway this is the debug portion we need:

D1/3: dbln file: D:/GRASS_DB/Wa_pg_ft/jaguero/vector/cent_g/dbln
D1/3: dbln: 1 public.cent_g cat host=localhost,dbname=thesisWA,port=6543 pg

You see the port was hardcoded just not by v.distance but by grass itself in 
the dbln file. I moved this database and the grass LOCATION from a pc where 
the PG port was 6543 to another PC where the port is 5432.

I manually change the port in the dbln file and IT WORKS NOW!!!!!
Is there a way to change all the dbln files at the same time?

Thanks

Jonathan Aguero-Valverde
PhD. Candidate
The Thomas D. Larson
Pennsylvania Transportation Institute
The Pennsylvania State University

----- Original Message ----- 
From: "Moritz Lennert" <mlennert at club.worldonline.be>
To: "Jonathan Aguero-Valverde" <jua130 at psu.edu>
Cc: <grass-windows at lists.osgeo.org>
Sent: Sunday, May 25, 2008 5:56 AM
Subject: Re: [GRASS-windows] problem with v.distance in Windows


> 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
>
> _______________________________________________
> grass-windows mailing list
> grass-windows at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-windows
> 



More information about the grass-windows mailing list