Skip to content

Latest commit

 

History

History
1454 lines (1157 loc) · 62.9 KB

File metadata and controls

1454 lines (1157 loc) · 62.9 KB
.. index:: Map view

2D Map View

.. only:: html

   .. contents::
      :local:


The 2D map view (also called Map canvas) is the central place where maps are displayed. QGIS opens by default with a single map view (called main map), showing layers in 2D, and tightly bound to the :guilabel:`Layers` panel. That window reflects the rendering (symbology, labeling, visibilities...) you applied to the loaded layers.

../introduction/img/startup.png

QGIS GUI

.. index:: Zoom, Pan, Map navigation

Exploring the map view

When you add a layer (see e.g. :ref:`opening_data`), QGIS automatically looks for its CRS. If a different CRS is set by default for the project (see :ref:`project_crs`) then the layer extent is "on-the-fly" translated to that CRS, and the map view is zoomed to that extent if you start with a blank QGIS project. If there are already layers in the project, no map canvas resize is performed, so only features falling within the current map canvas extent will be visible.

Click on the map view and you should be able to interact with it, panning or zooming to different areas of the map. Dedicated tools are provided in the :guilabel:`Navigation Toolbar` and in the :menuselection:`View` menu, with handful shortcuts from the keyboard or the mouse buttons.

Map canvas navigation tools
Tool Usage
pan Pan Map
  • Single left click: the map is centered on the clicked point, at the same scale
  • Hold down the left mouse button and drag the map canvas.
zoomIn Zoom In
  • Single left click: the map is centered on the clicked point, while the scale gets doubled
  • Drag a rectangle on the map canvas with the left mouse button to zoom in to an area.
  • Hold the Alt key to switch to the zoomOut Zoom Out tool.
zoomOut Zoom Out
  • Single left click: the map is centered on the clicked point, while the scale gets halved
  • Drag a rectangle on the map canvas with the left mouse button to zoom out from an area.
  • Hold the Alt key to switch to the zoomIn Zoom In tool.
panToSelected Pan Map to Selection Pan the map to the selected features of all the selected layers in the :guilabel:`Layers` panel.
zoomToSelected Zoom To Selection

Zoom to the selected features of all the selected layers in the :guilabel:`Layers` panel.

Also available in the layer contextual menu

zoomToLayer Zoom To Layer(s)

Zoom to the extent of all the selected layers in the :guilabel:`Layers` panel.

Also available in the layer contextual menu

zoomFullExtent Zoom Full Zoom to the extent of all the layers in the project or to the :ref:`project full extent <project_full_extent>`.
zoomLast Zoom Last Zoom the map to the previous extent in history.
zoomNext Zoom Next Zoom the map to the next extent in history.
zoomActual Zoom to Native Resolution

Zoom the map to a level where one pixel of the active raster layer covers one screen pixel.

Also available in the layer contextual menu

Mouse wheel
  • Pan map: Hold and drag the mouse wheel.
  • Zoom: Roll the mouse wheel to zoom in or zoom out. With Ctrl key pressed while rolling the mouse wheel results in a finer zoom.
  • Press the back or forward button to browse the map canvas zoom history.
Keyboard
  • Pan map: Hold down the Space key and move the mouse. Press the arrow keys to pan up, down, left and right.
  • Zoom in: Press PgUp or Ctrl++
  • Zoom out: Press PgDown or Ctrl+-
  • Zoom to area: When certain map tools are active (Identify, Measure...), hold down Shift and drag a rectangle on the map to zoom to that area. Not compatible with active selection or edit tools.

Right-click over the map and you should be able to editCopy :guilabel:`Copy coordinates` of the clicked point in the map CRS, in WGS84 or in a custom CRS. The copied information can then be pasted in an expression, a script, text editor or spreadsheet...

.. index:: Rendering
   single: Rendering; Suspending

Controlling map rendering

By default, QGIS renders all visible layers whenever the map canvas is refreshed. The events that trigger a refresh of the map canvas include:

  • changing the visibility of a layer
  • modifying symbology of a visible layer
  • adding a layer
  • panning or zooming
  • resizing the QGIS window

QGIS allows you to control the rendering process in a number of ways.

To stop the map drawing, press the Esc key. This will halt the refresh of the map canvas and leave the map partially drawn. It may however take a bit of time after pressing Esc for the map drawing to halt.

To suspend rendering, click the checkbox :guilabel:`Render` checkbox in the bottom-right corner of the status bar. When checkbox :guilabel:`Render` is unchecked, QGIS does not redraw the canvas in response to any of the usual triggers mentioned earlier. Examples of when you might want to suspend rendering include:

  • adding many layers and symbolizing them prior to drawing
  • adding one or more large layers and setting scale dependency before drawing
  • adding one or more large layers and zooming to a specific view before drawing
  • any combination of the above

Checking the checkbox :guilabel:`Render` checkbox enables rendering and causes an immediate refresh of the map canvas.

Time-based control on the map canvas

QGIS can handle temporal control on loaded layers, i.e. modify the map canvas rendering based on a time variation. To achieve this, you need:

  1. Layers that have dynamic temporal properties set. QGIS supports temporal control for different data providers, with custom settings. It's mainly about setting the time range in which the layer would display:

    When dynamic temporal options are enabled for a layer, an indicatorTemporal icon is displayed next to the layer in the :guilabel:`Layers` panel to remind you that the layer is temporally controlled. Click the icon to update the temporal settings.

  2. Enable the temporal navigation of the map canvas using the :ref:`Temporal controller panel <temporal_controller>`. The panel is activated:

The temporal controller panel

The :guilabel:`Temporal controller` panel has the following modes:

img/temporal_controller_panel.png

Temporal Controller Panel in navigation mode

  • temporalNavigationOff Turn off temporal navigation: all the temporal settings are disabled and visible layers are rendered as usual
  • temporalNavigationFixedRange Fixed range temporal navigation: a time range is set and only layers (or features) whose temporal range overlaps with this range are displayed on the map.
  • temporalNavigationAnimated Animated temporal navigation: a time range is set, split into steps, and only layers (or features) whose temporal range overlaps with each frame are displayed on the map
  • temporalNavigationMovie Animated movie: a total number of frames is set for the animation, with the map settings advancing at each step, displaying the progression frame by frame without any time-based filtering of data.
  • settings Settings for general control of the animation
    • :guilabel:`Frames rate`: number of steps that are shown per second
    • unchecked :guilabel:`Cumulative range`: all animation frames will have the same start date-time but different end dates and times. This is useful if you wish to accumulate data in your temporal visualization instead of showing a ‘moving time window’ across your data.

Animating a temporal navigation

An animation is based on a varying set of visible layers at particular times within a time range. To create a temporal animation:

  1. Toggle on the temporalNavigationAnimated Animated temporal navigation, displaying the animation player widget

  2. Enter the :guilabel:`Time range` to consider. Using the refresh button, this can be defined as:

  3. Fill in the time :guilabel:`Step` to split the time range. Different units are supported, from seconds to centuries. A source timestamps option is also available as step: when selected, this causes the temporal navigation to step between all available time ranges from layers in the project. It’s useful when a project contains layers with non-contiguous available times, such as a WMS-T service which provides images that are available at irregular dates. This option will allow you to only step between time ranges where the next available image is shown.

  4. Click the play button to preview the animation. QGIS will generate scenes using the layers rendering at the set times. Layers display depends on whether they overlap any individual time frame.

    .. only:: html
    
       .. figure:: img/map_navigation.gif
          :align: center
    
          Temporal navigation through a layer
    
    

    The animation can also be previewed by moving the time slider. Checking the unchecked :guilabel:`Loop` checkbox will repeatedly run the animation while clicking play stops a running animation. A full set of video player buttons is available.

    Horizontal scrolling using the mouse wheel (where supported) with the cursor on the map canvas will also allow you to navigate, or “scrub”, the temporal navigation slider backwards and forwards.

  5. Click the fileSave Export animation button if you want to generate a series of images representing the scene. They can be later combined in a video editor software:

    img/saveTimeAnimation.png

    Exporting map canvas animation scenes to images

The Elevation Controller panel

elevation :guilabel:`Elevation Controller` allows you to handle elevation z-range data in 2D maps. This option currently supports point cloud layers and raster DEMs. Use the panel to visualize and interact with elevation data in the map canvas.

Activate the elevation :guilabel:`Elevation Controller` panel in the map canvas by clicking on the :guilabel:`Data Filtering` in the :guilabel:`View` menu. The elevation :guilabel:`Elevation Controller` appears as a range slider on the left side of the map canvas. At the top of the slider, there is a settings Settings menu where you can:

.. index::
   single: Bookmarks
   see: Spatial bookmarks; Bookmarks

Bookmarking extents on the map

Spatial Bookmarks allow you to "bookmark" a geographic location and return to it later. By default, bookmarks are saved in the user's profile (as :guilabel:`User Bookmarks`), meaning that they are available from any project the user opens. They can also be saved for a single project (named :guilabel:`Project Bookmarks`) and stored within the project file, which can be helpful if the project is to be shared with other users.

Creating a Bookmark

To create a bookmark:

  1. Zoom and pan to the area of interest.

  2. Select the menu option :menuselection:`View -->` newBookmark :menuselection:`New Spatial Bookmark...`, press Ctrl+B or right-click the showBookmarks :guilabel:`Spatial Bookmarks` entry in the :guilabel:`Browser` panel and select :guilabel:`New Spatial Bookmark`. The :guilabel:`Bookmark Editor` dialog opens.

    img/bookmark_editor.png

    The Bookmark Editor Dialog

  3. Enter a descriptive name for the bookmark

  4. Enter or select a group name in which to store related bookmarks

  5. Select the extent of the area you wish to save, using the :ref:`extent selector <extent_selector>` widget

  6. Change the map :guilabel:`Rotation`

  7. Indicate the :guilabel:`CRS` to use for the extent

  8. Select whether the bookmark will be :guilabel:`Saved in` :guilabel:`User Bookmarks` or :guilabel:`Project Bookmarks` (by default, this drop-down list is set to :guilabel:`User Bookmarks`)

  9. Press :guilabel:`Save` to add the bookmark to the list

Note that you can have multiple bookmarks with the same name.

Working with Bookmarks

To use and manage bookmarks, you can either use the :guilabel:`Spatial Bookmarks` panel or :guilabel:`Browser`.

Select :menuselection:`View -->` showBookmarks :menuselection:`Show Spatial Bookmark Manager` or press Ctrl+7 to open the :guilabel:`Spatial Bookmarks Manager` panel. Select :menuselection:`View -->` showBookmarks :menuselection:`Show Bookmarks` or Ctrl+Shift+B to show the showBookmarks :guilabel:`Spatial Bookmarks` entry in the :guilabel:`Browser` panel.

You can perform the following tasks:

Managing bookmark actions
Task Spatial Bookmark Manager Browser
Zoom to a Bookmark Double-click on it, or select the bookmark and press the zoomToBookmark :guilabel:`Zoom to bookmark` button. Double-click on it, drag and drop it to the map canvas, or right-click the bookmark and select :guilabel:`Zoom to Bookmark`.
Delete a bookmark Select the bookmark and click the deleteSelected :guilabel:`Delete bookmark` button. Confirm your choice. Right-click the bookmark and select :guilabel:`Delete Spatial Bookmark`. Confirm your choice.
Export bookmarks to XML Click the sharing :guilabel:`Import/Export Bookmarks` button and select sharingExport :guilabel:`Export`. All the bookmarks (user or project) are saved in an xml file. Select one or more folders (user or project) or subfolders (groups), then right-click and select sharingExport :guilabel:`Export Spatial Bookmarks...`. The selected bookmark subset is saved.
Import bookmarks from XML Click the sharing :guilabel:`Import/Export Bookmarks` button and select sharingImport :guilabel:`Import`. All bookmarks in the XML file are imported as user bookmarks. Right-click the :guilabel:`Spatial Bookmarks` entry or one of its folders (user or project) or subfolders (groups) to determine where to import the bookmarks, then select sharingImport :guilabel:`Import Spatial Bookmarks`. If performed on the :guilabel:`Spatial Bookmarks` entry, the bookmarks are added to :guilabel:`User Bookmarks`.
Edit bookmark You can change a bookmark by changing the values in the table. You can edit the name, the group, the extent and if it is stored in the project or not.

Right-click the desired bookmark and select :guilabel:`Edit Spatial Bookmark...`. The :guilabel:`Bookmark Editor` will open, allowing you to redefine every aspect of the bookmark as if you were creating it for the first time.

You can also drag and drop the bookmark between folders (user and project) and subfolders (groups).

You can manage bookmark actions by right-click on the desired bookmark in the :guilabel:`Spatial Bookmarks Manager`. You can also zoom to bookmarks by typing the bookmark name in the :ref:`locator <label_statusbar>`.

.. index:: Decorations

Decorating the map

Decorations include Grid, Title Label, Copyright Label, Image, North Arrow, Scale Bar and Layout Extents. They are used to 'decorate' the map by adding cartographic elements.

.. index:: Grid

Grid

addGrid :guilabel:`Grid` allows you to add a coordinate grid and coordinate annotations to the map canvas.

  1. Select menu option :menuselection:`View --> Decorations --> Grid...` to open the dialog.

    img/grid_dialog.png

    The Grid Dialog

  2. Tick checkbox :guilabel:`Enable grid` and set grid definitions according to the layers loaded in the map canvas:

  3. Tick checkbox :guilabel:`Draw annotations` to display the coordinates of the grid marks and set:

  4. Click :guilabel:`Apply` to verify that it looks as expected or :guilabel:`OK` if you're satisfied.

.. index:: Title

Title Label

titleLabel :guilabel:`Title Label` allows you to decorate your map with a Title.

To add a Title Label decoration:

  1. Select menu option :menuselection:`View --> Decorations --> Title Label...` to open the dialog.

    img/titleLabel.png

    The Title Decoration Dialog

  2. Make sure checkbox :guilabel:`Enable Title Label` is checked

  3. Enter the title text you want to place on the map. You can make it dynamic using the :guilabel:`Insert or Edit an Expression...` button.

  4. Choose the :guilabel:`Font` for the label using the :ref:`font selector widget <font_selector>` with full access to QGIS :ref:`text formatting <text_format>` options. Quickly set the font color and opacity by clicking the black arrow to the right of the font combo box.

  5. Select the :ref:`color <color-selector>` to apply to the title's :guilabel:`Background bar color`.

  6. Choose the :guilabel:`Placement` of the label in the canvas: options are :guilabel:`Top left`, :guilabel:`Top Center` (default), :guilabel:`Top Right`, :guilabel:`Bottom left`, :guilabel:`Bottom Center` and :guilabel:`Bottom Right`.

  7. Refine the placement of the item by setting a horizontal and/or vertical :guilabel:`Margin from Edge`. These values can be in Millimeters or Pixels or set as a Percentage of the width or height of the map canvas.

  8. Click :guilabel:`Apply` to verify that it looks as expected or :guilabel:`OK` if you're satisfied.

.. index:: Copyright

Copyright Label

copyrightLabel :guilabel:`Copyright Label` can be used to decorate your map with a Copyright label.

To add this decoration:

  1. Select menu option :menuselection:`View --> Decorations --> Copyright Label...` to open the dialog.

  2. Make sure checkbox :guilabel:`Enable Copyright Label` is checked

  3. Enter the copyright text you want to place on the map. You can make it dynamic using the :guilabel:`Insert or Edit an Expression...` button.

  4. Choose the :guilabel:`Font` for the label using the :ref:`font selector widget <font_selector>` with full access to QGIS :ref:`text formatting <text_format>` options. Quickly set the font color and opacity by clicking the black arrow to the right of the font combo box.

  5. Choose the :guilabel:`Placement` of the label in the canvas: options are :guilabel:`Top left`, :guilabel:`Top Center`, :guilabel:`Top Right`, :guilabel:`Bottom left`, :guilabel:`Bottom Center`, and :guilabel:`Bottom Right` (default for Copyright decoration)

  6. Refine the placement of the item by setting a horizontal and/or vertical :guilabel:`Margin from Edge`. These values can be in Millimeters or Pixels or set as a Percentage of the width or height of the map canvas.

  7. Click :guilabel:`Apply` to verify that it looks as expected or :guilabel:`OK` if you're satisfied.

.. index:: Image decoration

Image Decoration

addImage :guilabel:`Image` allows you to add an image (logo, legend, ..) on the map canvas.

To add an image:

  1. Select menu option :menuselection:`View --> Decorations --> Image...` to open the dialog.

    img/image_decoration.png

    The Image Decoration Dialog

  2. Make sure checkbox :guilabel:`Enable Image` is checked

  3. Select a bitmap (e.g. png or jpg) or SVG image using the :guilabel:`...` Browse button

  4. If you have chosen a parameter enabled SVG then you can also set a :guilabel:`Fill` or :guilabel:`Stroke` (outline) color. For bitmap images, the color settings are disabled.

  5. Set a :guilabel:`Size` of the image in mm. The width of selected image is used to resize it to given :guilabel:`Size`.

  6. Choose where you want to place the image on the map canvas with the :guilabel:`Placement` combo box. The default position is :guilabel:`Top Left`.

  7. Set the :guilabel:`Horizontal` and :guilabel:`Vertical Margin from (Canvas) Edge`. These values can be set in Millimeters, Pixels or as a Percentage of the width or height of the map canvas.

  8. Click :guilabel:`Apply` to verify that it looks as expected and :guilabel:`OK` if you're satisfied.

.. index:: North arrow

North Arrow

northArrow :guilabel:`North Arrow` allows you to add a north arrow on the map canvas.

To add a north arrow:

  1. Select menu option :menuselection:`View --> Decorations --> North Arrow...` to open the dialog.

    img/north_arrow_dialog.png

    The North Arrow Dialog

  2. Make sure checkbox :guilabel:`Enable north arrow` is checked

  3. Optionally change the color and size, or choose a custom SVG

  4. Optionally change the angle or choose Automatic to let QGIS determine the direction

  5. Optionally choose the placement from the Placement combo box

  6. Optionally refine the placement of the arrow by setting a horizontal and/or vertical Margin from (Canvas) Edge. These values can be in Millimeters or Pixels or set as a Percentage of the width or height of the map canvas.

  7. Click :guilabel:`Apply` to verify that it looks as expected and :guilabel:`OK` if you're satisfied.

.. index:: Scale bar

Scale Bar

scaleBar :guilabel:`Scale Bar` adds a simple scale bar to the map canvas. You can control the style and placement, as well as the labelling of the bar. The scale bar respects the active :ref:`project's distance unit <measurements_ellipsoid>` as defined in :menuselection:`Project properties --> General --> Units for distance measurement`.

To add a scale bar:

  1. Select menu option :menuselection:`View --> Decorations --> Scale Bar...` to open the dialog

    img/scale_bar_dialog.png

    The Scale Bar Dialog

  2. Make sure checkbox :guilabel:`Enable scale bar` is checked

  3. Choose a style from the :guilabel:`Scale bar style` selectString combo box

  4. Select the :guilabel:`Color of bar` selectColor by choosing a fill color (default: black) and an outline color (default: white). The scale bar fill and outline can be made opaque by clicking on the down arrow to the right of the color input.

  5. Select the font for the scale bar from the :guilabel:`Font of bar` selectString combo box

  6. Set the :guilabel:`Size of bar` in the active unit

  7. Optionally check checkbox :guilabel:`Automatically snap to round number on resize` to display easy-to-read values

  8. Choose the placement from the :guilabel:`Placement` selectString combo box

  9. You can refine the placement of the item by setting a horizontal and/or vertical Margin from (Canvas) Edge. These values can be in Millimeters or Pixels or set as a Percentage of the width or height of the map canvas.

  10. Click :guilabel:`Apply` to verify that it looks as expected or :guilabel:`OK` if you're satisfied.

.. index:: Layout extents

Layout Extents

addMap :guilabel:`Layout Extents` adds the extents of :ref:`map item(s) <layout_map_item>` in print layout(s) to the canvas. When enabled, the extents of all map items within all print layouts are shown using a lightly dotted border labeled with the name of the print layout and map item. You can control the style and labeling of the displayed layout extents. This decoration is useful when you are tweaking the positioning of map elements such as labels, and need to know the actual visible region of print layouts.

img/decoration_layoutextents_example.png

Example of layout extents displayed in a QGIS project with two print layouts. The print layout named 'Sights' contains two map items, while the other print layout contains one map item.

To add layout extent(s):

  1. Select :menuselection:`View --> Decorations --> Layout Extents` to open the dialog

    img/decoration_layoutextents.png

    The Layout Extents Dialog

  2. Make sure checkbox :guilabel:`Show layout extents` is checked.

  3. Optionally change the symbol and labeling of the extents.

  4. Click :guilabel:`Apply` to verify that it looks as expected and :guilabel:`OK` if you're satisfied.

Tip

Decorations Settings

When you save a QGIS project file, any changes you have made to Grid, North Arrow, Scale Bar, Copyright and Layout Extents will be saved in the project and restored the next time you load the project.

.. index::
   single: Annotation
   see: Annotation; Form annotation

Annotation Tools

Annotations are another type of elements added onto the map canvas to provide additional information that can not be depicted by the rendered layers. Unlike :ref:`labels <vector_labels_tab>` that rely on attribute values stored in vector layers, annotations are independent details, stored within the project file itself.

Two families of annotations are available in QGIS:

  • Feature annotations: they are actual georeferenced features of text, marker, line or polygon type stored within a special layer type called "annotation layer". They are tied to a particular geographic location, meaning that moving your map, changing the scale or changing projection won’t cause your annotations to jump around the map. Rather, they’ll be locked in place to the location you’ve drawn them.
  • Balloon annotations: these are individuals annotations of text, form or image type placed inside a bubble. They can be associated to any layer for their visibility, are drawn on top of the map canvas. The size is dependent from the map canvas scale, and its position can be anchored.

Tip

Layout the map with annotations

You can print or export annotations with your map to various formats using:

The :guilabel:`Annotations Toolbar` provides a set of tools to create and interact with both families of annotations.

The Annotations Toolbar actions
Tool Usage Scope
createAnnotationLayer New Annotation Layer Create a new layer to store annotations Feature annotations
Main Annotation Layer Properties Control settings of the Main Annotation Layer
select Modify Annotations Select, move, resize and modify symbology properties of annotations
addPolygon Create Polygon Annotation Create an annotation as a polygon feature
addPolyline Create Line Annotation Create an annotation as a polyline feature
addMarker Create Marker Annotation Create an annotation as a point feature
actionText Create Text Annotation at Point Create an annotation as a text label
textAlongLine Create Text Annotation along Line Create an annotation as a curved text along a linestring
textAnnotation Text Annotation Select and create a text formatted annotation Balloon annotations
htmlAnnotation HTML Annotation Select and create annotation with an :file:`HTML` file's content
svgAnnotation SVG Annotation Select and create annotation showing an :file:`SVG` file
formAnnotation Form Annotation Select and create annotation showing attributes of a vector layer in a custom form file

Feature Annotations

Feature annotations are stored in annotation layers. Unlike conventional layers, an annotation layer is available only in the current project and can contain features of different types (text, marker, line, polygon). The layer has no attributes and no symbology associated, but instead each feature can be symbolized on an item-by-item basis, through :guilabel:`Layer Styling` panel.

Two types of annotation layer are available in QGIS:

  • A common :guilabel:`Annotation Layer`: you can create one using the createAnnotationLayer New Annotation Layer tool. It is listed in the :guilabel:`Layers` panel, allowing you to control its features' visibility, move it to show above or below particular layers in your map, like any common layer. Double-click the layer and you can access its properties.
  • The :guilabel:`Main Annotation Layer`: By default, this is where annotations are stored when no annotation layer is available in the project or is selected at creation time. This layer is always drawn on the very top of your map and you won't see it listed in the :guilabel:`Layers` panel alongside the other layers in your project, meaning that its features are always visible. The :guilabel:`Main Annotation Layer Properties` entry on the :guilabel:`Annotations` toolbar helps you open its properties dialog.
Layer Properties

The properties dialog of an annotation layer provides the following tabs:

Interacting with features

The Feature annotations have dedicated tools for creation depending on their type:

  • addPolygon Create Polygon Annotation
  • addPolyline Create Line Annotation
  • addMarker Create Marker Annotation
  • actionText Create Text Annotation at Point
  • textAlongLine Create Text Annotation along Line

All the usual QGIS shortcuts for creating features apply when creating annotation items. A line or polygon annotation is drawn by left-clicking once for each vertex, with a final right mouse click to complete the shape. Snapping can be enabled while you draw, you can use the :guilabel:`Advanced Digitizing Tools` to precisely place vertices, and even switch the :ref:`drawing tools <drawing_methods>` to the streaming mode for completely free-form shapes.

Unlike common layers, an annotation layer does not need to be active before you select its features. Simply grab the select Modify Annotations tool and you will be able to interact with any feature annotation:

  • Selection: left-click on the annotation. By default, annotations are rendered in the order of creation, meaning that recent annotations will be placed on top of older. You may need to play with the Z-index property of features in order to select ones they would sit above.
  • Moving: Left click on a selected annotation item to start moving it. A right-click or pressing Esc key cancels the move, while a second left click will confirm the move. The displacement can also be controlled pressing the cursor keys:
    • Shift+key for big movement
    • Alt+key for 1 px movement
  • Geometry modification: for line or polygon annotations, left-click on a vertex of the geometry, move and click again. Double-click a segment to add a new vertex.
  • Delete: Pressing the Del or Backspace key while an annotation is selected will delete that annotation
  • :ref:`Change feature symbology <annotation_feature_symbology>`
Feature symbology

A selected annotation will display its :guilabel:`Symbology` properties in the :guilabel:`Layer styling` panel. You can:

Balloon annotations

You can add balloon annotations through :menuselection:`Edit --> Add Annotation -->` menu or from the :guilabel:`Annotations Toolbar`:

img/custom_annotation.png

Examples of balloon annotations

To add a balloon annotation, select the corresponding tool and click on the map canvas. An empty balloon is added. Double-click on it and a dialog opens with various options. This dialog is almost the same for all the annotation types:

img/annotation.png

A ballon annotation text dialog

When a balloon annotation tool is active, you can also:

  • Select an annotation
  • Resize an annotation
  • Move an annotation by map position (by dragging the map marker) or by moving only the balloon.
  • Delete an annotation: select it and either press the Del or Backspace button, or double-click it and press the :guilabel:`Delete` button in the properties dialog.
  • Right-click and in the contextual menu:
.. index::
   pair: Tools; Measure

Measuring

General information

QGIS provides four means of measuring geometries:

Measuring works within projected coordinate systems (e.g., UTM) and unprojected data. The first three measuring tools behave equally to global project settings:

  • Unlike most other GIS, the default measurement metric is ellipsoidal, using the ellipsoid defined in :menuselection:`Project --> Properties... --> General`. This is true both when geographic and projected coordinate systems are defined for the project.
  • If you want to calculate the projected/planimetric area or distance using cartesian maths, the measurement ellipsoid has to be set to "None/Planimetric" (:menuselection:`Project --> Properties... --> General`). However, with a geographic (ie unprojected) CRS defined for the data and project, area and distance measurement will be ellipsoidal.

However, neither the identify tool nor the field calculator will transform your data to the project CRS before measuring. If you want to achieve this, you have to use the vector analysis tool: :menuselection:`Vector --> Geometry Tools --> Add Geometry Attributes...`. Here, measurement is planimetric, unless you choose the ellipsoidal measurement.

Measure length, areas, bearings and angles interactively

Click the measure icon in the Attribute toolbar to begin measurements. The down arrow near the icon switches between measure length, measureArea area, measureBearing bearing or measureAngle angle. The default unit used in the dialog is the one set in :menuselection:`Project --> Properties... --> General` menu.

For the :guilabel:`Measure Line` and the :guilabel:`Measure Area` the measurements can be done in radioButtonOn :guilabel:`Cartesian` or radioButtonOn :guilabel:`Ellipsoidal` measure.

Note

Configuring the measure tool

While measuring length or area, clicking the :guilabel:`Configuration` button at the bottom of the widget opens the :menuselection:`Settings --> Options --> Map Tools` menu, where you can select the rubberband color, the precision of the measurements and the unit behavior. You can also choose your preferred measurement or angle units, but keep in mind that those values are overridden in the current project by the selection made in the :menuselection:`Project --> Properties... --> General` menu, and by the selection made in the measurement widget.

All measuring modules use the snapping settings from the digitizing module (see section :ref:`snapping_tolerance`). So, if you want to measure exactly along a line feature, or around a polygon feature, first set its layer snapping tolerance. Now, when using the measuring tools, each mouse click (within the tolerance setting) will snap to that layer.

.. index::
   single: Measure; Distances
   single: Measure; Areas
   single: Measure; Angles

The measure Measure Line measures distances between given points. The tool then allows you to click points on the map. Each segment length, as well as the total, shows up in the measure window. In the measure window, you will see coordinates for all your points and distances. Keep in mind that the first row will contain only coordinates, as it represents your starting point. Now it is possible to copy all your line measurements at once to the clipboard using the :guilabel:`Copy` button. Clicking the :guilabel:`Configuration` button you will access to :guilabel:`Measure Tool Copy Settings` where you can set up :ref:`copy options <measure_copy_settings>`. To stop measuring, click the right mouse button.

Note that you can use the drop-down list near the total to change the :ref:`measurement units <measurements_ellipsoid>` interactively while working with the measure tool. This unit is retained for the widget until a new project is created or another project is opened.

The :guilabel:`Info` section in the dialog explains how calculations are made according to the CRS settings available.

img/measure_line.png

Measure Distance

measureArea Measure Area: Areas can also be measured. In the measure window, the accumulated area size appears. Right-click to stop drawing. The Info section is also available as well as the ability to switch between different :ref:`area units <measurements_ellipsoid>`.

img/measure_area.png

Measure Area

measureBearing Measure Bearing: You can also measure bearings. The cursor becomes cross-shaped. Click to draw the first point of the bearing, then move the cursor to draw the second point. The measurement is displayed in a pop-up dialog.

img/measure_bearing.png

Measure Bearing

measureAngle Measure Angle: You can also measure angles. The cursor becomes cross-shaped. Click to draw the first segment of the angle you wish to measure, then move the cursor to draw the desired angle. The measurement is displayed in a pop-up dialog.

img/measure_angle.png

Measure Angle

Setting additional map views

It is also possible to open additional map views whose content could diverge from the :guilabel:`Layers` panel current state. To add a new map view, go to :menuselection:`View -->` newMap :menuselection:`New Map View`. A new floating widget, mimicking the main map view's rendering, is added to QGIS. You can add as many map views as you need. They can be kept floating, placed side by side or stacked on top of each other.

img/map_views.png

Multiple map views with different settings

At the top of an additional map canvas, there's a toolbar with the following capabilities:

Exporting the map view

Maps you make can be layout and exported to various formats using the advanced capabilities of the :ref:`print layout or report <label_printlayout>`. It's also possible to directly export the current rendering, without a layout. This quick "screenshot" of the map view has some convenient features.

To export the map canvas with the current rendering:

  1. Go to :menuselection:`Project --> Import/Export`
  2. Depending on your output format, select either

The two tools provide you with a common set of options. In the dialog that opens:

img/saveMapAsImage.png

The Save Map as Image dialog

  1. Choose the :guilabel:`Extent` to export: it can be the current view extent (the default), the extent of a layer or a custom extent drawn over the map canvas. Coordinates of the selected area are displayed and manually editable.

  2. Enter the :guilabel:`Scale` of the map or select it from the :ref:`predefined scales <predefinedscales>`: changing the scale will resize the extent to export (from the center).

  3. Set the :guilabel:`Resolution` of the output

  4. Control the :guilabel:`Output width` and :guilabel:`Output height` in pixels of the image: based by default on the current resolution and extent, they can be customized and will resize the map extent (from the center). The size ratio can be locked, which may be particularly convenient when drawing the extent on the canvas.

  5. checkbox :guilabel:`Draw active decorations`: in use :ref:`decorations <decorations>` (scale bar, title, grid, north arrow...) are exported with the map

  6. checkbox :guilabel:`Draw annotations` to export any :ref:`annotation <sec_annotations>`

  7. checkbox :guilabel:`Append georeference information (embedded or via world file)`: depending on the output format, a world file of the same name (with extension PNGW for PNG images, JPGW for JPG, ...) is saved in the same folder as your image. The PDF format embeds the information in the PDF file.

  8. When exporting to PDF, more options are available in the :guilabel:`Save map as PDF...` dialog:

    img/saveMapAsPDF.png

    The Save Map as PDF dialog

  9. Click :guilabel:`Save` to select file location, name and format.

    When exporting to image, it's also possible to :guilabel:`Copy to clipboard` the expected result of the above settings and paste the map in another application such as LibreOffice, GIMP...