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).

지금까지 우리가 맵 상에서 변경했던 것들은 맵 상에 보이는 오브젝트들의 영향을 받지 않았습니다. 다시 말해 모든 토지이용구역들은 똑같이 보였고, 모든 도로들도 똑같이 보였습니다. 맵을 보는 사람들은 특정 지역에 특정 형태의 도로가 있다는 것 외에는 자기가 보고 있는 도로에 대해 아무것도 알 수 없었습니다.

그러나 GIS의 최대 강점은 맵 상에 보이는 모든 오브젝트들이 속성을 가지고 있다는 것입니다. GIS에서 맵은 단순한 그림이 아닙니다. 맵은 오브젝트들의 위치만이 아니라 그 오브젝트들에 대한 정보도 담고 있습니다.

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.

    ../../../_images/attribute_data_preview.png

    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 selectRectangle 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.

    ../../../_images/select_polygon.png
  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.

    ../../../_images/select_record.png

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.

    ../../../_images/select_record2.png
  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 deselectActiveLayer 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.

    ../../../_images/flash_feature.png

    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

    ../../../_images/zoom_to_feature.png

    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?

3.1.3. In Conclusion

이제 여러분이 사용하는 데이터 안에 실제로 뭐가 들어 있는지 보기 위해 속성 테이블을 이용하는 방법을 알게 됐습니다. 여러분에게 필요한 속성이 없다면 어떤 데이터셋이라도 쓸모없는 데이터입니다. 어떤 속성이 필요한지 알고 있다면 어떤 데이터셋을 사용할 수 있는지, 또는 필요한 속성 데이터를 가진 다른 데이터셋을 찾아야 하는지 빨리 결정할 수 있습니다.

3.1.4. What’s Next?

목적이 다르다면 쓸모 있는 속성도 달라집니다. 속성 중 일부는 맵 사용자가 볼 수 있도록 텍스트로 직접 나타낼 수 있습니다. 다음 강의에서는 그 방법을 배워보겠습니다.