31.3. Appendix C: QGIS File Formats

31.3.1. QGS/QGZ - QGIS工程文件格式



  • 工程标题

  • 工程参考坐标系

  • 图层树

  • 捕捉设置

  • 关系

  • 地图画布范围

  • 工程模型

  • 图例

  • mapview docks (2D and 3D)

  • the layers with links to the underlying datasets (data sources) and other layer properties including extent, SRS, joins, styles, renderer, blend mode, opacity and more.

  • 工程属性

The figures below show the top level tags in a QGS file and the expanded ProjectLayers tag.


图 31.1 The top level tags in a QGS file


图 31.2 The expanded top level ProjectLayers tag of a QGS file

31.3.2. QLR - QGIS 图层定义文件定义


The use case for this file is simple: To have a single file for opening a data source and bringing in all the related style information. QLR files also allow you to mask the underlying datasource in an easy to open file.

An example of QLR usage is for opening MS SQL layers. Rather than having to go to the MS SQL connection dialog, connect, select, load and finally style, you can simply add a .qlr file that points to the correct MS SQL layer with all the necessary style included.



图 31.3 The top level tags of a QLR file

31.3.3. QML - QGIS样式文件格式



The figure below shows the top level tags of a QML file (with only renderer_v2 and its symbol tag expanded).


图 31.4 The top level tags of a QML file (only the renderer_v2 tag with its symbol tag is expanded)