New answers tagged

1

For your label question, there are many solutions. Here is what I would do : I would use attribute table to set the position right or left of the point. The reason : It is a strong solution it need not so much time, you could change any other layer you want, it is easy to set, and you are sure to always get the same result. In your layer used for label ...


1

Add feature, parent parameters to the definition line. Although not needed in the context of the layout, they are mandatory. There are some issues in GitHub. ... @qgsfunction(args= 'auto' , group='Custom') def GetDynamicItemHeight (LayoutName , ItemName, feature, parent): ... ... And use ' instead of " in expression for ItemName ...


1

After a lot of trial and error, I believe the export issue is related to how QGIS calculates the gradient when the coord mode is set to viewport. To eliminate any interference from the underlying map, I created another layout in the print composer with just the indicator map on a blank background. When the map is sized small, the above issue persists. On ...


2

Based on my understanding, you have Atlas layer that contain polygon. Some are made to be set the view on a regional scale and some are made to get a view at a local scale. These polygons can cross one another. In your example, you want to show a label that is in your map view, but that doesn't cross other polygons existing in your atlas layer. The solution ...


5

You could define an expression-based value on the labelfields. if(intersects($geometry, @atlas_geometry), '', "labelfield") This expression gives no label if it intersects the atlas_geometry. If not, a label will appear


9

I had this problem before. The only way I found to do it was to write a IF expression for the inlay map's X position (item properties > position and size > X). Make a note of the inlay map's X value in it's current position in the bottom left (going to call this x1), then drag it into the bottom right and note the new X position (calling this x2). Now, ...


4

You have two option to create a scale bar What you do "normally" you fix the width of your segment in your map unit according to the scale you use and to have easy to use number "25 / 50 / 75 /100". If your map scale change your scale bar length in the print composer. OR You can set the segment size in your layout, this is the Fit segment ...


1

I am not aware of any relative positioning. Maybe it was implemented already like asked in this post. Another approach would be to have only one Text Label Input and use HTML Styling. You would only need to replace the div content with your input data: [%'<h2>Box1:</h2><div style="border: 1px solid black">Foobar</div> <br&...


0

To build on @MrXsquared's answer, In your map window, duplicate your layer 4 times. Hide your main layer. In duplicate layer #1, only show the EGE symbols. Do this by removing all the other symbols in the layer symbology. In duplicate layer #2, only show the HAT symbols. In duplicate layer #3, only show the Humanitarian Assistance symbol. In duplicate ...


1

Firstly, I think you should set a crs to your project. You can see in the bottom right of your screenshot that there is no crs associated with your project. You can do this simply like: # 3857 (optionally) used since you have a wmts in your project project.setCrs(QgsCoordinateReferenceSystem('epsg:3857')) Secondly, you don't see any layers when you load ...


2

Uncheck "auto update" Click on "add group" Mark the group and click on "edit selected item properties" Enter the name you want and go back Select the items you want in the group and move them into the group via drag&drop Adjust spacing, font size, columns, and everything you need Exampleresult: You could also do the ...


3

For dynamically generated text fields, starting with QGIS 3.20, you have the option to click Convert to static text - then you can edit it manually. From visual changelog: This option will evaluate and replace any dynamic parts of a label’s contents with their current values. This provides an easy way to convert dynamic labels to static ones, so that users ...


Top 50 recent answers are included