[GRASS5] GRASS5.1: trouble importing shape file with v.in.ogr

Radim Blazek blazek at itc.it
Tue May 27 11:35:17 EDT 2003


On Tuesday 27 May 2003 16:33, Moritz Lennert wrote:
> Hello,
>
> I'm trying to import a shapefile into GRASS5.1 using v.in.ogr. I get the
> following message when trying to import:
>
> v.in.ogr dsn=/home/mlennert out=cp_in layer=cp
> dbmi: Protocol error
> dbmi: Protocol error
> ERROR: Cannot create table: create table cp_in (cat integer, CP_ID integer,
>        PC4_CODE varchar ( 4 ), PC4_NAME varchar ( 40 ), LANG1 varchar ( 3
> ), PC4_NAME2 varchar ( 40 ), LANG2 varchar ( 3 ), X integer, Y integer,
> SUPERFICIE integer, Z1_81_100 integer, DENSITé97 integer, POP97_81 integer,
>        BEST_SCORE integer, BEST_SCORE integer, PART_DE_ME double precision,
>        PART_DES_M double precision, BOITES_à_C integer, PART1 integer)
>
>
> I can import the file with v.format.
>
> Moritz

Problem seems to be in 'é' and 'à' which dbf driver does not accept, 
(but postgres yes). Another problem is BEST_SCORE 2x, what is original name?
BEST-SCORE? DBF may contain characters which are not accepted by SQL
('#','-'), these chars are currently simply replaced by '_', which probably
resulted in duplicate BEST_SCORE.
You can try to rename column names of input table.

Radim




More information about the grass-dev mailing list