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

Moritz Lennert mlennert at club.worldonline.be
Wed May 28 06:03:46 EDT 2003


Radim Blazek said:
> On Wednesday 28 May 2003 10:07, Moritz Lennert wrote:
>> > 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.
>
> Here you could realy say: How awful! I cannot rename all OGR datasources!
> Etc.
> The problem here, is the same as with table names for attributes (vector
> names
> may have characters not allowed in SQL ('.','-').
> Any ideas for name mangling are welcome. Requirements for new name:
> - similar to original
> - simple enough for user
> - using only chars accepted by SQL (for tables and columns)


Personnally I don't have any problem respecting basic rules about how to
name columns in a table...


>
>> 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 ?
>
> Would it be a problem to do g.copy + g.remove?
>
> As I mentioned in code:
>     /* Vectors are not supported because I don't know how should work:
>     *  1. Should be all attribute tables renamed?
>     *  2. Should be all attribute tables moved to current default
> driver/database?
>     *  3. Should be PostGis tables renamed?
>     *  4. Should be PostGis tables moved to current default PostGis
> database? */
>
> Ideas welcome again.

I'm not familiar enough with 5.1, yet, to be able to judge anything
concerning these questions, so in the meantime g.copy+g.remove will just
do fine.

Moritz




More information about the grass-dev mailing list