Attribute data in Context

“Attributes are additional pieces of information that describe a spatial feature in a GIS.”

Attribute data are tabular data that describes the characteristic of a particular feature. The tabular data can store data in different field types namely character data, numeric, and date/ time. Vector geodata consists of tables (picture a spreadsheet with its rows and columns). What we call a 'layer' is actually a table, no matter what format it is on disk. The table consists of one or more columns (aka 'fields', 'properties', 'attributes') and zero or more rows (aka 'records' or 'features'). What makes the table a vector layer is the geometry column. So, for a spatial layer, that is the minimum requirement. The geometry in the geometry field is what the GIS software draws in the map and is what we often call a 'feature'. Any other columns we call 'attributes' in the GIS world. They are also just data fields but instead of containing geometry, they contain text, numbers, dates, etc.

Attributes can be present in the same table as the geometry (as in a shapefile) but they often come from other tables via a 'join', where rows are matched based on a 'key' or on a spatial relationship.

Raster data also has attributes, although normally just one - the value of the cell.

In this module, we will learn about attributes and explore the different field types and the kind of data it stores. We will also learn how to edit the data.

You try:

Goal: Explore and edit attributes

  • Load the exercise data.
  • Open its Layer Properties and look at the Fields tab, noting the names and types
  • Close the Layer Properties, click the Identify button and click on a country
  • Open the layer's attribute table and explore the data
  • Find the country that you clicked on in the previous step and click on the number in the far left of its row to highlight it. Then click the magnifying glass icon at the top of the table.
  • Put the table into edit mode
  • Click on the icon in the lower right corner of the table to toggle to 'form view' (you can switch between form and table view any time)
  • Add a text field called 'major_disasters' and list the major disasters that might affect the country you selected
  • Add an integer field called 'disaster_fatalities' and makeup and enter a number of annual fatalities for the country you selected
  • Save and toggle edit mode
  • Label the Countries layer with 'major_disasters'

Check your knowledge:

  1. When you open a layer's attribute table in QGIS, where is the geometry column:

    1. There isn't one
    2. It's made up of the latitude and longitude columns
    3. It is shown on the map