I am new to QGIS script-writing and am using the PyQGIS Cookbook documentation to create a script which will read in a list of csv files and load them as layers. I'll want to define the style of the layers and then display them in the QGIS canvas and still have the QGIS functionality for manually analyzing the results. I am confused by what the PyQGIS Cookbook defines as standalone vs custom scripts. Standalone seems to be defined as "the" GUI is disabled, i.e., qgs = QgsApplication([], False) while Custom means "the" GUI is enabled, i.e., qgs = QgsApplication([], True).

Specifically, what GUI is inferred?

Are we talking about the QGIS GUI, e.g., the QGIS canvas?

1 Answer 1


According to the PyQGIS Developer Cookbook (testing version) on pages 3-4:

1.4.2 Using PyQGIS in custom applications

The only difference between Using PyQGIS in standalone scripts and a custom PyQGIS application is the second argument when instantiating the QgsApplication. Pass True instead of False to indicate that we plan to use a GUI.

So a standalone script is essentially lines of code used to do some processing without the need to use any GUI methods.

For example, you can define a layer and run a buffer tool:

input = "path/to/shp"
distance = 100
result = "path/to/result"
general.runalg("qgis:fixeddistancebuffer", input, distance, 99, False, result)

A custom application is essentially lines of code which can be used to create a GUI where you can manage its components (i.e. adding a canvas, creating menubars, toolbars, panels etc). I sometimes see it like a "mini QGIS" :). A simple example of what I used before was from the following post:

Creating a Standalone GIS Application

You may find (as from the title of the link) that "standalone" and "custom" are sometimes used interchangeably.

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.