I am using QGIS 2.18.4 in along with GRASS plugin to analyaze vector data. I have to shapefiles, 1) roads and 2) observation points. Both layers are as geographic coordinates (WGS 84). I need to know the closest distance between each point and a given line (the closest too). To acompish this, I thought of using the function v.distance of GRASS. First, I created a mapset in GRASS; then I loaded both files into the mapset using directly "add vector layer" in QGIS. Finally, when using the function "v.in.org.qgis" from GRASS to load the roads, the following error pops up:

boars\Shapefiles\Roads\Red Vial\002_Red_Vial.shp" output=Red snap=-1 
min_area=0.0001 -o --o
Over-riding projection check

Check if OGR layer <002_Red_Vial> contains polygons...
Vector map already exists and will be overwritten
Table linked to vector map does not exist
Unable to create table: 'create table Red (cat integer, UNION integer, TIPO 
varchar ( 22 ), NOMBRE varchar ( 30 ), JURISDICCI varchar ( 14 ), CLASE 
varchar ( 22 ), TRANSITABI varchar ( 24 ), PROVINCIA varchar ( 60 ), PAIS 
varchar ( 15 ), OBSERVACIO varchar ( 50 ), HOJA varchar ( 10 ), FUENTE 
varchar ( 50 ))' 
Finished with error

Roads and observation points

1 Answer 1


Just a first guess, I see one issue:

The column name "UNION" is an SQL reserved word, and probably causing the failure. Can you change that name in the original shapefile?

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.