Bir harita oluşturma (QGIS3)

Çıktısı alınabilen veya yayınlanabilen bir haritaya sık sık ihtiyaç duyulmaktadır. QGIS CBS katmanlarını alıp harmanlayarak haritalar oluşturmanıza olanak sağlayan Print Layout adı verilen güçlü bir araca sahiptir.

Göreve Genel Bakış

Bu dokümanda harita penceresi (inset), koordinat çizgileri (grids), kuzey oku, ölçek çubuğu ve etiketler gibi standart harita bileşenleri kullanılarak Japonya haritasının yapımını göstermektedir.

Öğreneceğiniz diğer beceriler

  • QGIS Proje değişkenlerinin nasıl görüntülenip değiştirilebileceği

  • QGIS ifadelerinin (expressions) nasıl kullanıldığı

Verinin Elde Edilmesi

QGIS’e direkt olarak yüklenebilen mükemmel tasarlanmış küresel katmanlar ile gelen Natural Earth Quick Start Kit’i kullanacağız.

Download the Natural Earth Quickstart Kit. If the download link doesn’t work, get it directly from Natural Earth Downloads page.

Veri Kaynağı : [NATURALEARTH]

İşlem Adımları

  1. Natural Earth Quick Start Kit verisini indirip arşivi açın. QGIS’iaçın. Browser panelini kullanarak Natural Earth quick start klasörüne ulaşın. Klasörün içinde Natural_Earth_quick_start_for_QGIS_v3 projesini bulun. Bu dosya QGIS formatında düzenlenmiş katmanları içeren proje dosyasıdır. Çift tıklayarak açın.

../../_images/1100.png
  1. Yunanca bazı etiketler dikkatinizi çekebilir. Bu proje dili ayarlamak için değişkenlerden faydalanır. Değişkenleri Project ‣ Properties adımlarını izleyerek değiştirebiliriz.

../../_images/250.png

Not

Proje değişkenleri, QGIS ifadelerinin kullanılabildiği yerlerde o projeye özgü değerlerin depolanabilmesi için idealdir. Natural_Earth_quick_start_for_QGIS_v3 projesi tasarım amaçlı bir çok önceden ayarlanmış değişken içermektedir.

  1. Switch to the Variables tab in the Project Properties dialog. Locate the project_language variable and click on the Value column to edit it. Change the language to name_en and click OK.

../../_images/329.png
  1. Back in the main QGIS window, click the Refresh button in the Map Navigation Toolbar. You will now see the map rendered with English labels.

../../_images/413.png
  1. Use the pan and zoom controls in the Map Navigation Toolbar and zoom to Japan.

../../_images/514.png
  1. You can turn off some map layers for data that we do not need for this map. Expand the z5 - 1:18m folder and uncheck the box next to ne_10m_geography_marine_polys and ne_10m_admin_0_disputed_areas layers. Before we make a map suitable for printing, we need to choose an appropriate projection. The default CRS for the project is set to EPSG:3857 Pseudo-Mercator. This is a CRS popularly used for web mapping and is a decent choice for our purpose, so we can leave it to its defalt value. Go to Project ‣ New Print Layout.

../../_images/614.png

Not

For Japan, Japan Plane Rectangular CS is a projected coordinate reference system (CRS) that is designed for minimum distortions. It is divided in 18 zones and if you are working for a smaller region in Japan, using this CRS will be better.

  1. You will be prompted to enter a title for the layout. You can leave it empty and click Ok.

../../_images/713.png

Not

Leaving the layout name empty will assign a default name such as Layout 1.

  1. In the Print Layout window, click on Zoom full button to display the full extent of the Layout.

../../_images/813.png
  1. Now we would have to bring the map view that we see in the QGIS Canvas to the layout. Go to Add Item ‣ Add Map.

../../_images/913.png
  1. Once the Add Map mode is active, hold the left mouse button and drag a rectangle where you want to insert the map.

../../_images/1018.png
  1. You will see that the rectangle window will be rendered with the map from the main QGIS canvas. The rendered map may not be covering the full extent of our interest area. Use Edit ‣ Select/Move item and Edit ‣ Move Content options to pan the map in the window and center it in the composer.

../../_images/1121.png
  1. Let us also adjust the zoom level for the map. Click on the Item Properties tab and enter 10000000 as the Scale value.

../../_images/1219.png
  1. Now we will add a map inset that shows a zoomed in view for the Tokyo area. Before we make any changes to the layers in the main QGIS window, check the Lock layers and Lock styles for layers boxes. This will ensure that if we turn off some layers or change their styles, this view will not change.

../../_images/1317.png
  1. Switch to the main QGIS window. Turn off the layer group z5 - 1:18m and activate the z7 - 1: 4m group. This layer group has styling that is more appropriate for a zoomed-in view. Use the pan and zoom controls in the Map Navigation Toolbar and zoom around Tokyo.

../../_images/1415.png
  1. We are now ready to add the map inset. Switch the the Print Layout window. Go to Add Item ‣ Add Map.

../../_images/1514.png
  1. Drag a rectangle at the place where you want to add the map inset. You will now notice that we have 2 map objects in the Print Layout. When making changes, make sure you have the correct map selected.

../../_images/1613.png
  1. Select the Map 2 object that we just added from the Items panel. Select the Item properties tab. Scroll down to the Frame panel and check the box next to it. You can change the color and thickness of the frame border so it is easy to distinguish against the map background.

../../_images/1714.png
  1. One neat feature of the Print Layout is that it can automatically highlight the area from the main map which is represented in the inset. Select the Map 1 object from the Items panel. In the Item properties tab, scroll down to the Overviews section. Click the Add a new overview button.

../../_images/1812.png
  1. Select Map 2 as the Map Frame. This tells the Print Layout to highlight the current object Map 1 with the extent of the map shown in the Map 2 object.

../../_images/1910.png
  1. Now that we have the map inset ready, we will add a grid to the main map. Select the Map 1 object from the Items panel. In the Item properties tab, scroll down to the Grids section. Click the Add a new grid button, followed by Modify grid….

../../_images/2010.png
  1. By default, the grid lines use the same units and projections as the currently selected map projections. However, it is more common and useful to display grid lines in degrees. We can select a different CRS for the grid. Click on the Change… button next to CRS.

../../_images/2114.png
  1. In the Coordinate Reference System Selector dialog, enter 4326 in the Filter box. From the results, select the WGS84 EPSG:4326 as the CRS. Click OK.

../../_images/2212.png
  1. Select the Interval values as 5 degrees in both X and Y direction. You can adjust the Offset to change where the grid lines appear.

../../_images/2311.png
  1. Scroll down to the Grid frame section and check the Draw coordinates box. The default format is Degrees but it appears as a number. We can customize is to append a ° symbol. Choose Custom and click the Expression button next to it.

../../_images/2410.png
  1. Enter the following expression to create a string that takes the grid number and appends ° symbol to it.

concat(to_string(@grid_number), '°    ')
../../_images/258.png
  1. Notice that the grids now have a custom label from the expression. Adjust the position settings for Left, Right, Top and Bottom as per your liking.

../../_images/267.png
  1. Now we will add a Rectangluar frame to hold other map elements like north arrow, scale and label. Go to Add Item ‣ Add Shape ‣ Add Rectangle.

../../_images/278.png
  1. You can change the Style of the rectangle to match the map background.

../../_images/287.png
  1. Now we will add a North Arrow to the map. QGIS comes with a nice collection of map-related images - including many types of North Arrows. Click Add Item ‣ Add Picture.

../../_images/297.png
  1. Holding your left mouse button, draw a rectangle. On the right-hand panel, click on the Item Properties tab and expand the Search directories section and select the image of your liking.

../../_images/307.png
  1. Now we will add a scale bar. Click on Add Item ‣ Add Scalebar.

../../_images/3111.png
  1. Click on the layout where you want the scalebar to appear. In the Item Properties tab, make sure you have chosen the correct map element Map 1 for which to display the scalebar. Choose the Style that fit your requirement. In the Segments panel, change the Fixed width to 200 units and adjust the segments to your liking.

../../_images/3210.png
  1. It is time to label our map. Click on Add Item ‣ Add Label.

../../_images/333.png
  1. Click on the map and draw a box where the label should be. In the Item Properties tab, expand the Label section and enter a label for the map. Similarly add another labels for data and software credits.

../../_images/343.png
  1. Once you are satisfied with the map, you can export it as an Image, PDF or SVG. For this tutorial, let’s export it as an image. Click Layout ‣ Export as Image.

../../_images/353.png
  1. Resmi istediğiniz formatta kaydediniz. Aşağıda verilen resim PNG formatında kaydedilmiştir.

../../_images/output.png
comments powered by Disqus