[GRASSLIST:5844] Re: error importing shapefile with v.in.ogr

Moritz Lennert mlennert at club.worldonline.be
Fri Feb 18 10:57:35 EST 2005


On Fri, February 18, 2005 12:58, LJunek at t-online.de said:
> Dear users,
> I'd like to import a shapefile into GRASS6.0 and use v.in.ogr .
> The module doesn't create an attribute table:
>
> v.in.ogr dsn=. output=le_ausschr_hg_biotopkartierung_biotope
> layer=le_ausschr_hg_biotopkartierung_biotope
> PROJ_INFO file not found for location landschaftselemente
> PROJ_UNITS file not found for location landschaftselemente
> Projection of input dataset and current location appear to match.
> Proceeding with import...
> Layer: le_ausschr_hg_biotopkartierung_biotope
> DBMI-DBF driver error:
> SQL parser error in statement:
> create table le_ausschr_hg_biotopkartierung_biotope (cat integer, ID
> integer, AREA double precision, PERIMETER double precision, BIOTOPE_S_
> integer, BIOTOPE_S2 integer, EB integer, ST integer, SM integer, ENUM
> varchar ( 16 ), NAM varchar ( 25 ), FLA double precision, SA double
> precision, W double precision, WHERE integer, KARTE integer, NUMMER
> integer, RECNR integer, FLAECHE double precision, XKOOR double
> precision, YKOOR double precision, BIOTOP_NR integer)
> Error in db_execute_immediate()
>
> ERROR: Cannot create table: create table
>        le_ausschr_hg_biotopkartierung_biotope (cat integer, ID integer,
>        AREA double precision, PERIMETER double precision, BIOTOPE_S_
>        integer, BIOTOPE_S2 integer, EB integer, ST integer, SM integer,
>        ENUM varchar ( 16 ), NAM varchar ( 25 ), FLA double precision, SA
>        double precision, W double precision, WHERE integer, KARTE
> integer,
>        NUMMER integer, RECNR integer, FLAECHE double precision, XKOOR
>        double precision, YKOOR double precision, BIOTOP_NR integer)
>
> I already moved the ID column to the first position, nothing changes.
> So what could I do else?

Try renaming the 'where' column to something else. Where is a reserved word in
sql.




More information about the grass-user mailing list