2

I would to run this command in images below via CMD also without opening QGIS GUI on Windows 10

I added "C:\Program Files\QGIS 3.28.2\bin\qgis_process-qgis.bat" to PATH then run my command into QGIS to be sure that everything is okay, the algorithm run until end with expected result without problems, I copied the command from QGIS then closed QGIS and paste that copied command in PowerShell them it doesn't work (see below the images).

The copied command:

qgis_process-qgis.bat run grass7:r.horizon --distance_units=meters --area_units=m2 --ellipsoid=EPSG:7030 --elevation='C:/Users/admin/Downloads/OpenTopography/Biggest_LB_SRTMGL3.tif' --step=10 --start=0 --end=360 --distance=1 ---d=true ---c=true --output='C:\Users\admin\Downloads\tempo' --GRASS_REGION_PARAMETER='35.000000000,37.000000000,33.000000000,35.000000000 [EPSG:4326]' --GRASS_REGION_CELLSIZE_PARAMETER=0

I changed only qgis_process to qgis_process-qgis.bat, I am running QGIS 3.8.28 (Firenze) on Windows 10

enter image description here enter image description here enter image description here

7
  • The PATH is for directories -- The .bat file doesn't belong in the PATH, just the parent directory.
    – Vince
    Commented Jan 28, 2023 at 0:03
  • Can you try replacing the single quotes with double quotes? Commented Jan 28, 2023 at 1:20
  • @Vince, that doesn't help
    – Khaled
    Commented Jan 28, 2023 at 10:09
  • @GabrielDeLuca, thank you that worked
    – Khaled
    Commented Jan 28, 2023 at 10:09
  • @GabrielDeLuca I answered my own question but I found it somehow not respectful so please answer it you by yourself
    – Khaled
    Commented Jan 28, 2023 at 10:16

1 Answer 1

2

The directory "C:\Program Files\QGIS 3.28.2\bin" is already in the PATH enviroment variable, so there is no need to add it again.

I am not very good at executing commands in the Windows Power Shell, but the error indicates that the space between the coordinates and the reference system was not considered within the parameter, which is a character string. On GNU/Linux systems both single and double quotes can be used in the terminal to define a string of characters. But on Windows it seems to be mandatory that only double quotes can be used for that purpose.

Regarding the error that the files in the temporary directory could not be deleted, there is nothing to worry about. Its removal will be part of some regular maintenance task when the machine is rebooted.

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.