7. QGIS图形用户界面

QGIS图形用户界面 (GUI) 如下图所示 (黄色圆圈中的数字 1 到 5 表示QGIS图形用户界面的重要元素,将在下面讨论)。

../../../_images/startup.png

图 7.1 带阿拉斯加样本数据的QGIS图形用户界面

备注

根据操作系统和窗口管理器的不同,窗口装饰(标题栏等)可能会有所不同。

QGIS主界面 (图 7.1) 由五个组件类型构成:

  1. 菜单栏

  2. 工具栏

  3. 面板

  4. 地图视图

  5. 状态栏

向下滚动,并查看这些内容的详细说明。

7.2. 面板和工具栏

视图 菜单 (或 kde 设置),您可以打开和关闭QGIS控件 (面板 ►) 和工具栏 (工具栏 ►)。要 (取消) 激活其中任何一项,请右键单击菜单栏或工具栏,选择所需项。面板和工具栏可以在QGIS界面中移动和放置在任何你喜欢的地方。该列表还可以通过激活 核心或外部插件 进行扩展。

7.2.1. 工具栏

工具栏提供了对菜单中大多数功能的访问,以及与地图交互的其他工具。每个工具栏项都有可用的弹出帮助。将鼠标悬停在所选项上,将显示工具用途的简短描述。

可用工具栏包括:

表 7.16 QGIS Toolbars

Toolbar name

工具主要参考资料

高级数字化

Advanced digitizing

注记

Annotation Tools

属性

属性表操作, 常用工具

数据源管理器

管理数据源

数据库

DB Manager Plugin

数字化

Digitizing an existing layer

GRASS

GRASS GIS Integration

帮助

标注

The Label Toolbar

图层管理

Opening Data

地图浏览

探索地图视图

Mesh Digitizing

Editing a mesh layer

插件

插件

工程

使用工程文件, Laying out the maps, 样式库

处理算法

Configuring the Processing Framework

栅格

插件

选择

Selecting features

形状数字化

Shape digitizing

捕捉

Setting the snapping tolerance and search radius

矢量

插件

Web

插件, MetaSearch Catalog Client

备注

第三方插件可以使用自己的工具或提供其自己的工具栏扩展默认工具栏。

小技巧

恢复工具栏

如果不小心隐藏了工具栏,您可以使用 视图 ► 工具栏 ► (或 kde 设置 ► 工具栏 ►)将其恢复。如果由于某种原因,工具栏 (或任何其他控件) 完全从界面中消失,您可以在 恢复初始GUI 中找到恢复它的提示。

7.2.2. 面板

QGIS提供了许多面板。面板是特殊控件,可以与之交互的 (选择选项、复选框、填充值…) 执行更复杂的任务。

以下是QGIS提供的默认面板列表:

表 7.17 QGIS Panels

Panel name

快捷键

参考

高级数字化

Ctrl+4

The Advanced Digitizing panel

Browser

Ctrl+2

The Browser Panel

Browser (2)

The Browser Panel

Debugging/Development Tools

F12

Debugging/Development Tools Panel

Elevation Profile

Geometry Validation

Digitizing Properties

GPS Information

Ctrl+0

Live GPS tracking

GRASS Tools

GRASS GIS Integration

Layer Order

Ctrl+9

Layer Order Panel

Layer Styling

Ctrl+3

Layer Styling Panel

Layers

Ctrl+1

Layers Panel

Log Messages

Log Messages Panel

Overview

Ctrl+8

Overview Panel

Processing Toolbox

The Toolbox

Results Viewer

The Toolbox

Snapping and Digitizing Options

Setting the snapping tolerance and search radius

Spatial Bookmark Manager

Ctrl+7

Bookmarking extents on the map

Statistics

Ctrl+6

Statistical Summary Panel

Temporal Controller

时态控制面板

Tile Scale

图块集

Undo/Redo

Ctrl+5

Undo/Redo Panel

Vertex Editor

The Vertex Editor Panel

7.3. 状态栏

状态栏为您提供有关地图视图和已处理或可用操作的一般信息,并提供管理地图视图的工具。

7.3.1. 搜索栏 - 定位器

在状态栏的左侧,搜索栏是一个快速搜索控件,可帮助您查找并运行QGIS中的任何功能或选项:

  1. 在文本控件中单击以激活搜索栏,或按 Ctrl+K

  2. 键入与您要查找的工程相关联的文本 (名称、标签、关键字等)。默认情况下,将启用搜索过滤的返回结果,但您可以通过在文本前面加上 搜索过滤 前缀,将搜索限制在指定范围内,即键入 l cad 将仅返回名称包含 cad 的图层。

    在访问搜索控件时,还可以双击显示的菜单来选择过滤。

  3. 根据项类型,单击搜索结果执行相应的操作。

小技巧

Limit the lookup to particular field(s) of the active layer

默认情况下,使用 "活动图层要素" 过滤 (f) 的搜索将遍历图层的整个属性表。您可以使用 @ 前缀将搜索限制到特定字段。例如 f @name sal@name sal 只返回其 "name" 属性包含 'sal' 的要素。书写时,文本自动补全处于活动状态,建议使用 Tab 键。

A more advanced control on the queried fields is possible from the layer Fields tab. Read Fields Properties for details.

搜索是使用线程处理的,因此即使安装了慢速搜索过滤器,其结果也始终尽快可用。它们也会在遇到过滤时立即出现,这意味着,例如文件搜索过滤会在扫描文件树时逐个显示结果。这确保了用户界面始终响应,即使存在非常慢的搜索过滤 (例如,使用在线服务的过滤)。

备注

The Nominatim locator tool may behave differently (no autocompletion search, delay of fetching results, ...) with respect to the OpenStreetMap Nominatim usage policy.

小技巧

快速访问搜索的配置

单击状态栏上搜索控件内的 search 图标,以显示可使用的过滤列表,以及打开 设置 ► 选项...搜索 标签页的 配置 条目

7.3.2. 汇报行为

In the area next to the locator bar, a summary of actions you've carried out will be shown when needed (such as selecting features in a layer, removing layer, pan distance and direction) or a long description of the tool you are hovering over (not available for all tools).

如果需要执行较长时间的操作,例如在栅格图层中收集统计信息、执行处理算法或在地图视图中渲染多个图层,状态栏中将显示进度条。

7.3.3. 控制地图画布

tracking 坐标 选项显示鼠标的当前位置,在地图视图中移动时跟随鼠标。可以在 工程 ► 工程属性... ► 常规 选项卡中设置单位 (和精度)。单击文本框右侧的小按钮,可以在坐标选项和 extents 范围 选项之间切换,该选项以地图单位显示地图视图当前左下角和右上角的坐标。

在显示坐标旁边,您会看到 比例 显示,它显示地图视图的比例。有一个比例选择器,允许您在 预定义和自定义比例 之间进行选择。

On the right side of the scale display, press the lockedGray button to lock the scale to use the magnifier to zoom in or out. The magnifier allows you to zoom in to a map without altering the map scale, making it easier to tweak the positions of labels and symbols accurately. The magnification level is expressed as a percentage. If the Magnifier has a level of 100%, then the current map is not magnified, i.e. is rendered at accurate scale relative to the monitor's resolution (DPI). A default magnification value can be defined within Settings ► Options ► Rendering ► Rendering Behavior, which is very useful for high-resolution screens to enlarge small symbols. In addition, a setting in Settings ► Options ► Canvas & Legend ► DPI controls whether QGIS respects each monitor's physical DPI or uses the overall system logical DPI.

在放大镜工具右侧,可以为地图视图定义当前顺时针方向旋转角度,单位为度。

On the right side of the status bar, the checkbox Render checkbox can be used to temporarily suspend the map view rendering (see section Controlling map rendering).

To the right of the checkbox Render function, you find the projectionEnabled EPSG:code button showing the current project CRS. Clicking on this opens the Project Properties dialog and lets you reproject the map view or adjust any other project property.

小技巧

计算地图画布的正确比例

启动QGIS时,默认的CRS为 WGS 84 (EPSG 4326) ,单位为度。这意味着QGIS将按照指定的度数解释图层中的任何坐标。要获得正确的比例值,可以在 工程 ► 工程属性... 下的 常规 选项卡中手动更改此设置 (例如为米),或者您可以使用上面看到的 projectionEnabled EPSG:代码 图标。在后一种情况下,单位设置为工程投影指定的单位 (例如 +units=us-ft)。

Note that CRS choice on startup can be set in Settings ► Options ► CRS Handling.

7.3.4. 实时信息

点击 messageLog 信息 按钮打开 日志信息面板,其中包含有关底层进程的信息 (QGIS启动、插件加载、处理工具等)