-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong size of legend symbols size and map symbol when using geometry generator on a point layer #33755
Comments
@gwenandres your layer has a CRS that has degrees as units? |
The CRS is 2154 so it has meters as units. |
@gwenandres Can't confirm here on 3.10.1 on Ubuntu 18.04 but I'm not totally sure I followed the exact steps that lead you to see this problem. |
@gioman Sorry if I am not clear. I have the problem on a point layer, not on a surface layer. Yes it can be strange but I have point layer with surface generator. |
@gwenandres oh I see... moreover not only the legend symbol does not make sense, but also the generated area on map is not visible at all. |
I was able to replicate this. It only happens on Rule-based (maybe categorized too) Symbol, but not in single symbol, where it works just fine. |
@SrNetoChan I confirm as well this behaviour when using the geometry generator and happens with categorized symbol. Cheers |
@jonnyforestGIS have you tested the fix using the scenario described in this ticket? |
I have confirmed this on master. @Nirv fix does not fix the issue when the geometry generator is uses in categorised, graduated or rule based renderers. But works like a charm for single symbol renderer |
See also #29119 |
I guess we can close one as duplicate. |
already did :) |
I can still replicate this on QGIS 3.16.14 and 3.22.1. |
There is an option to limit the size of the legend patches in the layers panel (settings > options > Map and Legend > Layer legend > Legend maximum size). It seems to work fine for symbols where the size is controlled by an expression, but not by geometry generators. In this project, this is clear |
Is your layer in 4326? The geometry generator map units refer to the layer's units. |
@nyalldawson Yes it was. I think I have worked out I had a workflow issue. When I create a new layer, usually a scratch layer I change its Geometry Type (say to Points) and add fields if needed but don't change the CRS. Somehow I thought the scratch layer would have followed the map layer I had underneath. I worked out if I change the CRS (eitger on creation or afterwards, it all works). The thing I still notice though is they if you open Geometry Generator expression build and look at the "map_units" variable it shows it as being "meters". So obviously this isn't correctly reflecting the Map Units that the layer is using. (Also if you have the layer selected and move your mouse the coordinates in the bottom still show metres and not degrees. |
Hello,
I get really big symbols in the legend on a point layer with surface or line geometry generator when I choose categorized symbols.
For example :
buffer ($ geometry, 2)
)I am working with QGIS 3.4.14 LTR on Windows 7 or 10.
I try with QGIS 3.10.1, I have the same behaviour.
The text was updated successfully, but these errors were encountered: