Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking at a piece of work to deploy QGIS as the standard within an organisation. There is an existing piece of software that I need to link to QGIS so that when a button is pressed within the app, it opens QGIS, opens a given project and pans to the correct location (using coordinates in the application).

If I were to call QGIS from commandline, what would I need to a) open a given project and b) how would I pass coordinates from one system to automate the map window pan to location.

I'm guessing that it is going to be some python code? That being the case, are there any examples of similar ways of starting QGIS?


share|improve this question
Much simpler than I thought (d.oh), using this link… – Mark Apr 26 '13 at 7:35
up vote 5 down vote accepted

You should be able to do this (in a slightly modified form) with just command line options.


Command line option --project

Starting QGIS with an existing project file is also possible. Just add the command line option --project followed by your project name and QGIS will open with all layers loaded described in the given file.

Command line option --extent

To start with a specific map extent use this option. You need to add the bounding box of your extent in the following order separated by a comma:

--extent xmin,ymin,xmax,ymax

So if you can convert your "target coordinates" to an extent (which probably makes sense anyway - it allows you to make a centre location and a zoom level) then you may not need any code on the QGIS side. Just build a command line and call QGIS with that.

share|improve this answer
Thanks @BradHards - just the answer I was looking for (can't you tell I'm a total noob at this :-)) – Mark Apr 26 '13 at 7:41

Your Answer


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.