Bug report #13707
Data dependent styling of vector layers broken after upgrade to 2.12 from 2.10
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Nyall Dawson | ||
Category: | Symbology | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Linux | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 21734 |
Description
I recently upgraded to QGIS 2.12 from 2.10 on Ubuntu 15.04 and one of my projects lost the data dependent overrides on the linewidth and colour of a line pattern fill of a vector layer.
I have a digital elevation model which I segmented and processed to a vector polygon layer, and used the average slope, slope direction, and curvature from the attribute table to style a line pattern fill, and an SVG marker line pattern fill.
This drew arrows in the downslope direction, which were thicker for steeper slopes, and coloured according to the longitudinal curvature. An example can be seen at my blog: [[http://skrifennow.blogspot.co.uk/2015/10/a-greyscale-version-of-my-maps-in.html]]
I use the following expressions:
for colour: case when RAT_LngtCrv_Mean > 0 then color_rgb(min(255,255*5*RAT_LngtCrv_Mean),0,0) else color_rgb(0,0,min(255,-255*5*RAT_LngtCrv_Mean)) end
for linewidth (using map units - metres): case when RAT_Slope_deg_Mean > 2.25 then max(20*((RAT_Slope_deg_Mean - 2.25)/ 90),0.4) else 0.0001 end
for size of the SVG arrow: case when "RAT_Slope_deg_Mean" > 2.25 then max(75*sqrt((RAT_Slope_deg_Mean - 2.25)/ 90),5) else 0.0001 end
for angle (working): 90 - RAT_Aspect_deg_mean
However after upgrading to QGIS 2.10, the data dependent styling of the line fill has disappeared as seen in the attached file. There is only the default black colour and linewidth, although the slope direction still works.
I am wondering if this is a bug?
Associated revisions
Fix data defined overrides for sub symbols in line and marker fill
are not being applied (fix #13707)
Followup 2ac5933 with more data defined fixes
2ac5933 fixed the regression in 2.12, but there were more underlying
issues from <2.8 causing sub symbols with data defined properties
to be ignored.
Add some tests.
(refs #13707)
Fix data defined overrides for sub symbols in line and marker fill
are not being applied (fix #13707)
(cherry-picked from 2ac59332130186d891635f01c6c7677685716863)
Followup 2ac5933 with more data defined fixes
2ac5933 fixed the regression in 2.12, but there were more underlying
issues from <2.8 causing sub symbols with data defined properties
to be ignored.
Add some tests.
(refs #13707)
(cherry-picked from 9e84fcafd8597846367a7417ce0ce77f7a4ca587)
History
#1 Updated by David Trethewey about 9 years ago
#2 Updated by David Trethewey about 9 years ago
#3 Updated by David Trethewey about 9 years ago
#4 Updated by David Trethewey about 9 years ago
I just replaced the example project, because the expression for the size of the arrow was incorrect, unfortunately I can't seem to remove the earlier version of qgis212-bugtest-vecpoly-linepattern-lessminimalexample.zip
#5 Updated by Nyall Dawson about 9 years ago
- Status changed from Open to In Progress
- Assignee set to Nyall Dawson
Confirmed and bisected to d6d6827
#6 Updated by Nyall Dawson about 9 years ago
- Status changed from In Progress to Closed
Fixed in changeset 2ac59332130186d891635f01c6c7677685716863.