small medium large xlarge

Back to: All Forums  Desktop GIS
15 Feb 2009, 15:18
Michael Neubauer (3 posts)

Hi Gary,

I follow the instructions to import a shape-file to GRASS and it does not work with your world_borders file! Importing the cities is no problem, so I guess I suppose my location and everything is ok…

The following error-message appears, when I enter the prompt for the world_borders

” A datum name wgs84 (WGS_1984) was specified without transformation parameters. Note that the GRASS default for wgs84 is towgs84=0.000,0.000,0.000. Projection of input dataset and current location appear to match. Proceeding with import… Layer: world_borders DBMI-DBF driver error: Column ‘CAT’ already exists (duplicate name) Cannot create table. Error in db_execute_immediate()

ERROR: Cannot create table: create table Weltgrenze2 (cat integer, CAT double precision, FIPS_CNTRY varchar ( 80 ), CNTRY_NAME varchar ( 80 ), AREA double precision, POP_CNTRY double precision) “

So can you please help me what is the problem? Maybe it is also a problem with the shape-file…?

Thank you very much Mike

16 Feb 2009, 08:20
Gary Sherman (7 posts)

The problem is the shapefile has an attribute named ‘CAT’. GRASS doesn’t seem to like it when it encounters it in the shapefile. The easiest solution is to open the DBF for the shapefile in something like Open Office or Excel and change the field name. You can also edit the field name with a hex editor if you’re careful. Don’t change the length, just the name (e.g. change it to ‘CAR’).

16 Feb 2009, 18:23
Michael Neubauer (3 posts)

Thanks for the answer Gary, works fine now! But maybe you should change the file on your download-page then, so that not everybody is running in the same problem…

bye mike