New answers tagged

-2

I don't know your problem clearly but try to do 03 option in this picture.


1

Like this example of Wilmington, IL United States? Which is using vector data rather than raster images. This is using the QGIS Plugin OSMDownloader available in QGIS plugins Select your area of interest Save to a folder It will download the data in the format for QGIS and set the layers The Styles will be applied and you can then tinker with the settings ...


3

1+1 is a number, 2. A+B is a concatenated text, AB But what should happen when A+1 is computed? Should it be a concatenated text, or an invalid operation? QGIS will first try to convert the string to a number, then to do the addition, which fails as A is not a number. It would however succeed with '1'+2 = 3. To overcome this behavior, you can either use the ...


0

I also had troubles getting the solution to work (no labels were shown). I solved it by running Fix geometries in QGIS. After that, I used intersects($geometry, @atlas_geometry )=1. Using $id = @atlas_featureid did not work for me.


5

Via data defined override: Go to "Labels" --> "Rendering" --> "Show label" --> "Data defined override" of your point-layer and insert intersects($geometry,@atlas_geometry) as expression as shown below: Or via Rule Based Labeling: Go to "Labels" --> "Rule-Based Labeling" of your point-...


4

The correct syntax is: CASE when "fid" = 12 then 6 End No need for wordwrap, because data defined override here expects an integer input. You can see this on mousehover:


4

The expression for label opacity based on scale: if(@map_scale>1750, 50, 100) The expression for polygon fill opacity based on scale: color_rgba(255, 0, 0, ( 1 - if(@map_scale>1750, 0.5, 0)) * 255) Now both the labels and polygon fills are 50% transparent if you zoom out of the 1:1750 scale. The different syntax is caused by the fact that label ...


4

Apply the following query for the opacity of labels in the Expression String Builder (Expected Format: int[0-100]) CASE WHEN @map_scale> 750 THEN 20 END Map Scale: 1:578 Map Scale: 1:1157


3

The labels displayed in your map, and the labels displayed in the text of your question are different. The labels in the map shows B3- 24F DP & \PSP2, and the labels in the text of your question shows B3-24F DP&\PSP2. The former text contains more spaces compared with the latter text. Anyway whatever the case, you need to use Wrap lines to and ...


3

Your expression does exactly what it is supposed to be doing. I guess you mixed up the terms "split" and "wrap". Go to your label properties and navigate to "formatting". Then fill "wrap on character" with -: Also check out the other options available there ;)


4

The correct syntax for your expression is: if(@map_scale>1750,color_rgb(128,128,128),"auxiliary_storage_labeling_color") or Case When @map_scale>1750 Then color_rgb(128,128,128) Else "auxiliary_storage_labeling_color" End


1

The answer to this problem seems to be quite simple. In the "Placement" section we should switch off (Deactivate) X and Y coordinates including the auxiliary geometry. If we leave just rotation active with marked "Preserve data rotation values", then I am able to rotate the feature keeping its placement based on the expression instead of ...


0

The common cartographer shivers when seeing this. Please rotate your bottom map by 180 degrees, or even better leave it aligned north from the start. The second map wouldn't be much larger, but much easier to read when aligned north. Also, keeping the labels next to the features is way more efficient and effective when it comes to transporting information. ...


2

To add another option to @TeddyTedTed answer You may use the scale_linear (or scale exp) fonction : function scale_linear Transforms a given value from an input domain to an output range using linear interpolation. (the scale_exp fonction do the same but using an exponential curve) This will give you a big range of text size without having to input many ...


3

You're on the right track with if else but case would be easier, it's similar to if else but easier for more options. In expressions $area returns the area of a polygon in square metres or feet depending on the coordinate system. So we use case to create different label sizes depending on the $area value for the polygons. In the label properties add an ...


2

Try re-arranging your case statement slightly and adding an 'else'. This will also allow you to manually move and rotate labels while maintaining your custom list of rotations. This goes into the data-defined override for the Rotation, while the X and Y are already set to 'store data in project' aka using auxillary storage: CASE WHEN "fid" = 31 ...


1

Use the 'data defined override' option for 'Size' in the Labels tab of Layer Styling - you won't need rule based labelling: In my example here, there's a basic point layer with two categories, 'house' and 'car'. To style them differently, you click on the data-defined-override drop-down and select 'edit', then add an expression to produce the numbers for ...


5

Thank to @Erik I found the answer quickly. I just missed that the Anchor point wasn't centred, so I just centered it and everything works fine!


2

The Automatic placement of labels outside polygons is a new feature that was added in QGIS 3.14. It enables you to add labels outside the polygons automatically if they do not fit inside the polygon. Here is the illustration from the link above: Also, the new feature provides an option to place labels outside the polygons in case you choose other placement ...


1

Ok, I've found the option Rendering -> Label every part of multi-part features. Combined with manual adjustment of the label distances it is not perfect, but now it is at least possible to label every line >= 1 time.


2

You can do this within label properties under "Placement":


3

A few checks : Make sure your XY field are correctly pointed at in the Placement tab and that they are activated : Properties/ Label/Position/Coordinates (see below). The X and Y buttons should be yellow. Make sure your XY fields are not NULL. If it's the case, the label engine will continue moving them following the default configuration like you show on ...


4

You could try rule based labeling:


Top 50 recent answers are included