[GRASS5] GRASS5.1: trouble importing shape file with v.in.ogr (+ g.rename vectors)
Radim Blazek
blazek at itc.it
Wed May 28 05:07:03 EDT 2003
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)
> 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.
Radim
More information about the grass-dev
mailing list