QGIS Basic Skills | 8 Getting to Know Data Sources

Friends who are new to GIS often can’t figure out the difference and connection between data source and layer , which leads to some problems in data processing and distribution, for example: working hard to make a beautiful picture Map, why does the map look ugly when I open the data again? How can I distribute the work results to my colleagues so that when he opens the data, the effect is exactly the same as my own machine?

 

To answer these questions, we need to start with the basic concepts of data sources.

 

This article introduces the data source related knowledge as a whole from the aspects of the difference and connection of data sources and layers, opening the data source manager, the introduction of the data source manager interface and the types of data sources supported by QGIS. Subsequent articles will be published, detailing the creation, opening, and management of different data sources.

 

 01 Data source and layer

 

Data source (Data Source) As the name suggests refers source of the data is a physical data storage, embodied as a data file or database on a hard drive tables. Data sources in QGIS mainly refer to files, databases or network data services of various types of geospatial data. At the same time, QGIS also has the ability to process non-spatial data that is pure attribute data.

 

Layer (Layer) data itself is not stored, typically used to display the map data define the spatial window, a visual expression geospatial data. The layer is associated with a specific data source and uses cartographic elements such as symbols and labels to draw the data on the map.

 

Overlay multiple layers to get a rich map .

 

Image source: https://blog.csdn.net/dsac1/article/details/78027574

 

In layman's terms, the data source is a file stored on the computer hard disk. The layer is the way of expressing the data. QGIS sets the map symbol, color, line type, filling, etc. for the data for beautiful graphics. Open the data file and set a beautiful style to display the data in the map window, which is called a map .

 

In QGIS, the data source is generally displayed in the [Browse] panel, and the [Layer] panel lists the layers drawn in the current map window.

 

 

The same data can be drawn in the map window in different styles. In the [Layer] panel, right-click the layer and click [Create Layer Copy] to create different layer copies for the same data.

 

 

When the layer copy is completed, the top of the map window will prompt that the copy uses the same data source:

 

 

Set the styles of the two layers separately, and you can see the effect of superimposing two layers of the same data source. This is a commonly used drawing technique, usually used to highlight the boundary of the study area.

 

 

 02 Open the data source

 

In QGIS, there are the following ways to open the data source:

  • Click the menu [Layer] -> [Add Layer], and select the corresponding submenu according to the data source type:

 

 

  • According to the data source type, click the corresponding button on the [Layer Management] toolbar:

 

  • Click the [Open Data Source Manager] button on the [Data Source Management] toolbar, and then switch to the corresponding tab:

 

 

In fact, the above methods all open the same interface: the [Data Source Manager] dialog box.

 

 03 Introduction to the data source manager interface

 

[Data Source Manager] is the default data loading tool of QGIS. It provides an operation interface for opening vector data, raster data, mesh data, database data and network data in a consistent style.

 

[Data Source Manager] The interface is divided into two parts: the left side is the data source type tab page, and the right side is the parameter setting area corresponding to the data source type.

 

Click the data source type on the left to switch to the corresponding tab. The right area displays different setting options. After completing the settings, click the [Add] button below to add the corresponding data to the [Layer] panel. The data of the geometric figures will simultaneously display the spatial figures in the map window.

 

 

  • Browse tabs

 

[Data Source Manager] On the top left side is the [Browse] tab. In fact, this tab page embeds the [Browse] panel of the main interface into the [Data Source Manager]. The functions and operations of the two are exactly the same: click to expand each node, you can view the layer file, project file, Python QGIS resources such as scripts and model files, drag and drop or double-click to open the file, if it is a spatial data file, it will be displayed in the map window.

 

 

(For the operation of [Browser Panel], please refer to: Serial | 7 Practical Skills of Browser Panel )

 

  • File data source

 

Switch to the vector and raster tab page, specify the data storage path, and then open the file vector data and raster data.

 

 

As part of the open source software ecosystem, QGIS's support for data files is built on the basis of OGR/GDAL open source libraries, so the ability to read and write data also depends on the data engine provided by these open source libraries.

 

  • Vector data: Support GeoPackage, GML, GeoJSON, GPX, KML, delimited text, ESRI format (Shapefile, OpenFileGDB, FileGDB, etc.), MapInfo format (TAB, MIF), MicroStation format, AutoCAD DWG/DXF, GRASS, etc. (Open the webpage: https://gdal.org/drivers/vector/index.html to learn more about vector data format support.)

  • Raster data: GeoTIFF, JPEG, ASCII Gridded XYZ, MBTiles, R or Idrisi rasters, GDAL Virtual, SRTM, Sentinel Data, ERDAS IMAGINE, ArcInfo Binary Grid, ArcInfo ASCII Grid, etc. (Open the URL: https://gdal.org/drivers/raster/index.html to view the complete raster data support list.

 

  • Mesh (mesh layer) data source

Mesh data is a kind of unstructured grid data, which is composed of vertices, edges, and faces. It is often used to simulate analysis results, such as atmospheric movement, flooding, pollutant diffusion, etc.

 

In [Data Source Manager], switch to the mesh tab page, you can see the interface to open mesh data.

 

 

QGIS provides mesh data support through MDAL. MDAL is an open source library. The github address is: https://github.com/lutraconsulting/MDAL.

 

The mesh data supports the following formats:

 

NetCDF: Commonly used format, mostly used in scientific research.

GRIB: Generally used in the meteorological field.

XMDF: As the output result simulation of TUFLOW model.

DAT: The data output format of a variety of water flow dynamics model packages, such as: BASEMENT, HYDRO_AS-2D, TUFLOW.

3Di: The data format used by the 3Di model package.

 

  • Delimited text file

 

Text files include txt, csv, dat, wkt and other file formats. Use delimited text files to import text files with spatial location information into QGIS, restore their spatial graphics, and display them in the map window.

 

 

  • database

As file-type data sources have some problems in storage capacity, performance, security, and data sharing, in large-scale projects, GIS data is generally stored and managed by databases.

 

QGIS supports PostgreSQL/PostGIS, SQLite/SpatiaLite, Oracle, DB2, MSSQL Spatial, MySQL and other databases.

 

  • Network data source

 

Network maps and data services can usually provide high-quality base maps and data sources, and overlay your own business data to quickly obtain analysis results.

 

QGIS supports open network map and data services including: WM(T)S, WFS, WCS, CSW, XYZ tiles, ArcGIS services, etc.

 

  • QGIS format data source

 

QGIS custom data formats include: QML files, virtual data sources and memory data sources, etc.

 

 04 Summary

 

QGIS's rich data support capabilities can meet general work and study needs. For some special data format and data storage needs, capable friends can achieve it by writing plug-ins or modifying the underlying code. This is also one of the advantages of open source software.


In the process of using QGIS to manage data, you need to pay special attention to the different organization of data due to different types of data sources. For example, MapInfo's TAB format and AutoCAD's DXF format allow the storage of points, lines, areas and other geometric figures in one layer , And a layer in QGIS only stores one type of geometric figure. This difference leads to changes in the storage of the data after importing, and it may be necessary to reorganize the layer content, or evaluate whether QGIS is the best choice to solve the current problem.

 

Article recommendation

Serial | 7 Practical Skills of Browser Panel

Serial | 6 Advanced Layers (3)-Quickly Beautify Layer Data

Serial|5 Advanced QGIS Layer (2)-Connection Attribute Table

4 QGIS 3.x advanced layer (1) create and edit layers

Serialization | 3 Picture check attributes, attribute check pictures

Serial | 2 layer basic operation

Serial | 1 Download and installation of QGIS

 

 

Copyright Notice

 

This article welcomes reprinting, please indicate the source when reprinting.

 

 

Guess you like

Origin blog.csdn.net/QGISClass/article/details/108784769