3

I am unable to use GRASS algorithms in QGIS 2.0.1 (on windows xp). I've already configured the GRASS path. The algorithms seems to work correctly (I cannot see errors in the log), however in the end the following windows appears:

Oooops! The following output layers could not be open Output layer: C:\DOCUME~1\MCORDI~1\IMPOST~1\Temp\processing\ebc399ac72364b68aad151d232a1379a\output.shp The above files could not be opened, which probably indicates that they were not correctly produced by the executed algorithm. [...] It seems that GRASS is not correctly installed and configured in your system. Please install it before running GRASS algorithms.

Here below the log for the v.distance command

Algorithm v.distance - Finds the nearest element in vector map 'to' for elements in vector map 'from'. started g.proj -c proj4="+proj=utm +zone=32 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs" v.in.ogr min_area=0.0001 snap=-1 dsn="E:/Tavolo Tecnico AUSL-Pr/GIS" layer=asma_DOM_select output=tmp13811305945511 --overwrite -o v.in.ogr min_area=0.0001 snap=-1 dsn="E:/GIS DataBase" layer=eurostreets_EmiliaRomagna_FRC04 output=tmp13811305945512 --overwrite -o g.region n=4999266.578 s=4848836.96069 e=801201.169359 w=516043.246024 res=1 v.distance from=tmp13811305945511 to=tmp13811305945512 upload=cat column=mindist output=output6f83c8f8869a4a41bdbc595d37c12891 --overwrite v.out.ogr -e input=output6f83c8f8869a4a41bdbc595d37c12891 dsn="C:\DOCUME~1\MCORDI~1\IMPOST~1\Temp\processing\ebc399ac72364b68aad151d232a1379a" format=ESRI_Shapefile olayer=output type=auto

E:\PROGRA~1\QGISDU~1\bin>set HOME=C:\Documents and Settings\mcordioli

E:\PROGRA~1\QGISDU~1\bin>set GISRC=C:\Documents and Settings\mcordioli.qgis2\processing\processing.gisrc

E:\PROGRA~1\QGISDU~1\bin>set GRASS_SH=E:\Programmi Lavoro\Quantum GIS Lisboa\apps\msys\bin\sh.exe

E:\PROGRA~1\QGISDU~1\bin>set PATH=E:\Programmi Lavoro\Quantum GIS Lisboa\apps\msys\bin;E:\Programmi Lavoro\Quantum GIS Lisboa\apps\msys\lib;E:\PROGRA~1\QGISDU~1\apps\grass\grass-6.4.3\bin;E:\PROGRA~1\QGISDU~1\apps\msys\bin;E:\PROGRA~1\QGISDU~1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;E:\PROGRA~1\QGISDU~1\apps\msys\bin;E:\PROGRA~1\QGISDU~1\apps\Python27\Scripts;E:\PROGRA~1\QGISDU~1\apps\qgis\bin;E:\PROGRA~1\QGISDU~1\apps\grass\grass-6.4.3\lib

E:\PROGRA~1\QGISDU~1\bin>set WINGISBASE=E:\Programmi Lavoro\GRASS GIS 6.4.3

E:\PROGRA~1\QGISDU~1\bin>set GISBASE=E:\Programmi Lavoro\GRASS GIS 6.4.3

E:\PROGRA~1\QGISDU~1\bin>set GRASS_PROJSHARE=E:\Programmi Lavoro\GRASS GIS 6.4.3\share\proj

E:\PROGRA~1\QGISDU~1\bin>set GRASS_MESSAGE_FORMAT=gui

E:\PROGRA~1\QGISDU~1\bin>if "" == "" set PATH=E:\Programmi Lavoro\GRASS GIS 6.4.3\bin;E:\Programmi Lavoro\GRASS GIS 6.4.3\lib;E:\Programmi Lavoro\Quantum GIS Lisboa\apps\msys\bin;E:\Programmi Lavoro\Quantum GIS Lisboa\apps\msys\lib;E:\PROGRA~1\QGISDU~1\apps\grass\grass-6.4.3\bin;E:\PROGRA~1\QGISDU~1\apps\msys\bin;E:\PROGRA~1\QGISDU~1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;E:\PROGRA~1\QGISDU~1\apps\msys\bin;E:\PROGRA~1\QGISDU~1\apps\Python27\Scripts;E:\PROGRA~1\QGISDU~1\apps\qgis\bin;E:\PROGRA~1\QGISDU~1\apps\grass\grass-6.4.3\lib

E:\PROGRA~1\QGISDU~1\bin>if not "" == "" set PATH=E:\Programmi Lavoro\GRASS GIS 6.4.3\bin;E:\Programmi Lavoro\GRASS GIS 6.4.3\lib;;E:\Programmi Lavoro\GRASS GIS 6.4.3\bin;E:\Programmi Lavoro\GRASS GIS 6.4.3\lib;E:\Programmi Lavoro\Quantum GIS Lisboa\apps\msys\bin;E:\Programmi Lavoro\Quantum GIS Lisboa\apps\msys\lib;E:\PROGRA~1\QGISDU~1\apps\grass\grass-6.4.3\bin;E:\PROGRA~1\QGISDU~1\apps\msys\bin;E:\PROGRA~1\QGISDU~1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;E:\PROGRA~1\QGISDU~1\apps\msys\bin;E:\PROGRA~1\QGISDU~1\apps\Python27\Scripts;E:\PROGRA~1\QGISDU~1\apps\qgis\bin;E:\PROGRA~1\QGISDU~1\apps\grass\grass-6.4.3\lib

E:\PROGRA~1\QGISDU~1\bin>set GRASS_VERSION=6.4.0

E:\PROGRA~1\QGISDU~1\bin>if not "" == "" goto langset

E:\PROGRA~1\QGISDU~1\bin>FOR /F "usebackq delims==" %i IN ("E:\Programmi Lavoro\GRASS GIS 6.4.3\etc\winlocale") DO @set LANG=%i

E:\PROGRA~1\QGISDU~1\bin>set PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PY

E:\PROGRA~1\QGISDU~1\bin>set PYTHONPATH=;E:\Programmi Lavoro\GRASS GIS 6.4.3\etc\python;E:\Programmi Lavoro\GRASS GIS 6.4.3\etc\wxpython\n

E:\PROGRA~1\QGISDU~1\bin>g.gisenv.exe set="MAPSET=PERMANENT"

E:\PROGRA~1\QGISDU~1\bin>g.gisenv.exe set="LOCATION=temp_location"

E:\PROGRA~1\QGISDU~1\bin>g.gisenv.exe set="LOCATION_NAME=temp_location"

E:\PROGRA~1\QGISDU~1\bin>g.gisenv.exe set="GISDBASE=C:\DOCUME~1\MCORDI~1\IMPOST~1\Temp\processing\grassdata"

E:\PROGRA~1\QGISDU~1\bin>g.gisenv.exe set="GRASS_GUI=text"

E:\PROGRA~1\QGISDU~1\bin>g.proj -c proj4="+proj=utm +zone=32 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs"

E:\PROGRA~1\QGISDU~1\bin>v.in.ogr min_area=0.0001 snap=-1 dsn="E:/Tavolo Tecnico AUSL-Pr/GIS" layer=asma_DOM_select output=tmp13811305945511 --overwrite -o

E:\PROGRA~1\QGISDU~1\bin>v.in.ogr min_area=0.0001 snap=-1 dsn="E:/GIS DataBase" layer=eurostreets_EmiliaRomagna_FRC04 output=tmp13811305945512 --overwrite -o

E:\PROGRA~1\QGISDU~1\bin>g.region n=4999266.578 s=4848836.96069 e=801201.169359 w=516043.246024 res=1

E:\PROGRA~1\QGISDU~1\bin>v.distance from=tmp13811305945511 to=tmp13811305945512 upload=cat column=mindist output=output6f83c8f8869a4a41bdbc595d37c12891 --overwrite

E:\PROGRA~1\QGISDU~1\bin>v.out.ogr -e input=output6f83c8f8869a4a41bdbc595d37c12891 dsn="C:\DOCUME~1\MCORDI~1\IMPOST~1\Temp\processing\ebc399ac72364b68aad151d232a1379a" format=ESRI_Shapefile olayer=output type=auto

E:\PROGRA~1\QGISDU~1\bin>exit Converting outputs Loading resulting layers Algorithm v.distance - Finds the nearest element in vector map 'to' for elements in vector map 'from'. finished

5
  • GRASS seems to correctly work on my machine if I use the GRASS plugin for QGIS 1.8.0...
    – mic_cord
    Oct 7, 2013 at 9:17
  • However v.distance does not work in modeler (sextante) for QGIS 1.8.0. I suppose it is a problem linked to the definition of the GRASS mapset (automatic in sextante, manual in GRASS plugin...)
    – mic_cord
    Oct 7, 2013 at 9:53
  • .. "does not work" - does v.distance deliver results or crashes or doesn't give the output to the next step?
    – markusN
    Oct 8, 2013 at 16:49
  • You can see the log above. The final message delivered by the algorithm is "The above files could not be opened, which probably indicates that they were not correctly produced by the executed algorithm"
    – mic_cord
    Oct 9, 2013 at 8:47
  • It seems that the modeller doesn't "see" any more the output.shp produced by v.out.ogr? Perhaps you need to open a bugreport in the QGIS tracker for this.
    – markusN
    Oct 11, 2013 at 7:21

1 Answer 1

4

v.distance does not currently work in QGIS processing. The first problem is that for the dist relation option, the column where the distance is to be stored is chosen from the "to" input layer (it must be chosen from the "from" input layer). This can be fixed by changing ~/.qgis2/python/processing/grass/description/v.distance.txt: You need to change the "to" to "from" as shown below

ParameterTableField|column|Column where values specified by 'upload' option will be 
uploaded|to|-1|False

to

ParameterTableField|column|Column where values specified by 'upload' option will be
uploaded|from|-1|False

After fixing this, v.distance runs for a while, but fails to produce the distances, so there seems to be something more that is wrong.

There are issues for this (http://hub.qgis.org/issues/5954 and http://hub.qgis.org/issues/8322).

Your Answer

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

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