Book Image

QGIS Blueprints

By : Ben Mearns
Book Image

QGIS Blueprints

By: Ben Mearns

Overview of this book

Table of Contents (14 chapters)
QGIS Blueprints
About the Author
About the Reviewers

The software

QGIS is not a black box—it is a part of a dynamic community of software users and developers. Although this book strives to apply generalizable blueprints to a range of actual web applications, there are times when a deeper understanding of the makeup of the QGIS platform is invaluable; sometimes even as soon as at installation. The latest version of QGIS is 2.10.

The development community and dependencies

As QGIS is open source, no one entity owns the project; it's supported by a well-established community. The project is guided by the QGIS Project Steering Committee (PSC), which selects managers to oversee various areas of development, testing, packaging, and other infrastructure to keep the project going. The Open Source Geospatial Foundation (OSGeo) is a major contributor to software development, and QGIS is considered an official OSGeo project. Many of QGIS' dependencies and complimentary software are also OSGeo projects, and this collective status has served to bring some integration into what can be considered a platform. The Open GIS Consortium (OGC) deliberates and sets standards for the data and metadata formats. QGIS supports a range of OGC standards—from web services to data formats.

When QGIS is at its best, this rich platform provides a seamless functionality, with an ecosystem of open or simply available software ready to be tapped. At other times, the underlying dependencies and ecosystem software require more attention. Since it's an open source software, contributions are always being made, and you have the option of making customizations in code and even contributing to it!

Data format read/write

The OSGeo ecosystem provides capabilities for data format read/write through the OGR Simple Features Library (OGR, originally for OpenGIS Simple Features Reference Implementation) and Geospatial Data Abstraction Library (GDAL) libraries, which support around 220 formats.

Geospatial coordinate transformation

The models of the earth, which the coordinates refer to, are collectively known as Coordinate Reference Systems (CRSs). The spatial reference transformation between systems and projection—from a system in linear versus the one in angular coordinates—is supported by the PROJ.4 library with around 2,700 systems. These are expressed in a plain text format defined by PROJ.4 as Well Known Text (WKT). PROJ.4 WKT is actually very readable, containing the sort of information that would be familiar to the students of cartographic projection, such as meridians, spheroids, and so on.


Analysis, or application of algorithmic functions to data is rarely handled seamlessly by QGIS. More often, it is an extension of one of the dependencies already listed before or is provided by System for Automated Geoscientific Analyses (SAGA). Many other analytical operations are provided by numerous QGIS Python plugins.

In general, these libraries will seamlessly transform to or from the formats that we require. However, in some cases, additional dependencies will need to be acquired and either be built and configured themselves or have the code built around them.

Web publishing

QGIS has the capability of publishing to web hosts through both integrated and less immediate means.


OSGeo project binaries have sometimes been bundled to ease the installation process, given the multitude of interdependencies among projects. Tutorials in this book are written based on an installation using the QGIS standalone installer for Windows.


QGIS hosts repositories with the most current versions for Debian/Ubuntu and bundled packages for other major Linux distributions; however, these repositories are generally many versions behind. You will find that this is often the case even with the extra repositories for your distribution (for example, EPEL for RHEL flavors). Seeking out other repositories is worthwhile. Another option, of course, is to attempt to build it from scratch; however, this can be very difficult.


There is no bundled package installer for Mac OS, though you should be able to install QGIS with only one or two additional installations from the binaries readily available on the Web—the KyngChaos Wiki has long been the go-to source for this.


Installation with Windows is simpler than with other platforms at this time. The most recent version of QGIS, with basic dependencies such as GDAL, is installed with a typical executable installer: the "standalone" installer. In addition, the OSGeo4W (OSGeo for Windows) package installer is very useful for the extended dependencies. You will likely find that beyond simply installing QGIS, you will return to this installer to add additional software to extend QGIS into its ecosystem. You can launch the installer from the Setup shortcut under the QGIS submenu in the Windows Start menu.


The most extensive incarnation of the OSGeo software is embodied in OSGeo-Live, a Lubuntu Virtual Machine (VM) on which all of the OSGeo software is already installed. It is listed here separately since it will boot into its own OS, independent of the host platform.

Updates to OSGeo Live are typically released in tandem with FOSS4G, an annual global event hosted by OSGeo since 2006. Given that these events occur less regularly and are out of sync with OSGeo software development, bundled versions are usually a few releases behind. Still, OSGeo-Live is a quick way to get started.

Now that you've prepared your local machine, let's return to the idea of the generalizable web applications that will be the focus of this book. There are a few elements that we can identify in the process of developing web-mapping applications.