[GRASS-user] Column names of sqlite attribute tables while using v.import

Johannes Radinger johannesradinger at gmail.com
Tue May 16 13:16:03 PDT 2017


Hi all,

I tried to import a polygon shape, specifically the HydroBASINS from
hydrosheds.org however I got following error:

v.import input=/.../Hydrosheds/hybas_na_lev00_v1c/hybas_na_lev00_v1c.shp
layer=hybas_na_lev00_v1c output=hybas_na_lev00_v1c
WARNING: All available OGR layers will be imported into vector map
<hybas_na_lev00_v1c>
Check if OGR layer <hybas_na_lev00_v1c> contains polygons...
DBMI-SQLite driver error:
Error in sqlite3_prepare():
near "ORDER": syntax error
DBMI-SQLite driver error:
Error in sqlite3_prepare():
near "ORDER": syntax error
ERROR: Unable to create table: 'create table hybas_na_lev00_v1c (cat
integer, HYBAS_ID double precision, NEXT_DOWN double precision, NEXT_SINK
double precision, MAIN_BAS double precision, DIST_SINK double precision,
DIST_MAIN double precision, SUB_AREA double precision, UP_AREA double
precision, ENDO integer, COAST integer, ORDER integer, SORT double
precision, PFAF_1 integer, PFAF_2 integer, PFAF_3 integer, PFAF_4 integer,
PFAF_5 integer, PFAF_6 integer, PFAF_7 integer, PFAF_8 integer, PFAF_9
integer, PFAF_10 double precision, PFAF_11 double precision, PFAF_12 double
precision)'
ERROR: Unable to import
</.../Hydrosheds/hybas_na_lev00_v1c/hybas_na_lev00_v1c.shp>

So I guess ORDER is a sqlite specific word that is reserved for SQL
operations and is not allowed as column name? Is this a general thing of
sqlite or is this just related to v.import/v.in.ogr and the creation of the
sqlite table?

cheers,
Johannes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170516/6db15c88/attachment.html>


More information about the grass-user mailing list