If you are an experienced Python developer who wants to create your own geospatial applications with minimum fuss, this is the book for you. While some familiarity with mapping applications would be an advantage, no prior knowledge of geospatial concepts is required. Even if you've never used QGIS before, this book will quickly get you up to speed.
Author(s): Erik Westra
Year: 2014
Language: English
Pages: 264
Cover
Copyright
Credits
About the Author
About the Reviewers
www.PacktPub.com
Table of Contents
Preface
Chapter 1: Getting Started with QGIS
About QGIS
Installing and running QGIS
Understanding QGIS concepts
Linking QGIS and Python
Exploring the Python Console
Examining a Python plugin
Writing an external application
Summary
Chapter 2: The QGIS Python Console
Using the console
Working with geospatial data in the console
Scripting the QGIS user interface
The status bar
The message bar
Progress indicators
QGIS logging
Custom dialogs and windows
Summary
Chapter 3: Learning the QGIS Python API
About the QGIS Python APIs
Deciphering the C++ documentation
Organization of the QGIS Python libraries
The qgis.core package
Maps and map layers
Coordinate reference systems
Vector layers
Raster layers
Other useful qgis.core classes
The qgis.gui package
The QgisInterface class
The QgsMapCanvas class
The QgsMapCanvasItem class
The QgsMapTool class
Other useful qgis.gui classes
Using the PyQGIS library
Analyzing raster data
Manipulating vector data and saving it to a shapefile
Using different symbols for different features within a map
Calculating the distance between two user-defined points
Summary
Chapter 4: Creating QGIS Plugins
Getting ready
Understanding the QGIS plugin architecture
Creating a simple plugin
The plugin development process
Using the Plugin Builder
Automating the build process
Plugin help files
Unit testing
Distributing your plugin
Writing a useful plugin
Plugin possibilities and limitations
Summary
Chapter 5: Using QGIS in an External Application
Introducing Lex
Getting the data
Designing the application
Creating the application's framework
Adding the user interface
Connecting the actions
Creating the map canvas
Labeling the points
Filtering the landmarks
Implementing the zoom tool
Implementing the pan tool
Implementing the explore mode
Further improvements and enhancements
Summary
Chapter 6: Mastering the QGIS Python API
Working with symbol layers
Combining symbol layers
Implementing symbol layers in Python
Implementing renderers in Python
Working with custom map layers
Creating custom map canvas items
Using memory-based layers
Summary
Chapter 7: Selecting and Editing Features in a PyQGIS Application
Working with selections
Using the layer editing mode
Adding Points
Editing Points
Deleting Points and other features
Adding lines and polygons
Editing lines and polygons
Summary
Chapter 8: Building a Complete Mapping Application using Python and QGIS
Introducing ForestTrails
Designing the ForestTrails application
Creating the application
Laying out the application
Defining the toolbar icons
The constants.py module
The forestTrails.py module
The mapTools.py module
The ui_mainWindow.py module
Running the application
Obtaining the basemap
Defining the map layers
Defining the map renderers
The Pan Tool
Implementing the track editing mode
Summary
Chapter 9: Completing the ForestTrails Application
The Add Track map tool
Testing the application
Vertex snapping
The Edit Track map tool
The Delete Track map tool
The Get Info map tool
The Set Start Point and Set End Point actions
The Find Shortest Path action
Adjusting the toolbar actions
Suggested improvements
Summary
Index