Using field calculators for advanced field calculations

Sometimes, we want to select only those records that meet certain criteria for a particular field or fields or some other constraints. We can very easily select a part of the vector layer that meets our given criteria. In this case, we select a railway polyline from railway_polyline.shp:

  1. Load the railway_polyline.shp shapefile, which is a vector file of railway lines, railway platforms, and other features:
  1. Open the attribute table of railway_polyline.shp by right-clicking on it in the Layer panel.
  2. If we scroll down the attribute table, we'll see that there are only two fields and that ...

Get Hands-On Geospatial Analysis with R and QGIS 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.