As part of an Open Source Software ecosystem, QGIS is built upon different libraries that, combined with its own providers, offer capabilities to read and often write a lot of formats:
Vector data formats include ESRI formats (Shapefile, Geodatabase…), MapInfo and MicroStation file formats, AutoCAD DWG/DXF, GeoPackage, GeoJSON, GRASS, GPX, KML, Comma Separated Values, and many more… Read the complete list of OGR vector supported formats.
Raster data formats include ArcInfo Binary Grid, ArcInfo ASCII Grid, JPEG, GeoTIFF, ERDAS IMAGINE, MBTiles, R or Idrisi rasters, ASCII Gridded XYZ, GDAL Virtual, SRTM, Sentinel Data, and many more… Read the complete list of raster supported formats.
Database formats include PostgreSQL/PostGIS, SQLite/SpatiaLite, Oracle, DB2 or MSSQL Spatial, MySQL…
Support of web data services (WM(T)S, WFS, WCS, CSW, ArcGIS Servers…) is also handled by QGIS providers (see QGIS como Cliente de Datos OGC).
You can also read supported files from archived folders and use QGIS native formats such as virtual and memory layers.
As of the date of this document, more than 80 vector and 140 raster formats are supported by the GDAL/OGR and QGIS native providers.
Not all of the listed formats may work in QGIS for various reasons. For
example, some require external proprietary libraries, or the GDAL/OGR
installation of your OS may not have been built to support the format you
want to use. To see the list of available formats, run the command line
ogrinfo --formats (for vector) and
gdalinfo --formats (for raster),
or check menu (for raster)
In QGIS, depending on the data format, there are different tools to open it, mainly available in the Manage Layers toolbar (enabled through menu). However, all these tools point to a unique dialog, the Data Source Manager dialog that you can directly open with the Open Data Source Manager button available on the Data Source Manager Toolbar or by pressing Ctrl+L. Indeed, the Data Source Manager dialog offers a unified interface to open vector or raster file-based data as well as databases or web services supported by QGIS. It can be set modal or not with the Modeless data source manager dialog in menu.menu or from the
Beside this main entry point, you also have the DB Manager plugin that offers advanced capabilities to analyze and manipulate connected databases. More information on DB Manager capabilities are exposed in DB Manager Plugin.
There are also many other tools, native or third-party plugins, that help you open dedicated data formats.
This chapter will describe only the tools provided by default in QGIS to load data. It will mainly focus on the Data Source Manager dialog but more than describing each tab, it will also explore the tools based on the data provider or format specificities.
The Browser is one of the main ways to quickly and easily add your data to projects. It’s available as:
In both cases, the Browser helps you navigate in your file system and manage geodata, regardless the type of layer (raster, vector, table), or the datasource format (plain or compressed files, database, web services).
The context menu for an element in the Browser panel is opened by right-clicking on it.
For file system directory entries, the context menu offers the following:
Add as a Favorite
Hide from Browser
Fast Scan this Directory
Favourites, can also be removed and renamed:
For leaf entries that can act as layers in the project, the context menu will have a selection of entries. For example, for non-database, non-service-based vector, raster and mesh data sources:
Add Selected Layer(s) to Canvas
Delete File «<name of file>»…
Metadata for the layer. Metadata groups: Information from provider (if possible, Path will be a hyperlink to the source), Identification, Extent, Access, Fields (for vector layers), Bands (for raster layers), Contacts, Links (for vector layers), References (for raster layers), History.
A Preview panel
The attribute table for vector sources (in the Attributes panel).
To add a layer to the project using the Browser:
Enable the Browser as described above. A browser tree with your file system, databases and web services is displayed. You may need to connect databases and web services before they appear (see dedicated sections).
Find the layer in the list.
Open a QGIS project directly from the browser
You can also open a QGIS project directly from the Browser panel by double-clicking its name or by drag-and-drop into the map canvas.
Once a file is loaded, you can zoom around it using the map navigation tools. To change the style of a layer, open the Layer Properties dialog by double clicking on the layer name or by right-clicking on the name in the legend and choosing from the context menu. See section Symbology Properties for more information on setting symbology of vector layers.
At the top of the Browser panel, you find some icons that help you to:
Filter Browser to search for specific data. Enter a search word or wildcard and the browser will filter the tree to only show paths to matching DB tables, filenames or folders – other data or folders won’t be displayed. See the Browser Panel(2) example on the figure_browser_panels. The comparison can be case-sensitive or not. It can also be set to:
normal: return any item containing the search text;
using wildcard(s): fine tune the search using
*characters to specify the position of the search text;
empleando una expresión regular.
Right-click an item in the browser tree helps you to:
in case of file or table, display its metadata or open it in your project. Tables can even be renamed, deleted or truncated;
in case of folder, bookmark it into your favourites, hide it from the browser tree. Hidden folders can be managed from thetab;
create connection to databases or web servers;
refresh, rename or delete schema.
You can also import files into databases or copy tables from one schema/database to another one with a simple drag-and-drop. There is a second browser panel available to avoid long scrolling while dragging. Just select the file and drag-and-drop from one panel to the other.
Add layers to QGIS by simple drag-and-drop from your OS file browser
You can also add file(s) to the project by drag-and-dropping them from your operating system file browser to the Layers Panel or the map canvas.
The DB Manager Plugin is another one of the main and native tools to integrate and manage spatial database formats supported by QGIS (PostGIS, SpatiaLite, GeoPackage, Oracle Spatial, MSSQL, DB2, Virtual layers) in one user interface. It can be activated from the menu.
connect to databases and display its structure and contents;
preview tables of databases;
add layers to map canvas, either by double-click or drag-and-drop;
add layers to a database from the QGIS Browser or from another database;
create and add output of SQL queries to the map canvas;
create virtual layers.
More information on DB Manager capabilities are exposed in DB Manager Plugin.
Beside Browser Panel and DB Manager, the main tools provided by QGIS to add layers regardless the format, you’ll also find tools that are specific to data providers.
Some external plugins also propose tools to open specific format files in QGIS.
To load a layer from a file, you can:
for vector data (like Shapefile, Mapinfo or dxf layer), click on Add Vector Layer toolbar button, select the Add Vector Layer menu option or press Ctrl+Shift+V. This will bring up a new window (see figure_vector_add) from which you can check File and click on Browse. You can also specify the encoding for the file if desired.
That will bring up a standard open file dialog (see figure_vector_open), which
allows you to navigate the file system and load a shapefile, a geotiff or other
supported data source. The selection box Filter
allows you to preselect some supported file formats. Only the formats that have
been well tested appear in the list. Other untested formats can be loaded by
All files (*.*).
Selecting a file from the list and clicking Open loads it into QGIS.
More than one layer can be loaded at the same time by holding down the
Ctrl or Shift key and clicking on multiple items in the dialog.
Figure_vector_loaded shows QGIS after loading the
Because some formats like MapInfo (e.g.,
.tab) or Autocad (
allow mixing different types of geometry in a single file, loading such format
in QGIS opens a dialog to select geometries to use in order to have one
geometry per layer.
You can also load specific formats like
ArcInfo Binary Coverage,
UK. National Transfer Format, as well as the raw TIGER format of the
US Census Bureauor
OpenfileGDB. To do that, you’d need to select Directory as Source type. In this case a directory can be selected in the dialog after pressing Browse.
With the Database source type you can select an existing database connection or create one to the selected database type. Available database types are
Esri Personal Geodatabase,
MySQLas well as
Pressing the New button opens the Create a New OGR Database Connection dialog whose parameters are among the ones you can find in Crear una conexión almacenada. Pressing Open you can select from the available tables for example of the PostGIS enabled database.
Load layers and projects from mounted external drives on macOS
On macOS, portable drives that are mounted beside the primary hard drive
do not show up as expected under
/Volumes in the File name box
and press Enter. Then you can navigate to external drives and network
Delimited text file (e.g.
.txt) can be loaded in QGIS
using the tools described above. However, loaded this way, it’ll show up like a
simple table data. Sometimes, delimited text files can contain geometric data
you’d want to visualize; this is what the Add
Delimited Text Layer is designed for.
Click the Open Data Source Manager icon to open the Data Source Manager dialog and enable the Delimited Text tab, as shown in figure_delimited_text.
First, select the file to import (e.g.,
by clicking on the Browse button. In the Layer name field,
provide the name to use for the layer in the project (e.g.,
Once the file is selected, QGIS attempts to parse the file with the most recently used delimiter, trying to identify fields and rows. To enable QGIS to properly parse the file, it is important to select the correct delimiter. You can specify a delimiter by activating:
Other than settings to identify rows and fields in the data, some convenient options can be used to tweak the data recognition:
Number of header lines to discard: convenient when you want to avoid some lines to show in the import, either because those are blank lines or with another formatting.
As you set the parser properties, a sample data preview updates at the bottom of the dialog.
Once the file is parsed, set Geometry definition to
Point coordinates and provide the X field and Y field if the layer is of point geometry type and contain such coordinate fields. If the coordinates are defined as degrees/minutes/seconds, activate the DMS coordinates checkbox;
Well known text (WKT) option if the spatial information is represented by WKT: select the Geometry field containing the WKT definition and choose the approriate Geometry field or let QGIS auto-detect it;
Additionally, you can enable:
Use subset index to improve performance of subset filters (when defined in the layer properties);
At the end, click OK to add the layer to the map. In our example, a
point layer named
Elevation is added to the project and behaves like any
other map layer in QGIS. However, this layer is the result of a query on the
.csv source layer (hence, linked to it) and would require to be
saved in order to get a spatial layer on disk.
DWG files can be added to QGIS by simple drag-and-drop
from the common
Browser Panel. You’ll be prompted to select the sublayers you’d like to add
to the project. Layers are added with random style properties.
DXF files containing several geometry types (point, line and/or polygon), the name of the layer will be made from <filename.dxf> entities <geometry type>.
To keep the dxf/dwg file structure and its symbology in QGIS, you may want to use the dedicatedtool which allows you to:
import elements from the drawing file into a GeoPackage database.
and add to the project any of the imported elements.
In the DWG/DXF Import dialog, to first import the drawing file contents:
Input the location of the Target package, i.e. the new GeoPackage file that will store the data. If an existing file is provided, then it will be overwritten.
Specify the coordinate reference system of the data in the drawing file.
Use the Import button to select the DWG/DXF file to use (one per geopackage). The GeoPackage database will be automatically populated with the drawing file content. Depending on the size of the *CAD file, this could take some time.
.dxf data is imported into the GeoPackage
database the frame in the lower half of the dialog is populated with the list of
layers from the imported file. There you can select which layers to add to the
At the top, set a Group name to group the drawing files in the project.
Check layers to show: Each selected layer is added to an ad hoc group which contains vector layers for the point, line, label and area features of the drawing layer. The style of each layer is setup so that it resembles the look it originally had in *CAD.
Check whether layer should be visible at opening.
Press OK to open the layers in QGIS.
In recent years, the OpenStreetMap project has gained popularity because in many countries no free geodata such as digital road maps are available. The objective of the OSM project is to create a free editable map of the world from GPS data, aerial photography or local knowledge. To support this objective, QGIS provides support for OSM data.
Using the Browser Panel, you can load a
.osm file to the
map canvas, in which case you’ll get a dialog to select sublayers based on the
geometry type. The loaded layers will contain all the data of that geometry type
in the file and keep the
osm file data structure.
or by typing Ctrl+Shift+L.
This will bring up a window that will allow you either to connect to a
SpatiaLite database already known to QGIS, which you can choose from the
drop-down menu, or to define a new connection to a new database. To define a
new connection, click on New and use the file browser to point to
your SpatiaLite database, which is a file with a
QGIS also supports editable views in SpatiaLite.
Loading GPS data in QGIS can be done using the core plugin:
Instructions are described in Section Plugin de GPS.
QGIS proposes two custom formats you can load in the application using their own loading tool:
Layer definitions can be saved as a
Layer Definition File (QLR -
in the layer
The QLR format makes it possible to share «complete» QGIS layers with other QGIS users. QLR files contain links to the data sources and all the QGIS style information necessary to style the layer.
QLR files are shown in the Browser Panel and can be used to add layers (with their saved styles) to the Layers Panel. You can also drag and drop QLR files from the system file manager into the map canvas.