Questions tagged [print-composer]
Print composer provides growing layout and printing capabilities in QGIS.
1,185
questions
1
vote
1answer
54 views
Automating Print layout with export map canvas as image using PyQGIS
I would like to automate two steps in my QGIS Print Layout by using PyQGIS
I have my print layout already created, and I was trying to open it by this code:
composerTitle = 'Strand3'
project = ...
2
votes
1answer
46 views
QGIS print layout - map refresh not working
I would like to synchronize my QGIS map with the printing layout map.
According to the tutorial here:
https://docs.qgis.org/3.4/en/docs/training_manual/map_composer/map_composer.html
I can refresh my ...
2
votes
2answers
32 views
Remove LayoutItemLegend entry PyQGIS
I work on QGIS Plugin in python. This plugin load several Print layout in a QGIS project. These print layout contain a legend. I would like to be able to remove a layer from the composer legend ...
1
vote
1answer
33 views
Set extent of Layout Item Map
I work on a QGIS Plugin in python. This plugin import in QGIS project several print layout (A4/A3/Landscape/Portait format) from a directoty of my laptop to the layout manager. The plugin add also a ...
0
votes
1answer
25 views
Print Composer does not show Item Options
I'm rather new to QGIS, the version I have is 3.16.
I want to create a print layout, but when I open the Print Composer panel the "Item Options" window is empty. No way to choose the size of ...
0
votes
1answer
23 views
QGIS Layout: Filter Nth Row in Attribute Table
I have an attribute table in a Qgis Layout and only want to see the first line.
Can I do that?
It's a workaround for overlapping labels.
I want an attribute table with the 1. Line, then a table with ...
1
vote
0answers
34 views
QGIS3 - Simple automation of QGIS output - turn values on/off & print out dozens of maps
I need to make a series of maps of a single location and make a single map for each value in the layer.
I have a layout I've created with borders, texts, north arrow, and everything, with the map, and ...
1
vote
2answers
61 views
How to turn off QGIS legend band number by default?
QGIS automatically generates legends for single band rasters in the print composer legend window.
In the latest releases, it appears that the legend automatically creates a "Band" title in ...
0
votes
0answers
43 views
How to update attribute table layout in QGIS Print Composer?
I have selected some columns from attribute table in print composer linked to layer A.
But when I open my layout in another project with that same layer A, it doesn't refresh/update
and I have to ...
1
vote
2answers
44 views
How to bring feature selection into print composer
I have a PostGIS multipolygon layer in the map view and want to bring the feature selection into the print composer. Also, only the label for the selected feature should be visible in the map I want ...
0
votes
2answers
26 views
Checking layout for compatibility with b/w printing in ArcGIS Pro
I often have to produce paper maps that would likely later be printed in black and white, is there a way in ArcGIS Pro to apply a visual filter on a map to see how (approximately) the print layout ...
0
votes
0answers
21 views
PyQGIS3 Layout : item position relative to another item size
I created an atlas layout with a map, an attribute table, and a label.
I would like to make the y position of the label move according to the size of the attribute table on each atlas page.
The code ...
1
vote
2answers
28 views
QGIS 3.16 - I want to make by 6“x9” map a 24x36, but all of the text/layers are tiny. Is it possible to automatically scale all of the layers?
I recently got a freelancing gig and am really excited, but I'm having troubles exporting my map in a different size in QGIS. My client wants a map sized 24"x36", and I have created one that'...
1
vote
1answer
32 views
QGIS 3.16 - Print layout grid coordinates in DMS?
I am trying to create a grid with coordinates printed in degrees, minutes, and seconds in print layout of QGIS 3.16. The project is defined to EPSG:32652 WGS 84/UTM Zone 52N.
When I go to Grid > ...
0
votes
0answers
64 views
PyQGIS Print Composer not exporting raster layer successfully (CRS in correct format)
I have a Python script that runs and creates statistics using zonal statistics sum tool. The python script adds each layer to the map successfully:
# Add Base Map
OSMBase = "....\\OSM_Base.xml&...
0
votes
0answers
11 views
Aggregating Virtual Fields in the QGIS Layout
I have an atlas creating maps of parks. These parks contain different areas with different types of surfaces, which need to be managed differently.
In my map-layout I'd like to summarise the area of ...
0
votes
0answers
46 views
Scale Bar not appearing in meter-based CRS using QGIS
Students in my GIS class using QGIS 3.1 are having a problem that I can explain theoretically but not practically.
Some students cannot get scale bars to appear in the map composer, even when bar ...
0
votes
1answer
156 views
QGIS 3.18 Override raster gradient legends
In the new QGIS 3.18 (Zurich), raster color ramps automatically show up in the print layout as gradient legends! This is great, but I am trying to match some old maps to new maps for a publication and ...
1
vote
1answer
60 views
How to show data defined centroid fill marker font in the legend?
I'm using QGIS 3.18.0 on Windows 10 (from OSGeo4W Network Installer).
I have a polygon-shapefile with an attribute table including the attributes "signatur", "r", "g" and ...
3
votes
1answer
120 views
cropToContents not working properly in PyQGIS
I have a template qpt which I read via pyqgis script to export multiple maps as png. I have a map and a legend in qpt file and I chose "Only show items inside linked map" so the legend shows ...
0
votes
0answers
12 views
Reset canvas to match print layout/ editing existing map layout QGIS 3
I have multiple map layouts from a large QGIS project which need editing and updating. The layouts are locked so they can be viewed as printed without updating to the current layers in the main QGIS ...
3
votes
1answer
48 views
Repeat a QgsLayoutItem on several pages without using atlas
I am creating a script to export an attribute table in pdf format with PyQGIS 3. The number of features is different regarding the farmer's number of fields and features are sorted by the field id.
...
1
vote
0answers
25 views
Merging values in print composer table
Is there a way in qgis to merge repeated values in attribute table print composer? Something like on the second image bellow.
1
vote
1answer
43 views
Get feature value to use in print composer label
I'm trying to get the value of a feature (the area) to use as label in the print composer, but I'm not getting much success.
This is the expression I'm using in the text label in composer:
attribute(...
1
vote
1answer
37 views
Making street names visible on OSMM WMS, increasing resolution of WMS map at constant scale (Scale Dependent OSMM -SV)
I have my map at a scale where the OSMM background map is not showing the street names. Is there a way to make the street names visible without changing the scale of my map (can't increase scale as ...
0
votes
0answers
48 views
QGIS keeps crashing when exporting print layout map - how to stop this?
When exporting my map which contains vector data and two maps (one as a global locator insert map) as an SVG file QGIS keeps crashing. I need the map to be exported as an SVG file as I want to edit it ...
0
votes
0answers
15 views
QGIS' 3.x - Atlas feature not printing second pdf page
So, I have created a layout managed by Atlas; every layout has 2 A4 pages, one with the atlas view and another with a table based on visible objects. It works perfect when printing to paper (duplex), ...
0
votes
1answer
36 views
Can you assign and use variables within text box QGIS print composer
I'm using dynamic text within a text box in print composer in QGIS 3.12. Is it possible to assign and use variables within this to avoid repeating the same call several times?
I'm using [% attribute(@...
3
votes
1answer
27 views
Automatically switch scalebar units at certain scale
I have a scalebar with a element-width of 70 mm. It has three segments and their width is set to be between 50 and 60 mm. Scalebar units are set to [m]. This works fine when it comes to automated ...
0
votes
0answers
15 views
Show multiple layers in a QGIS Atlas using 'Lock layers' with an attribute field
I'm wondering if it is possible to use an attribute field in a QGIS Atlas coverage layer to show multiple map layers.
I know this is possible with one layer by having the layer's name in the attribute ...
0
votes
1answer
58 views
Sort attribute table in an atlas layout with PyQGIS 3
I wrote a script that automate the production of an atlas layout with PyQGIS 3 that works well but it remains a detail I can't figure out.
Each page of my atlas contains a map zoomed on a particular ...
0
votes
0answers
15 views
Basemap annotations don't export to map image
I am using the Open Street Map baselayer in QGIS 3.10 and when I export the maps to image in print layout, the basemap annotations don't print to the maps. The quality of the basemap is also quite ...
2
votes
1answer
55 views
Adding metadata from JSON file as text to QGIS print layout
I have a have a static URL pointing to a json file on the web that I load to QGIS. It is updated regularly. In the source, before listing the features, it contains metadata, between else a line "...
0
votes
1answer
37 views
How to copy a legend in QGIS map layout?
I am creating a map where I have many legend items. Initially, I divided them into two columns but now I want to separate them. When they were together I have customised font size, style etc.
I can ...
2
votes
1answer
43 views
Unable to find print composer on QGIS
Anyone have information about where Print Composer is hiding.
I have followed the instructions on the QGIS website which says it is under Projects or the button in the control panel. Neither option is ...
6
votes
5answers
201 views
QGIS: How to invert the values in a layout legend?
At 3.16.3 I have added this legend to a map layout. Notice how the lowest value is at the top, with values increasing towards the bottom:
I would like to instead have the lowest value at the bottom, ...
2
votes
0answers
36 views
Exporting many rasters as .png maps
I'm not used to QGIS, and I'm working on a project that involves hundreds of .tiff rasters (interpolations) of attributes of the same place. (the rasters are not really related by time)
In order to ...
3
votes
1answer
108 views
QGIS expression on legend for duplicated values
Having a building table, grouped by an id and its respective amount of apartments. I want to label every symbol id on map composer legend with the amount of apartments.
For a simple expression '...
0
votes
0answers
33 views
Different timeout values in print composer and regular map view in QGIS?
I'm experiencing some issues in the print composer when exporting maps including WMS-layers.
One of the WMS-layers takes a lot of time to load, and I've increased the timeout for network requests in ...
2
votes
1answer
30 views
Is it possible to rotate the map in layout manager?
QGIS 3.12 - Often I have property boundaries that would better fit on an A3 output if rotated 45-90 degrees from that represented in the map view. I can rotate in the map view but the layout manager ...
3
votes
1answer
46 views
Update a round numeric scale with atlas page - PyQGIS3
I would like to add a rounded numeric scale to each map of my atlas, with a blank as thousands separator.
The code below allows to produce this kind of numeric scale but it's not changing with the ...
2
votes
1answer
52 views
Add an expression to calculate an attribute in the print composer with PyQGIS
In the print composer, it's possible to add an expression in the window "select attributes", in order to display an attribute that wasn't calculated in the attribute table of a layer, see an ...
6
votes
1answer
113 views
Modifying layer name in the layout legend with PyQGIS 3
I would like to update the legend item in my layout with other names.
I tried the following code, which returns no error but layers name remain the same.
project = QgsProject.instance()
layout = ...
3
votes
1answer
68 views
Changing fields name of an attribute table in a layout with PyQGIS 3
I have an attribute table in my layout, defined as follow :
layout = QgsPrintLayout(project)
layout.initializeDefaults()
QgsProject.instance().layoutManager().addLayout(layout)
pdf = QgsProject....
3
votes
1answer
59 views
Defining a cell style of an attribute table in a layout using PyQGIS 3
I have an attribute table in my layout, defined as follow :
layout = QgsPrintLayout(project)
layout.initializeDefaults()
QgsProject.instance().layoutManager().addLayout(layout)
pdf = QgsProject....
5
votes
1answer
69 views
Choosing extent and scale while exporting a map
I'm exporting a map to a PNG file in QGIS 3.10.4 via Project > Import/Export > Export Map to Image. In the dialog that shows up, I can select the extent (exported area), scale, resolution (DPI), ...
5
votes
2answers
60 views
Populate legend items with values from another layer
I'm using QGIS 3.10.
I'm trying to label my map with values taken from a different layer (meaning not my atlas coverage layer), which is intersecting the atlas cover layer.
This layer named "...
3
votes
2answers
63 views
QGIS coordinates not displaying correctly
Making my first Print in QGIS, and for some reason the coordinates are all over the place (see image). Does anyone know what would be causing this?
All of my settings seem quite standard, I will post ...
8
votes
1answer
136 views
Adding page number to an atlas layout with PyQGIS 3
I am learning PyQGIS 3 for a few weeks and I am trying to understand how to create an atlas with PyQGIS 3 from the beginning.
UPDATE :
Here is where I am now :
project = QgsProject.instance()
client = ...
6
votes
1answer
77 views
Optimizing number of printing pages in QGIS
When I try to print under QGIS, due to the framing, it prints me 4 pages. Looking more closely, and one by changing the angle of the 2 pages, I am at 2.
How do I automate this?
Current situation:
...