6.1. Lesson: 데이터 재투영 및 변환

Let us talk about Coordinate Reference Systems (CRSs) again. We have touched on this briefly before, but haven’t discussed what it means practically.

이 강의의 목표: 벡터 데이터를 재투영하고 변환하기.

6.1.1. basic Follow Along: 투영

The CRS that all the data, as well as the map itself are in right now is called WGS84. This is a very common Geographic Coordinate System (GCS) for representing data. But there’s a problem, as we will see.

  1. Save your current map

  2. Then open the map of the world which you will find under exercise_data/world/world.qgs

  3. Zoom in to South Africa by using the Zoom In tool

  4. Try setting a scale in the Scale field, which is in the Statusbar along the bottom of the screen. While over South Africa, set this value to 1:5 000 000 (one to five million).

  5. Pan around the map while keeping an eye on the Scale field

Notice the scale changing? That’s because you are moving away from the one point that you zoomed into at 1:5 000 000, which was at the center of your screen. All around that point, the scale is different.

그 이유를 이해하려면, 지구의를 생각해보십시오. 남북 방향으로 선이 뻗어 있습니다. 이 경도 선들은 적도에서는 멀리 떨어져 있지만 남극/북극에서 만납니다.

In a GCS, you are working on this sphere, but your screen is flat. When you try to represent the sphere on a flat surface, distortion occurs, similar to what would happen if you cut open a tennis ball and tried to flatten it out. What this means on a map is that the longitude lines stay equally far apart from each other, even at the poles (where they are supposed to meet). This means that, as you travel away from the equator on your map, the scale of the objects that you see gets larger and larger. What this means for us, practically, is that there is no constant scale on our map!

이 문제를 해결하기 위해 투영좌표계(PCS)를 대신 사용해봅시다. PCS는 축척 변화를 감안하여 바로잡는 방식으로 데이터를 《투영》하거나 변환합니다. 따라서 축척을 일정하게 유지하려면 PCS를 이용해서 데이터를 재투영해야 합니다.

6.1.2. basic Follow Along: 《실시간》 재투영

By default, QGIS reprojects data 《on the fly》. What this means is that even if the data itself is in another CRS, QGIS can project it as if it were in a CRS of your choice.

You can change the CRS of the project by clicking on the projectionEnabled Current projection button in the bottom right corner of QGIS.

  1. In the dialog that appears, type the word global into the Filter field. A few CRSs should appear in the Predefined Reference Systems field below.

  2. Select WGS 84 / NSIDC EASE-Grid 2.0 Global | EPSG:6933 entry by clicking on it, and then click OK.

    남아프리카 공화국의 형태가 어떻게 변하는지 보셨습니까? 투영체를 바꾸면 지구 상의 오브젝트의 형태가 바뀝니다.

  3. Zoom to a scale of 1:5 000 000 again, as before.

  4. 맵을 이리저리 이동해보십시오.

    축척이 일정하게 유지됩니다!

서로 다른 CRS를 이용하는 데이터셋을 결합하는 데에도 《실시간》 재투영을 사용할 수 있습니다.

  1. Add another vector layer to your map which has the data for South Africa only. You will find it as exercise_data/world/RSA.shp.

  2. Load it. A quick way to see its CRS is by hovering the mouse over the layer in the legend. It is EPSG:3410.


    The layer is visible even if it has a different CRS from the continents one.

6.1.3. moderate Follow Along: 다른 CRS로 데이터셋 저장

Sometimes you need to export an existing dataset with another CRS. As we will see in the next lesson, if you need to make distance calculations on layer, it is always better to have the layer in a projected coordinate system.

Be aware that the 〈on the fly〉 reprojection is related to the project and not to single layers. This means that a layer can have a different CRS from the project even if you see it in the correct position.

You can easily export the layer with another CRS.

  1. Add the buildings dataset from training_data.gpkg

  2. Right-click on the buildings layer in the Layers panel

  3. Select Export ▶ Save Features As… in the menu that appears. You will be shown the Save Vector Layer as… dialog.

  4. Click on the Browse button next to the File name field

  5. Navigate to exercise_data/ and specify the name of the new layer as buildings_reprojected.shp.

  6. Change the value of the CRS. Only the recent CRSs used will be shown in the drop-down menu. Click on the setProjection Select projection button next to the drop-down menu.

  7. The Coordinate Reference System Selector dialog will appear. In its Filter field, search for 34S.

  8. Select WGS 84 / UTM zone 34S | EPSG:32734 from the list

  9. Leave the other options unchanged. The Save Vector Layer as… dialog now looks like this:

  10. OK 를 클릭합니다.

You can now compare the old and new projections of the layer and see that they are in two different CRS but they are still overlapping.

6.1.4. hard Follow Along: 사용자 지정 투영체 생성

QGIS에 기본으로 포함된 투영체 외에도 많은 투영체가 있습니다. 여러분 자신만의 투영체를 생성할 수도 있습니다.

  1. Start a new map

  2. Load the world/oceans.shp dataset

  3. Go to Settings ▶ Custom Projections… and you will see this dialog.

  4. Click on the signPlus Add new CRS button to create a new projection

  5. An interesting projection to use is called Van der Grinten I. Enter its name in the Name field.

    이 투영체는 다른 대부분 투영체와는 달리 사각 면이 아니라 원형 면에 지구를 표현합니다.

  6. Add the following string in the Parameters field:

    +proj=vandg +lon_0=0 +x_0=0 +y_0=0 +R_A +a=6371000 +b=6371000 +units=m +no_defs
  7. OK 를 클릭합니다.

  8. Click on the projectionEnabled Current CRS button to change the project CRS

  9. Choose your newly defined projection (search for its name in the Filter field)

  10. 이 투영체를 적용하면 맵이 다음과 같이 재투영될 것입니다.


6.1.5. In Conclusion

목적에 따라 유용한 투영체도 달라집니다. 올바른 투영체를 선택함으로써 사용자 맵 상에 피처를 정확하게 표현할 수 있게 됩니다.

6.1.6. Further Reading

Materials for the Advanced section of this lesson were taken from this article.

Further information on Coordinate Reference Systems is available here.

6.1.7. What’s Next?

In the next lesson you will learn how to analyze vector data using QGIS〉 various vector analysis tools.