Nikolay Yasinskiy
Nikolay Yasinskiy

Reputation: 237

HydroSheds basins aren't importing to GRASS (cannot create attribute table)

Steps to reproduce the error:

  1. Download any region from https://www.hydrosheds.org/products/hydrobasins
  2. Create a WGS84 location.
  3. Try to import any .shp from HydroSHEDS Basins with a command v.in.ogr input=path_to_shp output=basin
  4. See the error
Creating attribute table for layer <basin>...
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 basin (cat integer, HYBAS_ID
       integer, NEXT_DOWN integer, NEXT_SINK integer, MAIN_BAS integer,
       DIST_SINK double precision, DIST_MAIN double precision, SUB_AREA
       double precision, UP_AREA double precision, PFAF_ID integer, SIDE
       varchar ( 6 ), LAKE integer, ENDO integer, COAST integer, ORDER
       integer, SORT integer)'

  1. Add the -t flag to command and see the error gone away.

What is the cause of this error and the solution?

I was expecting clean execution.

Upvotes: 0

Views: 17

Answers (0)

Related Questions