[GRASS-user] Re: grass-user Digest, Vol 59, Issue 33
Richard Chirgwin
rchirgwin at ozemail.com.au
Tue Mar 15 19:17:47 EDT 2011
On 16/03/11 3:00 AM, grass-user-request at lists.osgeo.org wrote:
> Message: 3 Date: Tue, 15 Mar 2011 08:26:22 -0700 (PDT) From: Rich
> Shepard <rshepard at appl-ecosys.com> Subject: Re: [GRASS-user]
> db.out.ogr: Syntax Correction [UPDATED] To:
> grass-users at lists.osgeo.org Message-ID:
> <alpine.LNX.2.00.1103150824100.16672 at salmo.appl-ecosys.com>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed On Tue, 15
> Mar 2011, Rich Shepard wrote:
>> > Why is grass65 looking for a login file named grasslogin64? When is this
>> > file created and/or updated? If that's the reason db.copy is not working,
>> > how do I create that hidden file and move on?
> I assumed that I did not need to run db.login since I own the database.
> Regardless, I ran db.login and ~/.grasslogin64 was created. Now I'm back to
> not being able to open the source dbf table:
>
> GRASS 6.5.svn (Nevada-aea):~/grassdata> db.copy from_dri=dbf to_dri=pg
> to_data="host=localhost,dbname=nevada" from_tab=huc8 to_tab=huc8
> dbmi: Protocol error
> WARNING: Unable to open database<dbf> by driver<nevada>
>
> The driver is specified as 'from_dri=dbf' why's it think it's the
> destination database name?
>
> Rich
Rich,
db.copy *within* a mapset runs into a problem: a mapset only holds one
set of database connection parameters. So it's presenting your PG
credentials to the DBF driver, and failing.
Use two mapsets with separate database connections, eg:
Location/Mapset/Nevada_1 - original map with dbf connection (no login
required)
Location/Mapset/Nevada_2 - destination mapset with pg connection and
login set
With Grass-GIS launched in the destination mapset:
g.copy vect=map at Nevada_2,map
This will work. I do it all the time - for eg, if I'm working offsite,
to switch between local and server databases.
Cheers,
Richard
More information about the grass-user
mailing list