[GRASS-user] db.out.ogr: Syntax Correction

Rich Shepard rshepard at appl-ecosys.com
Mon Mar 14 14:20:20 EDT 2011


On Mon, 14 Mar 2011, Micha Silver wrote:

> Hmmm is right.
> On my (debian) I get:

> # check columns in a vector
GRASS 6.4.1svn (Nevada-aea):~/grassdata > v.info -c at_risk_species
Displaying column types/names for database connection of layer 1:
INTEGER|cat
INTEGER|EO_ID_NUM
DOUBLE PRECISION|EO_NUM
CHARACTER|SNAME
CHARACTER|SCOMNAME
  ...

> # Which current db connection?
GRASS 6.4.1svn (Nevada-aea):~/grassdata > v.db.connect -p at_risk_species
Vector map <at_risk_species at PERMANENT> is connected by:
layer <1> table <at_risk_species> in database
</home/rshepard/grassdata/Nevada-aea/PERMANENT/dbf/> through driver <dbf>
with key <cat>

> # Copy to postgres
> GRASS 6.4.0RC6 (ITM):~ > db.copy from_dri=dbf to_dri=pg to_data="host=localhost,dbname=geodata"
> from_tab=idan_catchments to_tab=idan_catchments
GRASS 6.4.1svn (Nevada-aea):~/grassdata > db.copy from_dri=dbf to_dri=pg
to_data="host=localhost,dbname=at_risk_species" from_tab=at_risk_species
to_tab=at_risk_species
dbmi: Protocol error
WARNING: Unable to open database <dbf> by driver
          <host=localhost,dbname=nevada>

   Same problem as with 6.5svn (the running version before yesterday).

> Why don't you try with g.copy?

   My reading of the man page is that g.copy copies maps from a non-current
mapset to the current one. I don't see how to use this to copy attribute
data from dbf to pg.

Thanks,

Rich



More information about the grass-user mailing list