Book Image

Building Mapping Applications with QGIS

By : Erik Westra
Book Image

Building Mapping Applications with QGIS

By: Erik Westra

Overview of this book

Table of Contents (16 chapters)
Building Mapping Applications with QGIS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Getting Started with QGIS
Index

Chapter 7. Selecting and Editing Features in a PyQGIS Application

When running the QGIS application, the user has a range of tools available to create and manipulate geospatial features. For example, the Add Feature tool lets the user create a new feature, while the Move Feature tool and the Node tool allow the user to move and edit existing geospatial features. However, these tools are only available within QGIS itself—if you want to write an external application on top of the PyQGIS library, these built-in tools aren't available, and you will have to implement these features yourself.

In this chapter, we will look at what is involved in adding functionality to a PyQGIS application so that the user can select and edit geospatial features. In particular, we will examine:

  • How to work with selections

  • How the layer editing mode can be used to save or undo the changes the user has made to a map layer

  • How to create map tools that will allow the user to add and edit Point geometries

  • How to let the...