[GRASS-user] Problem importing TauDEM shapefile

Markus Neteler neteler at osgeo.org
Sat Mar 28 15:45:09 EDT 2009


2009/3/28 Jarek Jasiewicz <jarekj at amu.edu.pl>:
> Hi
> When I try to import TauDEM shape file I recive the eror:
>
> create table a (cat integer, LINKNO integer, DSLINKNO integer, USLINKNO1
> integer, USLINKNO2 integer, DSNODEID double precision, Order integer, Length
> double precision, Magnitude integer, DS_Cont_Ar double precision, Drop
> double precision, Slope double precision, Straight_L double precision,
> US_Cont_Ar double precision, WSNO integer, DOUT_END double precision,
> DOUT_START double precision, DOUT_MID double precision)
> Error in db_execute_immediate()
>
> What wrong is in the table definition???

(did you copy the entire error? If yes, you seem to use an older GRASS
version)

In GRASS 6.4, I get:

echo "create table a (cat integer, LINKNO integer, DSLINKNO integer,
USLINKNO1 integer, USLINKNO2 integer, DSNODEID double precision, Order
integer, Length double precision, Magnitude integer, DS_Cont_Ar double
precision,Drop double precision, Slope double precision, Straight_L
double precision, US_Cont_Ar double precision, WSNO integer, DOUT_END
double precision, DOUT_START double precision, DOUT_MID double
precision)" | db.execute
DBMI-DBF driver error:
SQL parser error: syntax error, unexpected ORDER, expecting NAME
processing 'Order'
in statement:
create table a (cat integer, LINKNO integer, DSLINKNO integer,
USLINKNO1 integer, USLINKNO2 integer, DSNODEID double precision, Order
integer, Length double precision, Magnitude integer, DS_Cont_Ar double
precision, Drop double precision, Slope double precision,
Straight_Ldouble precision, US_Cont_Ar double precision, WSNO integer,
DOUT_END double precision, DOUT_START double precision, DOUT_MID
double precision)

Error in db_execute_immediate()

ERROR: Error while executing: 'create table a (cat integer, LINKNO integer,
...

One column is called "Order" which is a reserved SQL word. Please use
a different
column name.
If this is v.in.ogr, there is the cnames option to rename on the fly
during import.

Markus


More information about the grass-user mailing list