Building a standalone application

QGIS is a complete desktop GIS application. However, with PyQGIS, it can also be a comprehensive geospatial Python library to build standalone applications. In this recipe, we will build a simple standalone script that will create a map with a line on it.

Getting ready

All you need to do to get ready is ensure that you have configured Eclipse and PyDev for PyQGIS development, as described in the Setting up your QGIS IDE recipe of this chapter.

How to do it...

In PyDev, create a new project called MyMap with a Python script called MyMap.py, as follows:

  1. In the Eclipse File menu, select New and then click on PyDev Project.
  2. In the PyDev project's Name field, enter MyMap.
  3. Next, select the Python radio button from the Project ...

Get QGIS Python Programming Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.