QGIS 12 Output

Robert Crowther Jun 2022
Last Modified: Feb 2023

Prev

Long time coming.

QGIS output

QGIS can output maps in an unlikely number of image formats. For example, output can be ICO, the image format used for Webpage marks. Who uses that? But ok. Interestingly, output can be PDF.

In my version of QGIS, one notable format missing is SVG. It is possible to save to SVG, but only by using the ‘Print Layout’ feature. For more on Print Layout, look further down this page.

Direct image output from QGIS

QGIS offers it’s usual surprise—precise image configuration. The image output dialogue allows modification of canvas extent, scale, resolution (in Dots Per Inch) and modification for output width and height.

I think most people, to start, will be happy with a PNG of the entire map,

Project > Import/Export > Calculate from Layer (pick a layer) > Save

Pick a filename, then Save.

Difficulties with image output

I don’t know, but it seems QGIS image output is designed for print. By ‘print’, I mean for further import into page editors. ‘resolution’ is offered as an option—useful for a printer/press. For example, most old laser printers worked at 300 dpi. The QGIS assumption seems to be that, if the user wishes to handle layout directly, they should use the ‘Print Layout’ feature (described in the next section).

Here’s some information about the image output dialogue,

In other words, what you see is what you get. But I think it’s unlikely that’s what users want. That’s the reason for setting canvas extents in the section above—I think most people will want to output the whole map.

Anyway, the output configuration is not good for me. Most of my output is for ebooks or web publishing. In which case, I need a fixed output width, and maybe height. Resolution means little—if a map is blurred, or the output heavy, I need to rethink map extents, not mess with resolution. Also, I annotate maps in other software so I need to consistently output maps, and revisions of maps, with the same dimensions. But this is what happens,

Result, it is impossible to set a constant dimension of output. Output sizes vary with whatever scale used to view, the dialogue always needs to be reset to map extent, and setting exact output dimensions is not possible (unless you mess with the DPI setting, but that would require to make a calculation of DPI outside QGIS …for every image save).

If you have the same issue, I have no good answer. I decide a scale that, using the full map, gives me a sizing near my aim. I must then remember what that scale is, map by map. Sometimes I make a note in a supplementary file. Then,

This is far from a fluid process, and requires me to further adjust image size in later software. But it gets me close to target size. And guarantees, when I revise maps, that output size is consistent.

The ‘Print Layout’ feature

I think most people will want to see a map and print it. So above I swept across a huge feature of OGIS, ‘Print Layout’. Print Layout lets you create a map with other items embedded and overlaid. It’s like what is called desktop‐publishing, or perhaps ‘page‐editing’ software. If you’ve used software like Indesign or Scribus, you’ll know what ‘Print Layout’ can do.

There is no way that QGIS features can match dedicated desktop‐publishing software. But ‘Print Layout’ has a reason for existing. There are visual features you may wish to add to a map which depend on the map data. For example, an insert that shows closeup detail. Or latitude/longitude lines, legends or a compass image—which should point North, whatever the orientation of the map.

The QGIS manual seems to be comprehensive about this processing step. However, the manual is only a sketch of what it can do. If you are interested, I suggest you look for some tutorials. Also, see the section below on ‘Moving to a dedicated editor’.

Getting Started with Print Layout

You’ll see nothing until you define a square from,

Add Item > Add Map

Once you do this, you’ll see the map from the editing canvas. But there will be a problem—attempt to resize and the map will scale. This is incredibly frustrating—you’ll never get a canvas border round the source map. I suggest, with the map selected,

Layout Properties > Item Properties > Main Properties > Scale

Then adjust the ‘Scale’ value until the map fills the canvas. Also try the ‘Move Item Content’ tool. Now, because you don’t want the map moving under any layout you carefully prepare above,

Items > Lock Selected Items

Also may help,

Layout > Reset Layout to Content

Ok, now you can add compasses, and other annotation/decoration.

Moving to a dedicated raster or vector editor

Sometimes it is better to add decorations and features without using QGIS. Dedicated editors are easier and faster to use.

When to move from QGIS

The decision when to move from QGIS seems to be clear. Stay with QGIS if you,

For general decoration and annotation, working in Inkscape or a similar vector editor is easier by far than working in QGIS. It will halve your work‐time. Move to an editor if you,

How to move to a dedicated editor

Not as simple as I hoped, because QGIS lacks relevant output formats. My choices of output format would be SVG, or PNG with a transparent background. QGIS offers neither. ‘Print Layout’ can output in SVG but introduces a mass of considerations to do with scaling, canvas sizing and so forth. I’d skip all that, use the direct,

Import/Export > Export to PNG Image

Up the resolution to 300dpi or similar, print the map, then import to the editor.

Warning: moving to a dedicated editor is irreversible

If you decorate a map in a dedicated editor, even a vector editor, the results can not be pulled back into QGIS. It’s clear from the web people would like to do this. For example, draw a border‐line using Inkscape, then import back into QGIS. Sadly, this can not be done. I’ve seen nonsense about this on the web—the conversion requires only that an abstract set of node marks is recalculated to work with a coordinate system, then written down in a format such as Shapefile or GML. Unfortunately, QGIS, which has the code libraries, can not do this, and I’ve not found a straightforward application or plugin that will.

Refs

OGIS manual, overview of ‘Print Layout’,

https://docs.qgis.org/3.22/en/docs/user_manual/print_composer/overview_composer.html

QGIS ‘lesson’ on Print Layout. Ask me, any sofware needing a lesson has usability issues,

https://docs.qgis.org/3.4/en/docs/training_manual/map_composer/map_composer.html

End‐note

I am uninformed in this subject, and my interest is only to churn out a map, I have no interest in delving the fathoms‐deep subject of map‐data coordination, nor of advanced styling. However, this may be my advantage. Not in application documentation, not on YouTube, not in numerous web posts, have I found anything approaching this guide. Far from that, I have found some web‐posts that are self‐serving and offensive. Which, in the area of map‐making, puzzles me. Hope what you get here is of use.