Docs
11 Import
Introduction
In QGIS, you can import different types of data, including vector data, raster data and web map services such as WMS (Web Map Service). Importing data is a crucial step in visualizing, analyzing and editing geographic information. QGIS supports a variety of file formats and data sources that enable access to local and external geodata.
1. import of vector data
A. Add vector data
- Add vector layer:
- In the menu bar, select Layer > Add layer > Vector layer… or click on the Add vector layer icon in the toolbar.
- Select file format:
- You can select the file format of the vector data set in the dialog box. QGIS supports numerous formats such as Shapefile (.shp), GeoJSON, KML and GML.
- Select file:
- Click on Browse and navigate to the file location. Select the file and click on Open.
- Configure layer options:
- If necessary, you can specify a coordinate system (CRS) in the options. Then click on Add to import the data and display it on the map.
B. Importing vector data from a database
- Establish database connection:
- Select Layer > Add Layer > PostGIS Layer… (or another database format such as SpatiaLite or Oracle Spatial).
- Enter connection parameters:
- Enter the connection details (host, port, user name, password, database name) and click on Connect.
- Select levels:
- Select the vector data you want to import from the list of available layers in the database and click on Add.
2. import of raster data
A. Add grid layer
- Add grid layer:
- Select Layer > Add layer > Raster layer… or click on the Add raster layer icon in the toolbar.
- Select file:
- Click on Browse and select the raster file (e.g. TIFF, JPEG, PNG). Then click on Open.
- Define coordinate system:
- If the raster image does not have an embedded CRS, you can set the coordinate system manually. Then click on Add to display the raster data in QGIS.
B. Importing georeferenced raster data
- Check georeferencing:
- Make sure that the raster image is georeferenced, i.e. that it contains spatial reference points. If not, you can use the georeferencing tool in QGIS to georeference the image.
- Add grid:
- Georeferenced raster data can be added like normal raster layers. Select the file and add it to the map.
3. import of WMS services (Web Map Service)
A. Add WMS layer
- Add WMS layer:
- Select Layer > Add layer > WMS/WMTS-Layer….
- Create new WMS connection:
- Click on New and enter the URL of the WMS service. Name the connection and click OK to save the connection.
- Load WMS data:
- Select the newly created WMS connection and click on Connect. A list of available layers is displayed. Select the desired layers and click on Add to load the map layers.
B. Add WMTS and WFS services
- Add WMTS layer:
- For Web Map Tile Services (WMTS) you can follow similar steps as for WMS by selecting WMTS-Layer instead of WMS-Layer.
- Add WFS layer:
- Select Layer > Add Layer > WFS/OGC API – Features…. Here you can add WFS services similar to WMS services and load vector data from a web server.
4. import data via drag & drop
- Pull data into QGIS:
- Drag the data file (e.g. shapefile, GeoTIFF) directly from your file explorer into the QGIS main window.
- Check level properties:
- The file is automatically added as a new layer. Check the properties to ensure that all data has been imported correctly.
5. solve problems during import
A. Troubleshooting CRS problems
- Recognize CRS conflicts:
- If the imported data is not displayed correctly on the map, this could indicate a conflict in the coordinate system.
- Change coordinate system:
- Change the CRS of the imported layer via Layer properties > Source > CRS.
B. Import of large amounts of data
- Minimize performance problems:
- The performance of QGIS can be impaired with large data sets. Use database connections or spatial indices to process the data more efficiently.
- Data breakdown:
- Split large vector data into smaller, more manageable parts or filter the data as required before importing.
6. best practices for data import
- Check the data structure: Make sure that your data is well organized and that the file names do not contain any special characters.
- Backup copies: Always have a backup copy of your original data ready in case problems occur during import.
- Standardize CRS: Use a standardized coordinate system for all data in your project to avoid compatibility problems.
- Maintain metadata: Save relevant metadata for the imported files to document the context and origin of the data.
With these steps you can efficiently import data from various sources into QGIS to use it for your GIS analyses and map creation.