[GRASS5] GRASS5.1: trouble importing shape file with v.in.ogr (+ g.rename vectors)

Moritz Lennert mlennert at club.worldonline.be
Wed May 28 04:07:15 EDT 2003


Radim Blazek said:
> 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.
>

That was it. Thanks a lot, Radim.

Now I have the next problem:

g.rename vect=cp_clean,cp
WARNING: Vectors are not supported by g.rename

Is there another way to rename vector files in 5.1 ?

Moritz




More information about the grass-dev mailing list