Navigazione

  • indice
  • successivo |
  • precedente |
  • »
  • Manuale utente di QGIS »
QGIS Documentation Project 2.0
  • Documentation QGIS 2.0
<< prev next >>

Tabella dei contenuti

  • User guide/Manual (QGIS 2.0)
    • Preamble
    • Convenzioni
    • Premessa
    • Caratteristiche
    • What’s new in QGIS 2.0
    • Come Iniziare
    • QGIS GUI
    • Strumenti generali
    • Configurazione di QGIS
    • Lavorare con le proiezioni
    • QGIS Browser
    • Lavorare con i dati vettoriali
    • Lavorare con i dati raster
    • Lavorare con i dati OGC
    • Lavorare con i dati GPS
    • Integrazione con GRASS GIS
    • QGIS L’ambiente Processing
    • Compositore di stampe
      • Primi passi
      • Rendering mode
      • Composer Items
      • Item alignment
      • Atlas generation
      • Creazione di file in uscita
      • Manage the Composer
    • Plugin di QGIS
    • Aiuto e supporto
    • Appendix
    • Letteratura e riferimenti web
  • User guide/Manual PDF’s
  • PyQGIS cookbook (QGIS 2.0)
  • Documentation Guidelines
  • A gentle introduction in GIS
  • Trainings manual

Compositore di stampe¶

The print composer provides growing layout and printing capabilities. It allows you to add elements such as the QGIS map canvas, text labels, images, legends, scalebars, basic shapes, arrows, attribute tables and HTML frames. 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 (export to SVG is not working properly with some recent Qt4 versions, you should try and check individual on your system). You can save the layout as template and load it again in another session. Finally, generating several maps based on a template can be done throught the Atlas generator See a list of tools in table_composer_1:

Icona

Azione

Icona

Azione

       
mActionFileSave Save Project mActionNewComposer New Composer
mActionDupComposer Duplicate Composer mActionComposerManager Composer Manager
mActionFileOpen

Caraica da modello

mActionFileSaveAs

Salva come modello

mActionSaveMapAsImage

Esporta come immagine

mActionSaveAsPDF

Esporta come PDF

mActionSaveAsSVG

Esporta come SVG

mActionFilePrint

Stampa

mActionZoomFullExtent

Vista ad estensione massima

mActionZoomIn

Ingrandisci

mActionZoomOut

Rimpicciolisci

mActionDraw

Aggiorna la vista

mActionUndo

Annulla l’ultimo cambiamento

mActionRedo

Rispristina l’ultimo cambiamento

mActionAddMap Add new map from QGIS map canvas mActionAddImage

Aggiungi immagine

mActionLabel

Aggiungi etichetta

mActionAddLegend

Aggiungi nuova legenda vettoriale

mActionScaleBar

Aggiungi nuova barra di scala

mActionAddBasicShape

Aggiungi forma base

mActionAddArrow

Aggiungi freccia

mActionOpenTable

Aggiungi tabella attributi

mActionAddHtml

Aggiungi riquadro HTML

   
mActionSelectPan

Scegli/Sposta oggetto

mActionMoveItemContent

Sposta contenuto elemento

mActionGroupItems

Raggruppa oggetti

mActionUnGroupItems

Rimuovi raggruppamento

mActionRaiseItems

Muovi in alto

mActionLowerItems

Muovi in basso

mActionMoveItemsToTop

Porta in cima

mActionMoveItemsToBottom

Porta in fondo

mActionAlignLeft

Allinea a sinistra

mActionAlignRight

Allinea a destra

mActionAlignHCenter

Allinea su asse verticale

mActionAlignVCenter

Allinea su asse orizzontale

mActionAlignTop

Allinea in alto

mActionAlignBottom

Allinea in basso

Strumenti del Compositore di Stampe

All Print Composer tools are available in menus and as icons in a toolbar. The toolbar can be switched off and on using the right mouse button over the toolbar.

Primi passi¶

Aprire un nuovo modello di stampa¶

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 suit your own convenience. After everything is rendered and symbolized to your liking, click the mActionNewComposer New Print Composer icon in the toolbar or choose File ‣ New Print Composer. You will be prompt to choose a title for the new composer.

Usare il compositore di stampe¶

Opening the print composer provides you with a blank canvas to which you can add the current QGIS map canvas, text labels, images, legends, scalebars, basic shapes, arrows, attribute tables and HTML frames. Figure_composer_1 shows the initial view of the print composer with an activated checkbox Snap to grid mode but before any elements are added.

Figure Composer 1:

../../../_images/print_composer_blank.png

Compositore di stampe nix

Nel compositore di stampe sono presenti quattro schede:

  • The Composition 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. You can also choose the Number of pages your composition will have. Please note, the checkbox Snap to grid feature only works, if you define a grid resolution > 0. Furthermore you can also activate the checkbox Print as raster checkbox. This means all elements will be rastered before printing or saving as Postscript or PDF.
  • The Item Properties tab displays the properties for the selected item element. Click the mActionSelectPan Select/Move item icon to select an element (e.g. legend, scalebar or label) on the canvas. Then click the Item Properties tab and customize the settings for the selected element.
  • The Command history tab (hidden by default) displays a history of all changes applied to the print composer layout. With a mouse click it is possible to undo and redo layout steps back and forth to a certain status.
  • The Atlas generation tab allows to enable the generation of an atlas for the current composer and gives access to its parameters.

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, on one or several pages. Each element has its own properties and in the case of the map, its own extent. If you want to remove any elements from the composer canvas you can do that with the Delete or the Backspace key.

Strumenti per l’esplorazione del layout di stampa¶

To navigate in the canvas layout, the print composer provides 4 general tools:

  • mActionZoomIn Ingrandisci

  • mActionZoomOut Rimpicciolosci

  • mActionZoomFullExtent Vista ad estensione massima

  • mActionDraw Aggiorna la vista, che serve nel caso in cui la vista nel layout non rispecchi quanto presente nella vista mappa di QGIS

Composition tab — General composition setup¶

In the Composition tab, you can define the global settings of your composition.

  • You can choose one of the Presets for your papersheet, or enter your custom width and height.
  • Composition can now be parted on several pages. For instance, a first page can show a map canvas and a second page will show the attribute table associated to a layer while a third ons shows a HTML frame linking to your organization website. Set the Number of pages to the desired value.
  • Choose the page Orientation and its Exported resolution
  • When checked, the checkbox print as raster means all elements will be rasterized before printing or saving as Postscript or PDF.
  • Snap to grid and Snap to alignements tools make accomplishing some tasks much easier. There’s three types of grid: Dots, Solid lines and Crosses. You can adjust spacings, offsets and color to your need.
  • Selection tolerance defines the maximum distance below which an item is snapped to the grid.
  • Snap to alignements shows helping lines when the borders or axis of two items are aligned.

Composer items general options¶

Composer items have a set of common properties you will find on the bottom of the Item Properties tab: Position and size, Frame, Background, Item ID and Rendering (See figure_composer_2)

Figure Composer 2:

../../../_images/print_composer_common_properties.png

Common Item properties Dialogs nix

  • The Position and size dialog lets you define size and position of the frame that contains the item. You can also choose which Reference point will be set at the X and Y coordinates previously defined.
  • The checkbox Frame shows or hides the frame around the label. Click on the [Color] and [Thickness] buttons to adjust those properties.
  • the checkbox Background enables or disables a background color. Click on the [Color...] button to display a dialog where you pick a color ou choose frome a custom setting. Transparency can also be adjusted throught the alpha field.
  • Use the Item ID to create a relationship to other print composer items.
  • Rendering mode can be selected in the option field. See Rendering_Mode .

Rendering mode¶

QGIS now allows advanced rendering for composer items just like vector and raster layers.

Figure Composer 3:

../../../_images/rendering_mode.png

Rendering mode nix

  • Transparency slider: you can make the underlying item in the composer visible with this tool. Use the slider to adapt the visibility of your item to your needs. You can also make a precise definition of the percentage of visibility in the the menu beside the slider.

  • Blending mode: you can achieve special rendering effects with these tools that you previously only know from graphics programs. The pixels of your overlaying and underlaying items are mixed through the settings described below.

    • Normal: This is the standard blend mode which uses the alpha channel of the top pixel to blend with the Pixel beneath it; the colors aren’t mixed
    • Lighten: It selects the maximum of each component from the foreground and background pixels. Be aware that the results tend to be jagged and harsh.
    • Screen: Light pixels from the source are painted over the destination, while dark pixels are not. This mode is most useful for mixing the texture of one layer with another layer. E.g. you can use a hillshade to texture another layer
    • Dodge: Dodge will brighten and saturate underlying pixels based on the lightness of the top pixel. So brighter top pixels cause the saturation and brightness of the underlying pixels to increase. This works best if the top pixels aren’t too bright, otherwise the effect is too extreme.
    • Addition: This blend mode simply adds pixel values of one layer with the other. In case of values above 1 (in the case of RGB), white is displayed. This mode is suitable for highlighting features.
    • Darken: Creates a resultant pixel that retains the smallest components of the foreground and background pixels. Like lighten, the results tend to be jagged and harsh
    • Multiply: It multiplies the numbers for each pixel of the top layer with the corresponding pixel for the bottom layer. The results are darker pictures.
    • Burn: Darker colors in the top layer causes the underlying layers to darken. Can be used to tweak and colorise underlying layers.
    • Overlay: Combines multiply and screen blending modes. In the resulting picture light parts of the picture become lighter and dark parts become darker.
    • Soft light: Very similar to overlay, but instead of using multiply/screen it uses color burn/dodge. This one is supposed to emulate shining a soft light onto an image.
    • Hard light: Hard light is very similar to the overlay mode. It’s supposed to emulate projecting a very intense light onto an image.
    • Difference: Difference subtracts the top pixel from the bottom pixel or the other way round, to always get a positive value. Blending with black produces no change, as values for all colors are 0.
    • Subtract: This blend mode simply subtracts pixel values of one layer with the other. In case of negative values, black is displayed.

Composer Items¶

Adding a current QGIS map canvas to the Print Composer¶

Click on the mActionAddMap Add new map toolbar button in the print composer toolbar to add the QGIS map canvas. Now 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 Properties tab:

  • Rettangolo visualizza un rettangolo vuoto con la scritta ‘La mappa verrà stampata Rettangolo qui’.

  • Cache disegna la mappa alla risoluzione corrente dello schermo. Se si ingrandisce/rimpiccolisce la finestra del compositore, la mappa non viene ridisegnata, ma l’immagine viene scalata.

  • Visualizza a differenza del metodo cache, in questo caso se si ridimensiona la finestra del compositore, la mappa viene ridisegnata.

Cache è la modalità predefinita per ogni nuovo compositore di mappe.

È possibile ridimensionare la mappa in un momento successivo cliccando sul pulsante mActionSelectPan Seleziona/Sposta oggetto, selezionando un elemento e trascinando una delle maniglie blu agli angoli della mappa. Una volta selezionata una mappa, è possibile regolarne ulteriori proprietà nella scheda Opzioni.

Per spostare l’area visualizzata nella vista mappa, cliccare sul pulsante mActionMoveItemContent Sposta contenuto oggetto e spostare la vista nella cornice della vista mappa trascinando con il tasto sinistro del mouse premuto. È possibile mIconLock bloccare/sbloccare la posizione di un elemento nel layout di stampa selezionando e facendo click sullo stesso con il tasto destro del mouse, oppure attivando la casella di controllo checkbox Blocca i layer per la mappa nella seziona Mappa della scheda Oggetto.

Main properties¶

The Main properties dialog of the map Item Properies tab provides following functionalities (see figure_composer_4):

Figure Composer 4:

../../../_images/print_composer_map1.png

Map Item properties Tab nix

  • The Preview area allows to define the preview modes ‘Rectangle’, ‘Cache’ and ‘Render’, as described above. 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.
  • The field Scale selectnumber sets a manual scale.
  • The field Rotation selectnumber allows to rotate the map element content clockwise in degrees. Note, a coordinate frame can only be added with the default value 0.
  • The checkbox Draw map canvas items lets you show annotations that may be placed on the map canvas in the main QGIS window.
  • You can choose to lock the layers shown on a map item. Check the checkbox Lock layers for map item. Any layer that would be displayed or hidden in the main QGIS window after checked on won’t appear or be hidden in the map item of the composer. But style and labels of a locked layer is still refreshed accordingly to the main QGIS interface.

Extents¶

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

Figure Composer 5:

../../../_images/print_composer_map2.png

Map Extents Dialog nix

  • La sezione [Estensione mappa] permette di impostare l’estensione della mappa tramite valori minimo/massimo in X e Y o cliccando sul pulsante [Imposta all’estensione della mappa].

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 Properties tab (see Figure figure_composer_2).

Grid¶

The Grid dialog of the map Item Properties tab provides following functionalities (see Figure_composer_6):

Figure Composer 6:

../../../_images/print_composer_map3.png

Map Grid Dialog nix

  • The checkbox Show grid checkbox allows to overlay a grid to the map element. As grid type you can specify to use solid line or cross. Symbology of the grid can be chosen. See Section Rendering_Mode. 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.
  • You can choose to paint the frame with a Zebra style. If not selected, general frame option is used (See Section Frame_dialog) Advanced rendering mode is also available for grids. See Section Rendering_mode)
  • The checkbox Draw coordinates checkbox allows to add coordinates to the map frame. The annotation can be drawn inside or outside the map frame. The annotation direction can be defined as horizontal, vertical, horizontal and vertical, or boundary direction, for each border individually. Units can be in meters or in degrees. Finally you can define the grid color, the annotation font, the annotation distance from the map frame and the precision of the drawn coordinates.

Overview¶

The Overview dialog of the map Item Properties tab provides following functionalities (see Figure_composer_7):

Figure Composer 7:

../../../_images/print_composer_map4.png

Map Overview Dialog nix

If the composer has more than one map, you can choose to use a map to show the extents of a second map. The Overview dialog of the map Item Properties tab allows to customize the appearance of that feature.

  • The Overview frame combolist references the map item whose extents will be drawn on the present map item.
  • The Overview Style allows to change the frame color. See Section vector_style_manager .
  • The Overview Blend mode allows different transparency blend modes, to enhance visibility of the frame. See Rendering_Mode
  • If checked, the checkbox Invert overview creates a mask around the extents : the referenced map extents are shown clearly whereas everything else is blended with the frame color.

Adding a Label item to the Print Composer¶

To add a label, click the mActionLabel Add label icon, place the element with the left mouse button on the print composer canvas and position and customize its appearance in the label Item Properties tab.

The Item Properties tab of a Label item provides following functionalities:

Figure Composer 8:

../../../_images/print_composer_label1.png

Label Item properties Tab nix

Main properties¶

The Main properties dialog of the Label Item Properties tab provides following functionalities (see Figure_composer_9):

Figure Composer 9:

../../../_images/print_composer_label2.png

Label Main properties Dialog nix

  • The Main properties dialog is where is inserted the text (html or not) or the expression needed to fill the label added to the composer canvas.
  • Labels can be interpreted as html code: check the checkbox Render as HTML. You can now insert a url, an clickable image that link to a web page or something more complex.
  • You can also insert an expression. Click on the [Insert an expression] to open a new dialog. Build an expression by clicking the functions available in the left side of the panel. On the right side of the Insert an expression dialog is displayed the help file associated with the function selected. Two special categories can be useful, particularly associted with the Atlas functionnality : geometry functions and records functions. On the bottom side, a preview of the expression is shown.
  • Define font and font color by clicking on the [Font] and [Font color...] buttons

Alignment and Display¶

The Alignment and Display dialogs of the Label Item Properties tab provide following functionalities (see Figure_composer_10):

Figure Composer 10:

../../../_images/print_composer_label3.png

Label Alignment and Display Dialogs nix

  • You can define the horizontal and vertical alignment in the Alignment zone
  • In the Display tag, you can define a margin in mm and/or a rotation angle in degrees for the text.

Adding an Image item to the Print Composer¶

To add an image, click the mActionAddImage Add image icon, place the element with the left mouse button on the print composer canvas and position and customize its appearance in the image Item Properties tab.

The image Item Properties tab provides following functionalities (see figure_composer_11):

Figure Composer 11:

../../../_images/print_composer_image1.png

Image Item properties Tab nix

Main properties, Search directories and Rotation¶

The Main properties and Search directories dialogs of the Image Item Properties tab provide following functionalities (see Figure_composer_12):

Figure Composer 12:

../../../_images/print_composer_image2.png

Image Main properties, Search directories and Rotation Dialogs nix

  • The Main properties dialog shows the current image that is displayed in the image item. Click on the [...] button to select a file on your computer.
  • This dialog shows all pictures stored in the selected directories.
  • La sezione Cerca cartelle permettere di selezionare ed aggiungere alla banca dati delle immagini le cartelle contenenti immagini in formato SVG.

  • Image can be rotate, with the Rotation selectnumber field.
  • Activating the checkbox Sync with 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.

Adding a Legend item to the Print Composer¶

Per aggiunger una legenda, cliccare su mActionAddLegend Aggiungi nuova legenda vettoriale, posizionare gli elementi con il tasto sinistro del mouse sul layout di stampa e personalizzarli nella relativa sezione nella scheda Oggetto.

The Item properties of a legend item tab provides following functionalities (see figure_composer_14):

Figure Composer 13:

../../../_images/print_composer_legend1.png

Legend Item properties Tab nix

Main properties¶

The Main properties dialog of the legend Item Properties tab provides following functionalities (see figure_composer_14):

Figure Composer 14:

../../../_images/print_composer_legend2.png

Legend Main properties Dialog nix

  • Here you can adapt the legend title.
  • Choose which Map item the current legend will refer to in the select list.
  • Since QGIS 1.8, you can wrap the text of the legend title to a given character.

Legend items¶

The Legend items dialog of the legend Item Properties tab provides following functionalities (see figure_composer_15):

Figure Composer 15:

../../../_images/print_composer_legend3.png

Legend Legend Items Dialog nix

  • The legend items window lists all legend items and allows to change item order, group layers, remove and restore items of the list, edit layer names. 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. The item order can be changed using the [Up] and [Down] buttons or with ‘drag and drop’ functionality.
  • The feature count for each vector layer can be shown by enable the [Sigma] button.
  • Legend can be updated automatically, checkbox Auto-update is checked.

Fonts, Columns, Symbol and Spacing¶

The Fonts, Columns, Symbol and Spacing dialogs of the legend Item Properties tab provide following functionalities (see figure_composer_16):

Figure Composer 16:

../../../_images/print_composer_legend4.png

Legend Fonts, Columns, Symbol and Spacing Dialogs nix

  • You can change the font of the legend title, group, subgroup and item (layer) in the legend item. Click on a category button to open a Select font dialog.
  • All those items will get the same Color
  • Legend items can be arranged in several columns. Select the correct value in the Count selectnumber field.
  • The checkbox Equal columns widths sets how legend columns should be adjusted.
  • The checkbox Split layers option allows a categorized or a graduated layer legend to be divided upon columns.
  • You can change width and height of the legend symbol in this dialog.
  • Spacing aroung title, group, subgroup, symbol, icon label, box space or column space can be customized throught that dialog.

Adding a Scalebar item to the Print Composer¶

Per aggiungere una barra di scala, cliccare su mActionScaleBar Aggiungi nuova barra di scala , posizionare gli elementi con il tasto sinistro del mouse sul layout di stampa e personalizzarli nella relativa sezione nella scheda Oggetto.

The Item properties of a scalebar item tab provides following functionalities (see figure_composer_17):

Figure Composer 17:

../../../_images/print_composer_scalebar1.png

Scalebar Item properties Tab nix

Main properties¶

The Main properties dialog of the scalebar Item Properties tab provides following functionalities (see figure_composer_18):

Figure Composer 18:

../../../_images/print_composer_scalebar2.png

Scalebar Main properties Dialog nix

  • First choose the map the scalebar will be attached to.
  • then choose the style of your scalebar. Six styles are available :
  • Single box and Double box styles which contain one or two lines of boxes alternating colors,
  • Middle, Up or Down line ticks,
  • Numeric : the scale ratio is printed, i.e. 1:50000.

Units and Segments¶

The Units and Segments dialogs of the scalebar Item Properties tab provide following functionalities (see figure_composer_19):

Figure Composer 19:

../../../_images/print_composer_scalebar3.png

Scalebar Units and Segments Dialogs nix

In those two dialogs, you can set how the scalebar will be represented.

  • Select the map units used. There’s three possible choices : Map Units is the automated unit selection, Meters or Feet force unit conversions.
  • The Label field defines the text used to describe the unit of the scalebar.
  • The Map units per bar unit allows to fix the ratio between a map unit and its representation in the scalebar.
  • You can define how many Segments will be drawn on the left and on the right side of the scalebar, and how long will be each segment (Size field). Height can also be defined.

Display, Fonts and colors¶

The Display and Fonts and colors dialogs of the scalebar Item Properties tab provide following functionalities (see figure_composer_20):

Figure Composer 20:

../../../_images/print_composer_scalebar4.png

Scalebar Display, Fonts and colors Dialogs nix

  • You can define how the scalebar will be displayed in its frame. Adjust the Box margin between text and frame borders, Labels margin between text and scalebar drawing and the Line width of the scalebar drawing.
  • The Alignment in the Display dialog only applies to Numeric styled scalebars and puts text on the left, middle or right side of the frame.

Adding a Basic shape or Arrow item to the Print Composer¶

It is possible to add basic shapes (Ellipse, Rectangle, Triangle) and arrows to the print composer canvas : click the mActionAddBasicShape Add basic shape icon or the mActionAddArrow Add Arrow icon, place the element with the left mouse button on the print composer canvas and position and customize their appearance in the Item Properties tab.

The Shape Item properties tab 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.

Figure Composer 21:

../../../_images/print_composer_shape.png

Shape Item properties Tab nix

The Arrow Item properties tab 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.

Figure Composer 22:

../../../_images/print_composer_arrow.png

Arrow Item properties Tab nix

Main properties¶

  • For Basic shapes, this dialog allows you to choose a Ellipse, Rectangle or Triangle shape and its rotation.
  • Unlike the other items, line style, line color and background color of a basic shape are adjusted with the Frame and Background dialog. No frame is drawn.
  • For arrows, you can define here the line style : Color, Line width and Arrow head width.
  • Arrows markers can be adjusted. If you want to set a SVG Start marker and/or End marker, browse to your SVG file by clicking on the [...] button after selecting SVG radio button.

Nota

Unlike other items, background color for a basic shape is the shape background and not the frame one.

Add attribute table values to the Print Composer¶

It is possible to add parts of a vector attribute table to the print composer canvas : click the mActionOpenTable Add attribute table icon, place the element with the left mouse button on the print composer canvas and position and customize their appearance in the Item Properties tab.

The Item properties of a attribute table item tab provides following functionalities (see figure_composer_23):

Figure Composer 23:

../../../_images/print_composer_attribute1.png

Scalebar Item properties Tab nix

Main properties, Show grid and Fonts¶

The Main properties, Show grid and Fonts dialogs of the attribute table Item Properties tab provide following functionalities (see figure_composer_24):

Figure Composer 24:

../../../_images/print_composer_attribute2.png

Attribute table Main properties, Show grid and Fonts Dialog nix

Figure Composer 25:

../../../_images/print_composer_attribute3.png

Attribute table Select attributes Dialog nix

  • The Table dialog allows to select the vector layer and columns of the attribute table. Attribute columns can be sorted and you can define to show its values ascending or descending (see figure_composer_25).
  • You can choose to display only the attribute of features visibled on a map. Check checkbox Show only visible features and select the corresponding Composer map to filter.
  • You can define the Maximum number of rows to be displayed and margin around text.
  • Additionally you can define the grid characteristics of the table (Stroke width and Color of the grid) and the header and content font.

Add a HTML frame to the Print Composer¶

It is possible to add a clickable frame, linked to an URL : click the mActionAddHtml Add html frame icon, place the element with the left mouse button on the print composer canvas and position and customize their appearance in the Item Properties tab.

Main properties¶

The Main properties dialog of the HTML frame Item Properties tab provides following functionalities (see figure_composer_26):

Figure Composer 26:

../../../_images/print_composer_html.png

HTML frame Item properties Tab nix

  • Point the URL field to the URL or the HTML file you want to insert in the composer.
  • You can adjust the rendering of that page with the Resize mode.
  • Use existing frames constraints the page inside its first frame or in the frame created with the next settings.
  • Extent to next page will create as many frames (and their pages) as necessary to render the height of the webpage. Each frame can be moved around on the layout. If you resize a frame, the webpage will be divided up upon the other frames. The last frame will be trimmed to fit the webpage.
  • Repeat on every page will first repeat the upper left of the webpage on every page, in same sized frames.
  • Repeat until finished will also create as many frames as the Extend to next page option, except All frames will have the same size.

Item alignment¶

Le funzionalità per muovere in alto o in basso gli elementi del layout di stampa sono nel menu mActionRaiseItems Muovi gli oggetti selezionati: selezionare un elemento dal layout di stampa e scegliere la funzionalità richiesta dal menu citato (tabella table_composer_1).

Figure Composer 27:

../../../_images/alignment_lines.png

Alignment helper lines in the Print Composer nix

There are several alignment functionalities available within the mActionAlignLeft Align selected items pulldown menu (see table_composer_1). 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. When moving items on the composer canvas, alignment helper lines appear when borders, centers or corners are aligned.

Strumenti Annulla e Ripristina¶

Durante la creazione di un layout di stampa è possibile annullare e ripristinare dei cambiamenti tramite gli strumenti:

  • mActionUndo Annulla l’ultimo cambiamento

  • mActionRedo Ripristina l’ultimo cambiamento

or by mouse click within the Command history tab (see figure_composer_28).

Figure Composer 28:

../../../_images/command_hist.png

Command history in the Print Composer nix

Atlas generation¶

The print composer includes generation functions that allow to create map books in an automated way. The concept is to use a coverage layer, which contains geometries and fields. For each geometry in the coverage layer, a new output will be generated where the content of some canvas maps will be moved to highlight the current geometry. Fields associated to this geometry can be used within text labels.

There can only be one atlas map by print composer but this one can contain multiple pages. Every pages will be generated with each feature. To enable the generation of an atlas and access generation parameters, refer to the Atlas generation tab. This tab contains the following widgets (see Figure_composer_29):

Figure Composer 29:

../../../_images/print_composer_atlas.png

Atlas generation tab nix

  • A checkbox Generate an atlas enables or disables the atlas generation.
  • A combobox Composer map selectstring that allows to choose which map item will be used as the atlas map, i.e. on which map geometries from the coverage layer will be iterated over and displayed.
  • A combobox Coverage layer selectstring that allows to choose the (vector) layer containing the geometries on which to iterate over.
  • An optional checkbox Hidden coverage layer, that if checked, will hide the coverage layer (but not the other ones) during the generation.
  • An optional checkbox Features sorting that, if checked, allows to sort features of the coverage layer. The associated combobox allows to choose which column will be used as the sorting key. Sort order (either ascending or descending) is set by a two-state button that displays an up or a down arrow.
  • An optional Feature filtering text area that allows to specify an expression for filtering features from the coverage layer. If the expression is not empty, only features that evaluate to True will be selected. The button on the right allows to display the expression builder.
  • An input box Scaling that allows to select the amount of space added around each geometry within the allocated map. Its value is meaningful only when using the autoscaling mode.
  • A checkbox Fixed scale that allows to toggle between auto-scale and fixed-scale mode. In fixed scale mode, the map will only be translated for each geometry to be centered. In auto-scale mode, the map’s extents are computed in such a way that each geometry will appear in its whole.
  • An Output filename expression textbox that is used to generate a filename for each geometry if needed. It is based on expressions. This field is meaningful only for rendering to multiple files.
  • A checkbox Single file export when possible that allows to force the generation of a single file if this is possible by the chosen output format (PDF for instance). If this field is checked, the value of the Output filename expression field is meaningless.

In order to adapt labels to the feature the atlas plugin iterates over, use a label with this special notation [%expression using field_name%]. For example, with a city layer with fields CITY_NAME and ZIPCODE, you could insert this :

“[% ‘The area of ‘ || upper(CITY_NAME) || ‘,’ || ZIPCODE || ‘ is ‘ format_number($area/1000000,2) || ‘ km2’ %]“

And that would result in the generated atlas as

“The area of PARIS,75001 is 1.94 km2”.

Generation¶

The atlas generation is done when the user asks for a print or an export. The behaviour of these functions will be slightly changed if an atlas map has been selected. For instance, when the user asks for an export to PDF, if an atlas map is defined, the user will be asked for a directory where to save all the generated PDF files (except if the checkbox Single file export when possible has been selected).

Creazione di file in uscita¶

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

Figure Composer 30:

../../../_images/print_composer_complete.png

Print Composer with map view, legend, image, scalebar, coordinates , text and HTML frame added nix

Il compositore di stampe consente di creare diversi formati in uscita ed è possibile definirne la risoluzione (qualità di stampa) e il formato pagina:

  • L’ciona mActionFilePrint Stampa consente di stampare il layout su una stampante collegata o su un file PDF o Postscript.

  • L’icona mActionSaveMapAsImage Esporta come immagine esporta il layout in diversi formati immagine come PNG, BPM, TIF, JPG,...

  • L’icona mActionSaveAsPDF Esporta come PDF esporta il layout in formato PDF.

  • L’icona mActionSaveAsSVG Esporta come SVG salva il layout di stampa in formato SVG (Scalable Vector Graphic).

Nota

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. Export big raster can sometimes fail, even if there seems to be enough memory. This is also a problem of the underlaying Qt management of raster.

Manage the Composer¶

With the mActionFileSaveAs Save as template and mActionFileOpen 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 mActionComposerManager Composer Manager button in the QGIS toolbar and in Composer ‣ Composer Manager allows to add a new composer template, create a new composition based on a previously saved template or to manage already existing templates.

Figure Composer 31:

../../../_images/print_composer_manager.png

The Print Composer Manager nix

By default, the composer manager searches for user templates in ~/.qgis2/composer_template.

The mActionNewComposer New Composer and mActionDupComposer Duplicate Composer buttons in the QGIS toolbar and in Composer ‣ New Composer and Composer ‣ Duplicate Composer allow to open a new composer dialog, or to duplicate an existing composition from a previously created one.

Finally you can save your print composition with the mActionFileSave Save Project button. This is the same feature as in the QGIS main window. All changes will be saved in a QGIS project file.

Navigazione

  • indice
  • successivo |
  • precedente |
  • »
  • Manuale utente di QGIS »
  • i

If not stated otherwise, all content is licensed under Creative Commons Attribution-ShareAlike 3.0 licence (CC BY-SA)

Select graphics from The Noun Project collection