QGIS User Guide - OSGeo Server

QGIS User Guide - OSGeo Server

10 PRINT COMPOSER

10. Print Composer

The print composer provides growing layout and printing capabilities. It allows you to add elements such as the QGIS map canvas, legend, scalebar, images, basic shapes, arrows and text labels. You can size, group, align and position each element and adjust the properties to create your layout. The layout can be printed or exported to image formats, Postscript, PDF or to SVG

8 and you can save the layout as template and load it again in another session. See a list of tools in table

6 :

Icon Purpose

Load from template

Table 6: Print Composer Tools

Icon Purpose

Save as template

Export as PDF Export to an image format

Export print composition to SVG

Print or export as Postscript

Zoom in

Refresh view

Add Image to print composition

Add new legend to print composition

Zoom to full extend

Zoom out

Add new map from QGIS map canvas

Add label to print composition

Add new scalebar to print composition

Add basic shape to print composition

Select/Move item in print composition

Group items of print composition

Raise selected items

Move selected items to top

Align selected items left

Align selected items center

Align selected items top

Add arrow to print composition

Move content within an item

Ungroup items of print composition

Lower selected items

Move selected items to bottom

Align selected items right

Align selected items center vertical

Align selected items bottom

All Print Composer tools are availabe in menus and as icons in a toolbar. The toolbar can be switched

8

Export to SVG supported, but it is not working properly with some recent QT4 versions. You should try and check individual on your system

QGIS 1.4.0 User Guide 128

10.1

Open a new Print Composer Template off and on using the right mouse button holding the mouse over the toolbar.

10.1. Open a new Print Composer Template

Before you start to work with the print composer, you need to load some raster and vector layers in the QGIS map canvas and adapt their properties to suite your own convinience. After everything is rendered and symbolized to your liking you click the or choose File >

New Print Composer .

New Print Composer icon in the toolbar

10.2. Using Print Composer

Figure 51: Print Composer

Opening the print composer provides you with a blank canvas to which you can add the current QGIS

QGIS 1.4.0 User Guide 129

10 PRINT COMPOSER map canvas, legend, scalebar, images, basic shapes, arrows and text. Figure

51

shows the initial view of the print composer with an activated x Snap to grid modus but before any elements are added. The print composer provides two tabs:

The General tab allows you to set paper size, orientation, the print quality for the output file in dpi and to activate snapping to a grid of a defined resolution. Please note, the x Snap to grid feature only works, if you define a grid resolution > 0. Furthermore you can also activate the x Print as raster checkbox. This means all elements will be rastered before printing or saving as Postscript of PDF.

The Item tab displays the properties for the selected map element.

Click the

Select/Move item icon to select an element (e.g. legend, scalebar or label) on the canvas.

Then click the Item tab and customize the settings for the selected element.

You can add multiple elements to the composer. It is also possible to have more than one map view or legend or scalebar in the print composer canvas. Each element has its own properties and in the case of the map, its own extent.

10.3. Adding a current QGIS map canvas to the Print Composer

To add the QGIS map canvas, click on the

Add new map from QGIS map canvas button in the print composer toolbar and drag a rectangle on the composer canvas with the left mouse button to add the map. To display the current map, you can choose between three different modes in the map Item tab:

Preview Rectangle

H is the default setting. It only displays an empty box with a message

"Map will be printed here".

Preview Cache

H renders the map in the current screen resolution. If case you zoom in or out the composer window, the map is not rendered again but the image will be scaled.

• Preview Render

H means, that if you zoom in or out the composer window, the map will be rendered again, but for space reasons, only up to a maximum resolution.

Cache is default preview mode for newly added print composer maps.

You can resize the map element by clicking on the

Select/Move item button, selecting the element, and dragging one of the blue handles in the corner of the map. With the map selected, you

QGIS 1.4.0 User Guide 130

10.3

Adding a current QGIS map canvas to the Print Composer can now adapt more properties in the map Item tab.

To move layers within the map element select the map element, click the

Move item content icon and move the layers within the map element frame with the left mouse button. After you found the right place for an element, you can lock the element position within the print composer canvas. Select the map element and click on the right mouse button to lock the element position and again to unlock the element. You can lock the map element also activating the x Lock layers for map item checkbox in the Map dialog of the Map Item tab.

10.3.1. Map item tab - Map and Extents dialog

Figure 52: Print Composer map item tab - Map and Extents dialog

(a) Map dialog (b) Extents dialog

Map dialog

The Map dialog of the map item tab provides following functionalities (see Figure

52 a)):

The Preview area allows to define the preview modes Rectangle, Cache and Render, as described above. Click on the Update preview button to apply changes to the map view.

• The Map area allows to resize the map element specifying the width and height or the scale.

The Rotation 0

H field allows to rotate the map element content clockwise in degrees. Note,

QGIS 1.4.0 User Guide 131

10 PRINT COMPOSER a coordinate frame can only be added with the default value 0.

If you change the view on the QGIS map canvas by zooming or panning or changing vector or raster properties, you can update the print composer view selecting the map element in the print composer and clicking the Update preview button.

Extents dialog

The Extents dialog of the map item tab provides following functionalities (see Figure

52 b)):

• The Map extent area allow to specify the map extend using Y and X min/max values or clicking the Set to map canvas extend button.

If you change the view on the QGIS map canvas by zooming or panning or changing vector or raster properties, you can update the print composer view selecting the map element in the print composer and clicking the Update preview button in the map Item tab (see Figure

52 a)).

10.3.2. Map item tab - Grid and General options dialog

Grid dialog

The Grid dialog of the map item tab provides following functionalities (see Figure

53 a)):

• The x Show grid checkbox allows to overlay a grid to the map element. As grid type you can specify to use solid line or cross. Furthermore you can define an interval in X and Y direction, an X and Y offset, and the width used for cross or line grid type.

The x Draw annotation checkbox allows to add coordinates to the map frame. The annotation can be drawn inside or outside the map frame. As annotatiion direction can be defined horizontal, vertical, horizontal and vertical or boundary direction. And finally you can define the grid color, the annotation font, the annotation distance from the map frame and the precision of the drawn coordinates.

General options dialog

The General options dialog of the map item tab provides following functionalities (see Figure

53 b)):

Here you can define color and outline width for the element frame, set a background color and opacity for the map canvas. The Position button opens the Set items position dialog and allows to set the map canvas position using reference points or coordinates. Furthermore you can select or unselect to display the element frame with the x Show frame checkbox.

QGIS 1.4.0 User Guide 132

10.4

Adding other elements to the Print Composer

Figure 53: Print Composer map item tab - Grid and General options dialog

(a) Grid dialog (b) General options dialog

10.4. Adding other elements to the Print Composer

Besides adding a current QGIS map canvas to the Print Composer, it is also possible to add, position, move and customize legend, scalebar, images and label elements.

QGIS 1.4.0 User Guide 133

10 PRINT COMPOSER

10.4.1. Label item tab - Label and General options dialog

To add a label, click the

Add label icon, place the element with the left mouse button on the print composer canvas and position and customize their appearance in the label item tab.

Figure 54: Print composer label item tab - Label options and General options dialog

(a) label options dialog (b) general options dialog

Label dialog

The Label dialog of the label item tab provides following functionalities (see Figure

54 a)):

• The Label dialog offers to add text labels to the composer canvas. You can select font and fontcolor for the text and it is possible to define a text margin im mm.

General options dialog

The General options dialog of the label item tab provides following functionalities (see Figure

54 b)):

Here you can define color and outline width for the element frame, set a background color and opacity for the map canvas. The Position button opens the Set items position dialog and allows to set the map canvas position using reference points or coordinates. Furthermore you

QGIS 1.4.0 User Guide 134

10.4

Adding other elements to the Print Composer can select or unselect to display the element frame with the x Show frame checkbox.

10.4.2. Image item tab - Picture options and General options dialog

To add an image, click the

Add image icon, place the element with the left mouse button on the print composer canvas and position and customize their appearance in the image item tab.

Figure 55: Print composer image item tab - Picture options and General options

(a) Picture options dialog (b) General options dialog

Picture options dialog

The Picture options dialog of the image item tab provides following functionalities (see Figure

55 a)):

The Search directories area allows to add and remove directories with images in SVG format to the picture database.

• The Preview field then shows all pictures stored in the selected directories.

The Options area shows the current selected picture and allows to define width, height and

QGIS 1.4.0 User Guide 135

10 PRINT COMPOSER clockwise rotation of the picture. It is also possible to add a user specific SVG path. Activating the x Sync from map checkbox synchronizes the rotation of a picture in the qgis map canvas

(i.e. a rotated north arrow) with the appropriate print composer image.

General options dialog

The General options dialog of the image item tab provides following functionalities (see Figure

55 b)):

Here you can define color and outline width for the element frame, set a background color and opacity for the map canvas. The Position button opens the Set items position dialog and allows to set the map canvas position using reference points or coordinates. Furthermore you can select or unselect to display the element frame with the x Show frame checkbox.

10.4.3. Legend item tab - General, Legend items and Item option dialog

To add a map legend, click the

Add new legend icon, place the element with the left mouse button on the print composer canvas and position and customize their appearance in the legend item tab.

Figure 56: Print composer legend item tab - General, Legend items and Item option dialog

(a) General dialog (b) Legend item dialog (c) Item options dialog

General dialog

The General dialog of the legend item tab provides following functionalities (see Figure

56 a)):

• Here you can adapt the legend title. You can change the font of the legend title, layer and item name. You can change width and height of the legend symbol and you can add layer, symbol,

QGIS 1.4.0 User Guide 136

10.4

Adding other elements to the Print Composer icon label and box space.

Legend items dialog

The Legend items dialog of the legend item tab provides following functionalities (see Figure

56 b)):

• The legend items window lists all legend items and allows to change item order, edit layer names, remove and restore items of the list. After changing the symbology in the QGIS main window you can click on update to adapt the changes in the legend element of the print composer.

Item options dialog

The Item options dialog of the legend item tab provides following functionalities (see Figure

56 c)):

• Here you can define color and outline width for the element frame, set a background color and opacity for the map canvas. The Position button opens the Set items position dialog and allows to set the map canvas position using reference points or coordinates. Furthermore you can select or unselect to display the element frame with the x Show frame checkbox.

10.4.4. Scalebar item tab - Scalebar and General options dialog

To add a scalebar, click the

Add new scalebar icon, place the element with the left mouse button on the print composer canvas and position and customize their appearance in the scalebar item tab.

Scalebar dialog

The Scalebar dialog of the scalebar item tab provides following functionalities (see Figure

57 a)):

• The scalebar dialog allows to define the segment size of the scalebar in map units, the map units used per bar units, and how many left and right segments units from 0 should be used.

You can define the scalebar style, available is single and double box, line ticks middle, up and down and a numeric style.

• Furthermore you can define height, line width, label and box space of the scale bar. Add a unit label and define the scalebar font and color.

General options dialog

The General options dialog of the scalebar item tab provides following features (see Figure

57 b)):

QGIS 1.4.0 User Guide 137

10 PRINT COMPOSER

Figure 57: Print composer scalebar item tab - Scalebar and General options dialog

(a) scalebar options dialog (b) general options dialog

Here you can define color and outline width for the element frame, set a background color and opacity for the map canvas. The Position button opens the Set items position dialog and allows to set the map canvas position using reference points or coordinates. Furthermore you can select or unselect to display the element frame with the x Show frame checkbox.

10.5. Navigation tools

For map navigation the print composer provides 4 general tools:

Zoom in ,

Zoom out ,

Zoom to full extend and

Refresh the view , if you find the view in an inconsistent state.

QGIS 1.4.0 User Guide 138

10.6

Add Basic shape and Arrow

10.6. Add Basic shape and Arrow

It is possible to add basic shapes (Ellipse, Rectangle, Triangle) and arrows to the print composer canvas.

Figure 58: Print composer basic shape and arrow item tab - Shape and Arrow options dialog

(a) shape dialog (b) arrow dialog

• The Shape dialog allows to draw an ellipse, rectangle, or triangle in the print composer canvas.

You can define its outline and fill color, the outline width and a clockwise rotation.

The Arrow dialog allows to draw an arrow in the print composer canvas. You can define color, outline and arrow width and it is possible to use a default marker and no marker and a SVG marker. For the SVG marker you can additionally add a SVG start and end marker from a directory on your computer.

10.7. Raise, lower and align elements

Raise or lower functionalities for elements are inside the

Raise selected items pulldown menu. Choose an element on the print composer canvas and select the matching functionality to raise or lower the selected element compared to the other elements (see table

6 ).

There are several alignment functionalities available within the

Align selected items pulldown menu (see table

6 ). To use an alignment functionality , you first select some elements and then click

on the matching alignment icon. All selected will then be aligned within to their common bounding box.

QGIS 1.4.0 User Guide 139

10 PRINT COMPOSER

10.8. Creating Output

Figure

59

shows the print composer with an example print layout including each type of map element described in the sections above.

Figure 59: Print Composer with map view, legend, scalebar, coordinates and text added

The print composer allows you to create several output formats and it is possible to define the resolution (print quality) and paper size:

• The

Print icon allows to print the layout to a connected printer or a Postscript file depending on installed printer drivers.

• The

Export as image icon exports the composer canvas in several image formats such as PNG, BPM, TIF, JPG, . . .

QGIS 1.4.0 User Guide 140

10.9

Saving and loading a print composer layout

• The

Export as PDF saves the defined print composer canvas directly as a PDF.

The

Export as SVG icon saves the print composer canvas as a SVG (Scalable Vector

Graphic). Note: Currently the SVG output is very basic. This is not a QGIS problem, but a problem of the underlaying Qt library. This will hopefully be sorted out in future versions.

10.9. Saving and loading a print composer layout

With the

Save as template and Load from template icons you can save the current state of a print composer session as a *.qpt template and load the template again in another session.

The

Composer Manager button in the toolbar and in File >

Composer Manager allows to manage add new composer template or to manage already existing templates.

Figure 60: Composer Manager

QGIS 1.4.0 User Guide 141

Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement

Table of contents