2.3. |LS|导航地图画布

本节将重点介绍用于在地图画布中导航的基本QGIS导航工具,这些工具允许您直观地浏览不同比例的图层。

本课程的目标: 学习如何在QGIS中使用平移和缩放工具,并了解地图比例尺。

2.3.1. basic Follow Along: 基本导航工具

学习如何在地图画布中导航之前,让我们添加一些可以在本教程中使用的图层。

  1. 打开一个新的空白工程,并使用在:ref:创建地图<tm_prepare_a_map>`中学习的步骤,将之前看到的``protected_areas`roads``buildings``图层加载到该工程中。最终视图应类似于如下:numref:`figure_roads_buildings_added`中的样式(颜色无关紧要):

    ../../../_images/roads_buildings_added.png

    图 2.4 添加Protected areas、roads和buildings图层

先来学习如何使用平移工具。

  1. 在`地图浏览工具栏`中,确保已激活|平移| :sup:`平移`按钮。

  2. 将鼠标移动到地图画布区的中心。

  3. 左键单击并按住,然后向任意方向拖动鼠标以平移地图。

接下来,放大并仔细查看我们导入的图层。

  1. 在`地图浏览工具栏`中,单击|zoomIn| :sup:`放大`按钮。

  2. Move your mouse to approximately the top left area of where there is the highest density of buildings and roads.

  3. 左键单击并按住。

  4. Then drag the mouse, which will create a rectangle, and cover the dense area of buildings and roads (图 2.5).

    ../../../_images/zoom_in.png

    图 2.5 放大

  5. Release the left click. This will zoom in to include the area that you selected with your rectangle.

    ../../../_images/zoomed_in.png
  6. To zoom out, select the zoomOut Zoom Out button and perform the same action as you did for zooming in.

As you pan, zoom in, or zoom out, QGIS saves these views in a history. This allows you to backtrack to a previous view.

  1. In the Map Navigation Toolbar, click on zoomLast Zoom Last button to go to your previous view.

  2. Click on zoomNext Zoom Next button to proceed to move forward in your history.

Sometimes after exploring the data, we need to reset our view to the extent of all the layers. Instead of trying to use the Zoom Out tool multiple times, QGIS provides us with a button to do that action for us.

  1. Click on the zoomFullExtent Zoom Full Extent button.

As you zoomed in and out, notice that the Scale value in the Status Bar changes. The Scale value represents the Map Scale. In general, the number to the right of : represents how many times smaller the object you are seeing in the Map Canvas is to the actual object in the real world.

../../../_images/map_scale1.png

You can also use this field to set the Map Scale manually.

  1. In the Status Bar, click on the Scale textfield.

  2. Type in 50000 and press Enter. This will redraw the features in the Map Canvas to reflect the scale you typed in.

  3. Alternatively, click on the options arrow of the Scale field to see the preset map scales.

    ../../../_images/map_scale_options.png
  4. Select 1:5000. This will also update the map scale in the Map Canvas.

Now you know the basics of navigating the Map Canvas. Check out the User Manual on Zooming and Panning to learn about alternative ways of navigating the Map Canvas.

2.3.2. In Conclusion

Knowing how to navigate the Map Canvas is important, as it allows one to explore and visually inspect the layers. This could be done for initial data exploration, or to validate output of a spatial analysis.