In QGIS 3, I created points with ELEV value to make a topography. Then I created contour lines from those points, using the Contour plugin. The layer is of Line type.

enter image description here

Then I am trying to generate a DEM from those contour lines using GRASS. However, I get this error when trying to import the vector contour layer into GRASS:

v.in.ogr "input=elevation points contours.shp" output=contours type=line snap=-1 min_area=0.0001 -o --o
Over-riding projection check
Check if OGR layer <elevation points contours> contains polygons...
La couche vectorielle existe déjà et va être écrasé
La table liée à la carte vecteur n'existe pas
Creating attribute table for layer <elevation points contours>...
DBMI-SQLite erreur de pilote :
Error in sqlite3_prepare():
near "index": syntax error
DBMI-SQLite erreur de pilote :
Error in sqlite3_prepare():
near "index": syntax error
Impossible de créer la table : 'create table contours (cat integer, index integer, ELEV double precision, label varchar ( 254 ))'
Finished with error

What is wrong?

1 Answer 1


For those interested, a field is name "index" and that's what qgis/grass don't like (please dev make them more robust). So in the Qgis processing tools, I was able to use Vector Table > Rename field to change this name. Now it works.

  • 1
    The limitation in column names is not from QGIS nor GRASS. The database backend for GRASS vectors is sqlite and that's the source of the limitation. And, the fact the sqlite does not allow SQL reserved words as column names is what makes it robust.
    – Micha
    May 23, 2022 at 19:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.