3. 벡터 데이터

gentleLogo

목적

GIS에서 사용되는 벡터 데이터 모델 이해하기

키워드

벡터, 포인트, 폴리라인, 폴리곤, 꼭짓점, 도형, 축척, 데이터 품질, 심볼, 데이터소스

3.1. 개관

벡터 데이터는 GIS 환경 내에서 실제 세계의 객체(feature) 를 표현하는 방법 가운데 하나입니다. 객체란 풍경에서 볼 수 있는 무언가를 말합니다. 언덕 꼭대기에 서 있다고 상상해보십시오. 아래를 바라보면 집, 도로, 나무, 하천 등등을 볼 수 있을 겁니다. (그림 3.13 을 참조하세요.) GIS 응용 프로그램에 표현되는 경우 이런 사물들 하나하나가 객체 가 될 것입니다. 벡터 객체는 속성(attribute) 을 가지고 있는데, 이 속성은 객체를 설명(describe) 하는 텍스트 또는 숫자 정보로 이루어집니다.

../../_images/landscape.jpg

그림 3.13 풍경을 바라보면 도로, 집, 나무 같은 주요 객체들을 볼 수 있습니다.

벡터 객체는 도형(geometry) 을 사용해서 그 형태를 표현합니다. 도형은 하나 이상의 상호연결된 꼭짓점(vertex) 으로 이루어집니다. X, Y 및 선택적으로 Z 축을 사용해서 공간에서 꼭짓점의 위치를 설명합니다. Z 축을 가진 꼭짓점을 포함하는 도형은 2.5D 로 불리는 경우가 많습니다. 각 꼭짓점의 높이 또는 깊이를 설명하지만, 동시에 둘 다는 아니기 때문입니다.

객체의 도형이 단일 꼭짓점만으로 이루어져 있는 경우, 이를 포인트(point) 객체(그림 3.14 참조)라 합니다. 도형이 2개 이상의 꼭짓점으로 이루어져 있고 첫 번째와 마지막 꼭짓점이 동일하지 않은 경우, 폴리라인(polyline) 객체(그림 3.15 참조)가 형성됩니다. 꼭짓점이 3개 이상이고 첫 번째와 마지막 꼭짓점이 동일한 경우, 닫힌 폴리곤(polygon) 객체(그림 3.16 참조)가 형성됩니다.

../../_images/point_feature.png

그림 3.14 X, Y 및 선택적으로 Z 좌표로 포인트 객체를 설명합니다. 포인트 속성은 포인트를, 예를 들어 나무인지 또는 가로등인지를 설명합니다.

../../_images/polyline_feature.png

그림 3.15 폴리라인은 일련의 결합된 꼭짓점들입니다. 각 꼭짓점은 X, Y (및 선택적으로 Z) 좌표를 가집니다. 속성은 폴리라인을 설명합니다.

../../_images/polygon_feature.png

그림 3.16 폴리곤은 폴리라인과 마찬가지로 일련의 꼭짓점들입니다. 하지만 폴리곤의 경우 첫 번째와 마지막 꼭짓점이 언제나 동일한 위치에 있습니다.

앞에서 본 풍경 사진을 다시 보면, 이제 서로 다른 객체 유형을 GIS가 표현하는 대로 구분할 수 있을 겁니다. (그림 3.17 을 참조하세요.)

../../_images/landscape_geometry.jpg

그림 3.17 GIS에 표현될 풍경 객체들. 하천(파란색)과 도로(초록색)는 라인으로, 나무는 포인트(빨간색)로, 집은 폴리곤(하얀색)으로 표현될 수 있습니다.

3.2. 포인트 객체를 더 자세히

포인트 객체를 논할 때 가장 먼저 알아야 할 점은 GIS에서 포인트라고 묘사하는 것은 견해 상의 문제일 뿐이며, 축척에 따라 달라질 때가 많다는 사실입니다. 도시를 예로 들어봅시다. (넓은 지역을 보여주는) 소축척 맵의 경우 포인트 객체로 도시를 표현하는 것이 일리가 있을 수도 있습니다. 하지만 맵을 더 대축척으로 확대해 들어가면, 도시 경계를 폴리곤으로 표시하는 편이 더 말이 되겠죠.

객체를 표현하기 위해 포인트를 사용하도록 선택하는 것은 대부분의 경우 (객체를 얼마나 멀리서 보는가 하는) 축척, (폴리곤 객체를 생성하는 것보다 포인트 객체를 생성하는 편이 더 빠르기 때문에) 편의성 그리고 (전신주 같은 물체를 굳이 폴리곤으로 저장하는 건 말이 안 되기 때문에) 객체 유형의 문제입니다.

그림 3.14 에서 볼 수 있듯이, 포인트 객체는 X, Y 및 선택적으로 Z 값을 가집니다. X와 Y 값은 사용 중인 좌표계(CRS) 에 따라 달라집니다. 좌표계에 대한 자세한 내용은 다음 기회에 다룰 것입니다. 지금은 그저 CRS가 지구 표면 상에 있는 특정 위치를 정확하게 설명할 수 있는 방법이라고만 해두죠. 가장 일반적인 좌표계 가운데 하나가 경도 및 위도 입니다. 경도(longitude) 선은 북극에서 남극까지 이어집니다. 위도(latitude) 선은 동쪽에서 서쪽으로 이어집니다. 다른 사람에게 자신의 경도(X)와 위도(Y)를 알려주면, 자신이 지구 상 어디에 있는지 정확히 설명할 수 있는 겁니다. 이와 같이 나무 또는 전신주의 위치를 측정해서 맵 상에 표시하면 포인트 객체를 생성하게 되는 것이죠.

우리는 지구가 평평하지 않다는 사실을 알고 있으므로, 포인트 객체에 Z 값을 추가하는 편이 더 유용할 경우가 많습니다. Z 값은 해수면에서 얼마나 떨어져 있는지를 설명해줍니다.

3.3. 폴리라인 객체를 더 자세히

포인트 객체가 단일 꼭짓점이라면, 폴리라인은 2개 이상의 꼭짓점을 가집니다. 폴리라인(polyline)은 그림 3.15 에 나타난 바와 같이 각 꼭짓점을 이으면서 연결되는 경로입니다. 두 꼭짓점을 연결하면 라인이 생성됩니다. 2개 이상의 꼭짓점을 연결하면, 〈라인들의 라인〉 즉 폴리라인 을 형성합니다.

A polyline is used to show the geometry of linear features such as roads, rivers, contours, footpaths, flight paths and so on. Sometimes we have special rules for polylines in addition to their basic geometry. For example contour lines may touch (e.g. at a cliff face) but should never cross over each other. Similarly, polylines used to store a road network should be connected at intersections. In some GIS applications you can set these special rules for a feature type (e.g. roads) and the GIS will ensure that these polylines always comply to these rules.

If a curved polyline has very large distances between vertices, it may appear angular or jagged, depending on the scale at which it is viewed (see 그림 3.18). Because of this it is important that polylines are digitised (captured into the computer) with distances between vertices that are small enough for the scale at which you want to use the data.

../../_images/jagged_polyline.png

그림 3.18 Polylines viewed at a smaller scale (1:20 000 to the left) may appear smooth and curved. When zoomed in to a larger scale (1:500 to the right) polylines may look very angular.

The attributes of a polyline describe its properties or characteristics. For example a road polyline may have attributes that describe whether it is surfaced with gravel or tar, how many lanes it has, whether it is a one way street, and so on. The GIS can use these attributes to symbolise the polyline feature with a suitable colour or line style.

3.4. Polygon features in detail

Polygon features are enclosed areas like dams, islands, country boundaries and so on. Like polyline features, polygons are created from a series of vertices that are connected with a continuous line. However because a polygon always describes an enclosed area, the first and last vertices should always be at the same place! Polygons often have shared geometry –– boundaries that are in common with a neighbouring polygon. Many GIS applications have the capability to ensure that the boundaries of neighbouring polygons exactly coincide. We will explore this in the Topology topic later in this tutorial.

As with points and polylines, polygons have attributes. The attributes describe each polygon. For example a dam may have attributes for depth and water quality.

3.5. Vector data in layers

Now that we have described what vector data is, let’s look at how vector data is managed and used in a GIS environment. Most GIS applications group vector features into layers. Features in a layer have the same geometry type (e.g. they will all be points) and the same kinds of attributes (e.g. information about what species a tree is for a trees layer). For example if you have recorded the positions of all the footpaths in your school, they will usually be stored together on the computer hard disk and shown in the GIS as a single layer. This is convenient because it allows you to hide or show all of the features for that layer in your GIS application with a single mouse click.

3.6. Editing vector data

The GIS application will allow you to create and modify the geometry data in a layer –– a process called digitising –– which we will look at more closely in a later tutorial. If a layer contains polygons (e.g. farm dams), the GIS application will only allow you to create new polygons in that layer. Similarly if you want to change the shape of a feature, the application will only allow you to do it if the changed shape is correct. For example it won’t allow you to edit a line in such a way that it has only one vertex –– remember in our discussion of lines above that all lines must have at least two vertices.

Creating and editing vector data is an important function of a GIS since it is one of the main ways in which you can create personal data for things you are interested in. Say for example you are monitoring pollution in a river. You could use the GIS to digitise all outfalls for storm water drains (as point features). You could also digitise the river itself (as a polyline feature). Finally you could take readings of pH levels along the course of the river and digitise the places where you made these readings (as a point layer).

As well as creating your own data, there is a lot of free vector data that you can obtain and use. For example, you can obtain vector data that appears on the 1:50 000 map sheets from the Chief Directorate: Surveys and Mapping.

3.7. Scale and vector data

Map scale is an important issue to consider when working with vector data in a GIS. When data is captured, it is usually digitised from existing maps, or by taking information from surveyor records and global positioning system devices. Maps have different scales, so if you import vector data from a map into a GIS environment (for example by digitising paper maps), the digital vector data will have the same scale issues as the original map. This effect can be seen in illustrations 그림 3.19 and 그림 3.20. Many issues can arise from making a poor choice of map scale. For example using the vector data in illustration 그림 3.19 to plan a wetland conservation area could result in important parts of the wetland being left out of the reserve! On the other hand if you are trying to create a regional map, using data captured at 1:1000 000 might be just fine and will save you a lot of time and effort capturing the data.

../../_images/small_scale.png

그림 3.19 Vector data (red lines) that was digitised from a small scale (1:1000 000) map.

../../_images/large_scale.png

그림 3.20 Vector data (green lines) that was digitised from a large scale (1:50 000) map.

3.8. 심볼

When you add vector layers to the map view in a GIS application, they will be drawn with random colours and basic symbols. One of the great advantages of using a GIS is that you can create personalised maps very easily. The GIS program will let you choose colours to suite the feature type (e.g. you can tell it to draw a water bodies vector layer in blue). The GIS will also let you adjust the symbol used. So if you have a trees point layer, you can show each tree position with a small picture of a tree, rather than the basic circle marker that the GIS uses when you first load the layer (see illustrations 그림 3.21, 그림 3.22 and 그림 3.23).

../../_images/symbology_settings.png

그림 3.21 In the GIS, you can use a panel (like the one above) to adjust how features in your layer should be drawn.

../../_images/symbology_generic.png

그림 3.22 When a layer (for example the trees layer above) is first loaded, a GIS application will give it a generic symbol.

../../_images/symbology_custom.png

그림 3.23 After making our adjustments it is much easier to see that our points represent trees.

Symbology is a powerful feature, making maps come to life and the data in your GIS easier to understand. In the topic that follows (Vector Attribute Data) we will explore more deeply how symbology can help the user to understand vector data.

3.9. What can we do with vector data in a GIS?

At the simplest level we can use vector data in a GIS Application in much the same way you would use a normal topographic map. The real power of GIS starts to show itself when you start to ask questions like 〈which houses are within the 100 year flood level of a river?〉; 〈where is the best place to put a hospital so that it is easily accessible to as many people as possible?〉; 〈which learners live in a particular suburb?〉. A GIS is a great tool for answering these types of questions with the help of vector data. Generally we refer to the process of answering these types of questions as spatial analysis. In later topics of this tutorial we will look at spatial analysis in more detail.

3.10. Common problems with vector data

Working with vector data does have some problems. We already mentioned the issues that can arise with vectors captured at different scales. Vector data also needs a lot of work and maintenance to ensure that it is accurate and reliable. Inaccurate vector data can occur when the instruments used to capture the data are not properly set up, when the people capturing the data aren’t being careful, when time or money don’t allow for enough detail in the collection process, and so on.

If you have poor quality vector data, you can often detect this when viewing the data in a GIS. For example slivers can occur when the edges of two polygon areas don’t meet properly (see 그림 3.24).

../../_images/vector_slivers.png

그림 3.24 Slivers occur when the vertices of two polygons do not match up on their borders. At a small scale (e.g. 1 on left) you may not be able to see these errors. At a large scale they are visible as thin strips between two polygons (2 on right).

Overshoots can occur when a line feature such as a road does not meet another road exactly at an intersection. Undershoots can occur when a line feature (e.g. a river) does not exactly meet another feature to which it should be connected. Figure 그림 3.25 demonstrates what undershoots and overshoots look like.

../../_images/vector_overshoots.png

그림 3.25 Undershoots (1) occur when digitised vector lines that should connect to each other don’t quite touch. Overshoots (2) happen if a line ends beyond the line it should connect to.

Because of these types of errors, it is very important to digitise data carefully and accurately. In the upcoming topic on topology, we will examine some of these types of errors in more detail.

3.11. 무엇을 배웠나요?

이제 이번 단원에서 배운 내용을 정리해볼까요:

  • Vector data is used to represent real world features in a GIS.

  • A vector feature can have a geometry type of point, line or a polygon.

  • Each vector feature has attribute data that describes it.

  • Feature geometry is described in terms of vertices.

  • Point geometries are made up of a single vertex (X,Y and optionally Z).

  • Polyline geometries are made up of two or more vertices forming a connected line.

  • Polygon geometries are made up of at least four vertices forming an enclosed area. The first and last vertices are always in the same place.

  • Choosing which geometry type to use depends on scale, convenience and what you want to do with the data in the GIS.

  • Most GIS applications do not allow you to mix more than one geometry type in a single layer.

  • Digitising is the process of creating digital vector data by drawing it in a GIS application.

  • Vector data can have quality issues such as undershoots, overshoots and slivers which you need to be aware of.

  • Vector data can be used for spatial analysis in a GIS application, for example to find the nearest hospital to a school.

We have summarised the GIS Vector Data concept in Figure 그림 3.26.

../../_images/vector_summary.png

그림 3.26 This diagram shows how GIS applications deal with vector data.

3.12. 도전해봅시다!

강사와 학생들이 함께 시도해볼 만한 몇 가지 아이디어가 있습니다:

  • Using a copy of a toposheet map for your local area (like the one shown in 그림 3.27), see if your learners can identify examples of the different types of vector data by highlighting them on the map.

  • Think of how you would create vector features in a GIS to represent real world features on your school grounds. Create a table of different features in and around your school and then task your learners to decide whether they would be best represented in the GIS as a point, line or polygon. See table_vector_1 for an example.

../../_images/sample_map.png

그림 3.27 Can you identify two point features and one polygon feature on this map?

Real world feature

Suitable Geometry Type

The school flagpole

The soccer field

The footpaths in and around the school

Places where taps are located

Etc.

Table Vector 1: Create a table like this (leaving the geometry type column empty) and ask your learners to decide on suitable geometry types.

3.13. 생각해볼 점

If you don’t have a computer available, you can use a toposheet and transparency sheets to show your learners about vector data.

3.14. 더 읽어볼 거리

The QGIS User Guide also has more detailed information on working with vector data in QGIS.

3.15. 다음 단원은?

In the section that follows we will take a closer look at attribute data to see how it can be used to describe vector features.