eyecatch

How to Add a New Layer (Data) to a QGIS Map

Published: Last updated:
This article uses QGIS 3.34. The current LTR is 3.44.

What you'll learn


  • How to add Shapefile data to QGIS
  • How to download data from National Land Numerical Information
  • How to add multiple layers to QGIS at the same time

Recommended for


  • Anyone who wants to display National Land Numerical Information data in QGIS
  • Anyone who has trouble handling Shapefile data

Introduction

Before you can visualize or analyze layers (data) in QGIS, you first need to add them to QGIS.

QGIS supports many data formats. This article explains how to add data in Shapefile format, a file format commonly used for open data.

Download data from National Land Numerical Information

To see what is inside the data, start by downloading it. This article uses the Administrative Area Data from National Land Numerical Information, where the Ministry of Land, Infrastructure, Transport and Tourism (MLIT) provides basic information about Japan's land, such as land use and disaster risk information, free of charge as open data.

To learn more about downloading data from National Land Numerical Information, see this article.

Open the link below and scroll down. A download button appears for each region. Any region works, so download the data you like. This article uses the data for Tokyo.

https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-N03-2024.html

Downloading the Administrative Area Data from National Land Numerical Information (source: National Land Numerical Information)
Downloading the Administrative Area Data from National Land Numerical Information (source: National Land Numerical Information)

The downloaded data is compressed in a Zip file. Unzip it and place the files in a folder that is easy to find.

About the downloaded data

If you look inside the Administrative Area Data you downloaded, you can see that files with the same name and different extensions are stored together.

Of these, the five files in the red frame in the figure below make up one Shapefile dataset.

The .geojson file is in a different vector data format called GeoJSON, and it works on its own.

The files that make up a Shapefile
The files that make up a Shapefile

A Shapefile is one of the vector data storage formats widely used in GIS.

A Shapefile is made up of several files, including files that store geographic shapes and the attribute information linked to them. Only when these files are in the same folder do they form a single Shapefile dataset.

So put these files in the same folder, then import the .shp file to add the data to QGIS.

To learn more about the Shapefile format, see this article.

Add a layer

Now add the Administrative Area layer you downloaded to QGIS. This article covers two ways to add a layer: with the Data Source Manager and by dragging and dropping.

Add a layer with the Data Source Manager

The Data Source Manager is the basic way to add a layer.

To open the Data Source Manager, choose Layer → Data Source Manager from the menu bar.

Choose Data Source Manager from the Layer menu
Choose Data Source Manager from the Layer menu

The left side of the Data Source Manager lists data of various formats and sources. Start by choosing the type of data you want to add.

Because you want to add a Shapefile, select the Vector tab. Then click the ... button to the right of Vector Dataset(s) under Source.

Click the ... button
Click the ... button

A file selection dialog opens. Select the data you want to add to QGIS.

To add Shapefile data, select the file with the .shp extension and click Open.

Select the .shp file you want to add to QGIS
Select the .shp file you want to add to QGIS

Back in the Data Source Manager, the Vector Dataset(s) field now shows the path of the data you selected.

Click the Add button at the bottom.

Check the Vector Dataset(s) field and click the Add button
Check the Vector Dataset(s) field and click the Add button

Close the Data Source Manager and check the map canvas. The administrative area data for Tokyo appears. The data includes the islands, so the overall picture is hard to see.

The administrative area data for Tokyo appears (created by processing “National Land Numerical Information (Administrative Area Data)” (MLIT))
The administrative area data for Tokyo appears (created by processing “National Land Numerical Information (Administrative Area Data)” (MLIT))

Add a layer by dragging and dropping

You can also add data to QGIS easily by dragging and dropping files.

Open the folder that contains the data, and drag and drop the .shp file into the QGIS window.

Add the .shp file by dragging and dropping it into the QGIS window
Add the .shp file by dragging and dropping it into the QGIS window

The administrative area data for Tokyo appears on the map canvas.

The administrative area data for Tokyo appears (created by processing “National Land Numerical Information (Administrative Area Data)” (MLIT))
The administrative area data for Tokyo appears (created by processing “National Land Numerical Information (Administrative Area Data)” (MLIT))

Add multiple layers to QGIS at once

The steps above added a single dataset to QGIS. Adding a large amount of data one file at a time is tedious, so this section also covers how to add multiple datasets to QGIS at the same time.

This section uses Global Map Japan, published by the Geospatial Information Authority of Japan (GSI).

https://www.gsi.go.jp/kankyochiri/gm_jpn.html

Add layers with the Data Source Manager

Open the Data Source Manager and the file selection dialog as before.

You can select multiple layers as they are, but showing only .shp files makes the data easier to select. Click the drop-down at the bottom that reads All files, and select ESRI Shapefiles from the list.

Select ESRI Shapefiles from the drop-down
Select ESRI Shapefiles from the drop-down

The files in the folder are now filtered to .shp files only. Select the data you want to add, then click the Open button at the bottom.

Select the data you want to add, then click the Open button at the bottom
Select the data you want to add, then click the Open button at the bottom

The rest is the same as before. Check that the paths of the layers you selected now appear in Vector Dataset(s) in the Data Source Manager, and click Add.

Click Add
Click Add

QGIS adds all the selected layers at once.

Multiple layers appear at once (created by processing Global Map Japan (GSI))
Multiple layers appear at once (created by processing Global Map Japan (GSI))

Add layers by dragging and dropping

Adding multiple layers by dragging and dropping follows basically the same steps.

Here too, showing only .shp files makes the data easier to select, so filter the files first.

Open the folder, click the ∨ button in the Type column, and check SHP File.

Check SHP File in the filter
Check SHP File in the filter

Only the .shp files are shown. Next, select multiple .shp files and drag and drop them into the QGIS window.

Select multiple .shp files and drag and drop them into the QGIS window
Select multiple .shp files and drag and drop them into the QGIS window

QGIS adds all the layers at once.

Multiple layers appear at once (created by processing Global Map Japan (GSI))
Multiple layers appear at once (created by processing Global Map Japan (GSI))

If QGIS asks you to specify a coordinate reference system

When you add a Shapefile to QGIS, you may see the Specify CRS for layer xxx dialog, where you choose a coordinate reference system (CRS), as shown below.

The dialog for specifying the CRS
The dialog for specifying the CRS

This dialog appears because the Shapefile you are adding has no .prj file, so QGIS cannot tell which CRS the layer uses.

The list of files in the National Land Numerical Information Lake Data (source: National Land Numerical Information)
The list of files in the National Land Numerical Information Lake Data (source: National Land Numerical Information)

When this dialog appears, first check which CRS the layer uses.

The data used here is the Lake Data from National Land Numerical Information. The Lake Data page states that the CRS is “JGD2000 / (B, L)”.

The page states that the CRS is “JGD2000 / (B, L)” (source: National Land Numerical Information)
The page states that the CRS is “JGD2000 / (B, L)” (source: National Land Numerical Information)

This means the layer uses a latitude and longitude (B, L) CRS based on the Japanese Geodetic Datum 2000 (JGD2000), so select that CRS in the dialog.

First, enter JGD2000 in the Filter field. This filters the list under Predefined Coordinate Reference Systems. Click Geographic (2D), the group for latitude and longitude CRSs, select JGD2000 (EPSG:4612) inside it, and click OK.

Select JGD2000 (EPSG:4612), then click OK
Select JGD2000 (EPSG:4612), then click OK

Check the map canvas. The Lake Data overlaps the base map and appears in the correct position.

The lake data appears on top of the base map (created by processing “National Land Numerical Information (Lake Data)” (MLIT) with OpenStreetMap in the background, © OpenStreetMap contributors)
The lake data appears on top of the base map (created by processing “National Land Numerical Information (Lake Data)” (MLIT) with OpenStreetMap in the background, © OpenStreetMap contributors)

If you do not set the CRS correctly, the layer appears displaced from its actual location. So when the CRS dialog appears, check which CRS the layer you are adding uses, and set it correctly.

Conclusion

Using a Shapefile as an example, this article explained how to add layers to QGIS: the basics of handling data and the steps for adding multiple layers efficiently.

You can add layers with either the Data Source Manager or drag and drop, so use whichever method you prefer.

About the author
QGIS LAB Editorial Team
QGIS LAB Editorial Team

QGIS LAB is a comprehensive information hub for QGIS, the open-source GIS software. Under the concept of “Geospatial for Greater Good,” we share the knowledge and skills to open up the world through location data.