Book Image

Mastering QGIS

Book Image

Mastering QGIS

Overview of this book

Table of Contents (18 chapters)
Mastering QGIS
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Complex spatial and aspatial queries


QGIS provides powerful spatial and aspatial query tools that allow for the easy creation of data subsets. In this section, a series of spatial and aspatial queries will be used to determine which elementary schools are within the Southeast Uplift Neighborhood Coalition (SEUL) and Southwest Neighborhoods Inc. (SWNI) coalitions in Portland, Oregon. This example uses the Neighborhoods_pdx.shp and schools.shp sample data.

First, we will select the SEUL and SWNI coalition neighborhoods from Neighborhoods_pdx.shp. To do this, perform the following steps:

  1. Open the attribute table of Neighborhoods_pdx. Click on the Select features using an expression button () to open the Select by expression window. This window is a subset of the Field calculator window that was explained in the Exploring the field calculator interface section, earlier in this chapter. If you are unfamiliar with the interface, review the aforementioned section.
  2. In Function list, expand the Fields...