2.2. Lesson: Adding your first layers¶
응용 프로그램을 시작하고 예제 및 연습에 쓰일 기본 맵을 생성하겠습니다.
이 강의의 목표: 예제 맵으로 시작하기.
Before starting this exercise, QGIS must be installed on your computer. Also, you should have downloaded the sample data to use.
사용자의 설치 설정에 따라 데스크탑 바로가기 또는 메뉴 항목에서 QGIS를 실행합니다.
The screenshots for this course were taken in QGIS 3.4 running on Linux. Depending on your setup, the screens you encounter may well appear somewhat different. However, all the same buttons will still be available, and the instructions will work on any OS. You will need QGIS 3.4 (the latest version at time of writing) to use this course.
그럼 바로 시작해볼까요!
2.2.1. Follow Along: 맵 준비¶
QGIS를 시작합니다. 텅 빈 새 맵이 나타날 것입니다.
If you can’t find the icon, check that the Data Source Manager toolbar is enabled in the menu.
Click on the Vector tab.
Press the … button next to Vector Dataset(s).
exercise_data/shapefile/protected_areas.shpfile in your training directory.
Click Open. You will see the original dialog, with the file path filled in.
Click Add here as well. The data you specified will now load: you can see a
protected_areasitem in the Layers panel (bottom left) with its features shown in the main map canvas.
축하합니다! 이제 기본 맵을 사용할 수 있습니다. 이제 사용자의 작업을 저장하도록 합시다.
2.2.2. Try Yourself¶
Repeat the steps above to add the
layers from the same folder (
exercise_data/shapefile) to the map.
2.2.3. Follow Along: Loading vector data from a GeoPackage Database¶
Databases allow you to store a large volume of associated data in one file. You may already be familiar with a database management system (DBMS) such as Libreoffice Base or MS Access. GIS applications can also make use of databases. GIS-specific DBMSes (such as PostGIS) have extra functions, because they need to handle spatial data.
The GeoPackage open format is a container that
allows you to store GIS data (layers) in a single file.
Unlike the ESRI Shapefile format (e.g. the
you loaded earlier), a single GeoPackage file can contain various data (both
vector and raster data) in different coordinate reference systems, as well as
tables without spatial information; all these features allow you to share data
easily and avoid file duplication.
In order to load a layer from a GeoPackage, you will first need to create the connection to it:
Click on the New button and browse to the
training_data.gpkgfile in the
exercise_datafolder you downloaded before.
Select the file and press Open. The file path is now added to the Geopackage connections list, and appears in the drop-down menu.
You are now ready to add any layer from this GeoPackage to QGIS.
Click on the Connect button. In the central part of the window you should now see the list of all the layers contained in the GeoPackage file.
Select the roads layer and click on the Add button.
A roads layer is added to the Layers panel with features displayed on the map canvas.
Click on Close.
Congratulations! You have loaded the first layer from a GeoPackage.
2.2.4. Follow Along: Loading vector data from a SpatiaLite Database with the Browser¶
QGIS provides access to many other database formats. Like GeoPackage, the SpatiaLite database format is an extension of the SQLite library. And adding a layer from a SpatiaLite provider follows the same rules as described above: Create the connection –> Enable it –> Add the layer(s).
While this is one way to add SpatiaLite data to your map, let’s explore another powerful way to add data: the Browser.
In this tab you can see all the storage disks connected to your computer as well as entries for most of the tabs in the left. These allow quick access to connected databases or folders.
Navigate to the
exercise_datafolder, select the
landuse.sqlitefile and click Open.
Enable the Browser panel in and use it to add your data. It’s a handy shortcut for the tab, with the same functionality.
Remember to save your project frequently! The project file doesn’t contain any of the data itself, but it remembers which layers you loaded into your map.
2.2.5. Try Yourself Load More Vector Data¶
Load the following datasets from the
exercise_data folder into your map
using any of the methods explained above:
2.2.6. Follow Along: 레이어 재배열¶
사용자 레이어 목록에 있는 레이어들은 맵 상에 특정 순서대로 그려집니다. 목록 맨 아래에 있는 레이어를 첫 번째로 그리고, 맨 위에 있는 레이어를 마지막에 그립니다. 목록에서 레이어 순서를 바꾸면 맵 상에 그려지는 순서도 바꿀 수 있습니다.
You can alter this behavior using the Control rendering order checkbox beneath the Layer Order panel. We will however not discuss this feature yet.
현재 맵 상에 레이어가 로드되는 순서가 전혀 논리적이지 않을 수도 있습니다. 다른 레이어들이 road 레이어를 덮어 완전히 가려져 있을 수도 있습니다.
예를 들어 레이어 순서를 이렇게 하면…
… would result in roads and places being hidden as they run underneath the polygons of the landuse layer.
이 문제를 해결하려면,
레이어 목록에서 레이어를 클릭 & 드래그하십시오.
다음처럼 순서를 재배열하십시오.
이제 도로와 건물이 토지이용구역 위에 나타나는, 시각적으로 더 논리적인 맵을 볼 수 있습니다.
2.2.7. In Conclusion¶
Now you’ve added all the layers you need from several different sources and created a basic map!
2.2.8. What’s Next?¶
Now you’re familiar with the basic function of the Open Data Source Manager button, but what about all the others? How does this interface work? Before we go on, let’s take a look at some basic interaction with the QGIS interface. This is the topic of the next lesson.