[GRASS-user] v.in.ogr fails to write a postgres attribute table when importing from a coverage

David Mahoney mahoneyd at unbc.ca
Fri Feb 16 11:31:10 EST 2007


When I try to import from a polygon coverage, using the command

v.in.ogr dsn=blcf_bec layer=PAL out=bec

I get the these warnings and errors:

WARNING: Writing column <ArcIds> with fixed length 40 chars (may be
         truncated)
WARNING: Column name changed: 'BLCF_BEC#' -> 'BLCF_BEC_'
WARNING: Column name changed: 'BLCF_BEC-ID' -> 'BLCF_BEC_ID'
Importing map 18 features...
DBMI-Postgres driver error:
Cannot execute:
insert into bec values ( 3,
'(22:10,-17,-18,-26,28,31,32,33,36,40,44,57,62,65,64,-60,-41,34,30,27,22,11)', 

116724105.46633,       162901.07239, 4, 3982, 'SBS dk', 'SBS', 'dk', '',
'', 'FI00000000', 'D3' )
ERROR:  value too long for type character varying(40)


ERROR: Cannot insert new row: insert into bec values ( 3,

'(22:10,-17,-18,-26,28,31,32,33,36,40,44,57,62,65,64,-60,-41,34,30,27,22,11)',
       116724105.46633, 162901.07239, 4, 3982, 'SBS dk', 'SBS', 'dk', '',
       '', 'FI00000000', 'D3' )


As I see it, the ArcIds field is properly truncated when writing to a
dbf, but fails in Postgres. Is there an easy way to prevent this field
from being written at all?


Thanks

David




More information about the grass-user mailing list