4

I have QGIS running on a windows operating system. I am willing to use QGIS from command line to follow this procedure.

Unfortunately, i cannot manage to have qgis declared in the command windows. I have added "C:\Program Files (x86)\Quantum GIS Lisboa\" to the path variable. but it does not seem to be sufficient.

Would you have any tip on that ?

EDIT

As proposed by Andre Joost, declaring the \bin subdirectory is a first step. Following procedure, the command I am trying to run is:

 C:\...>qgis --project myproject.qgs --snapshot image.png 
 --width 1500 --height 1000 --extent 831421.30, 6496828.19, 860046.84, 6536520.86

QGIS loads the project and then the cursor freeze/standby. and Qgis answers no more for several minutes and I kill it. the snapshot image.png and companion world file are generated but are empty (7Ko png).

the cmd output is:

_path=C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\Scripts
OSGEO4W home is C:\PROGRA~2\Quantum GIS Lisboa

END of EDIT

best regard, Pascal

AndreJ
77.3k5 gold badges89 silver badges164 bronze badges
asked Mar 18, 2013 at 15:27
1
  • Add some more information, please. What is the actual command you were trying to execute, and what output did you get? Commented Mar 18, 2013 at 15:53

1 Answer 1

3

You have to start qgis.bat, not qgis.exe. The bat is in the \bin subdirectory.

Otherwise the environment variables are not set properly.

If you want to start Qgis from a selfmade batch, you have to use a CALL statement to invoke qgis.bat.


EDIT

I'm afraid you are out of luck with --snapshot:

http://hub.qgis.org/issues/4076

http://hub.qgis.org/issues/7079

It worked with earlier versions of QGIS (when the blog was actually written). I get the same behaviour with Lisboa and Master from last November.

answered Mar 18, 2013 at 15:43
1
  • thanks; adding the QGIS \bin subdirectory made it available for the cmd. Commented Mar 18, 2013 at 16:39

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.