On Fri, Jan 23, 2009 at 11:38 PM, Martin Schweizer <[email protected]> wrote: > Hi. > > I have the following problem with a Shape-file. First the history: I > imported once a ascii-file, then i exported it to a shape-file. Then I > changed some values with QGis and now I would like to re-import the file > (shp). So I used the command v.in.ogr. > > v.in.ogr {dsn=/home/....../Städte Noricum Romanum5.shp} > output=Staedte_Noricum min_area=0.0001 snp=-1 > > And the Result is (I tried to translate it to english): > > Spaltenname wurde geändert: 'cat' -> 'cat_' (in english: Column-name > changed: 'cat' -> 'cat_') > DBMI-DBF driver error: > Column 'cat_' already exists (duplicate name) > Cannot create table. > Error in db_execute_immediate() > Kann Tabelle nicht erzeugen (in english: Could not create table): > 'create table Staedte_Noricum2 (cat integer, cat_ integer, cat_ integer, > dbl_1 double precision, dbl_2 double precision, str_1 varchar ( 80 ), > str_2 varchar ( 80 ), str_3 varchar ( 80 ), str_4 varchar ( 80 ), str_6 > varchar ( 80 ), int_1 integer)' > > So: What can I do to import this Shape-file correctly?
Hi, you have basically two options: - either remove the superfluous cat_ column in the DBF file (Openoffice can do that, see http://grass.osgeo.org/wiki/Openoffice.org_with_SQL_Databases#DBF_files_.28OpenOffice.org_2.x.29 ) - or use the cnames option of v.in.ogr to assign new column names on the fly http://grass.osgeo.org/gdp/html_grass64/v.in.ogr.html Markus _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
