Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question
    
Add some more information, please. What is the actual command you were trying to execute, and what output did you get? –  SS_Rebelious Mar 18 '13 at 15:53
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
thanks; adding the QGIS \bin subdirectory made it available for the cmd. –  Pascal Mar 18 '13 at 16:39
    
thanks for that update –  Pascal Mar 18 '13 at 17:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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