3.1. Lesson: Vector Attribute Data

Vector data is arguably the most common kind of data in the daily use of GIS. The vector model represents the location and shape of geographic features using points, lines and polygons (and for 3D data also surfaces and volumes), while their other properties are included as attributes (often presented as a table in QGIS).



The goal for this lesson: To learn about the structure of vector data and explore the attribute data of an object

3.1.1. basic Follow Along: レイヤー属性を表示する

作業しているデータは、オブジェクトが空間の どこ にあるかを表すだけでなく、それらのオブジェクトが であるかを語っていることも、知っておくことが重要です。

From the previous exercise, you should have the protected_areas layer loaded in your map. If it is not loaded, then you can find the protected_areas.shp ESRI Shapefile format dataset in directory exercise_data/shapefile.

The polygons representing the protected areas constitute the spatial data, but we can learn more about the protected areas by exploring the attribute table.

  1. In the Layers panel, click on the protected_areas layer to select it.

  2. In the Attributes Toolbar click the openTable Open Attribute Table button. This will open a new window showing the attribute table of the protected_areas layer.


    A row is called a record and is associated with a feature in the Canvas Map, such as a polygon. A column is called a field (or an attribute), and has a name that helps describe it, such as name or id. Values in the cells are known as attribute values. These definitions are commonly used in GIS, so it is good to become familiar with them.

    In the protected_areas layer, there are two features, which are represented by the two polygons we see on the Map Canvas.


    In order to understand what the fields and attribute values represent, one may need to find documentation (or metadata) describing the meaning of the attribute values. This is usually available from the creator of the data set.

Next, let's see how a record in the attribute table is linked to a polygon feature that we see on the Map Canvas.

  1. Go back to the main QGIS window.

  2. In the Attributes Toolbar, click on the selectFeature Select Feature button.

  3. Make sure the protected_areas layer is still selected in the Layers panel.

  4. Move your mouse to the Map Canvas and left click on the smaller of the two polygons. The polygon will turn yellow indicating it is selected.

  5. Go back to the Attribute Table window, and you should see a record (row) highlighted. These are the attribute values of the selected polygon.


You can also select a feature using the Attribute Table.

  1. In the Attribute Table window, on the far left, click on the row number of the record that is currently not selected.

  2. Go back to the main QGIS window and look at the Map Canvas. You should see the larger of the two polygons colored yellow.

  3. To deselect the feature, go to the Attribute Table window and click on deselectAll Deselect all features from the layer button.

Sometimes there are many features shown on the Map Canvas and it might be difficult to see which feature is selected from the Attribute Table. Another way to identify the location of a feature is to use the Flash Feature tool.

  1. In the Attribute Table, right-click on any cell in the row that has the attribute value r2855697 for the field full_id.

  2. In the context menu, click on Flash Feature and watch the Map Canvas.


    You should see the polygon flash red a few times. If you missed it, try it again.

Another useful tool is the Zoom to Feature tool, that tells QGIS to zoom to the feature of interest.

  1. In the Attribute Table, right-click on any cell in the row that has the attribute value r2855697 for the field full_id.

  2. In the context menu, click on Zoom to Feature


    Look at the Map Canvas. The polygon should now occupy the extent of the Map Canvas area.


3.1.2. basic Try Yourself Exploring Vector Data Attributes

  1. How many fields are available in the rivers layer?

  2. Tell us a bit about the town places in your dataset.

  3. Open the attribute table for the places layer. Which field would be the most useful to represent in label form, and why?

Check your results

3.1.3. In Conclusion


3.1.4. What's Next?