Bug report #18869
2.18 Raster Style qml's not applying correctly in QGIS 3.4
Status: | Open | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Symbology | ||
Affected QGIS version: | 3.4.0 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 26701 |
Description
New Description: After loading a .qml raster layer style in QGIS 3.0,3.2,3.4 that was created in 2.18, the raster style changes. However, upon clicking "Apply" or "OK", raster style reverts to the default color ramp loaded. See attached gif for this behavior. However if before you press apply you change your min/max value settings to user defined it will work. Also if the .qml's classificationMinMaxOrigin= is edited from "MinMaxFullExtentEstimated" or "CumulativeCutFullExtentEstimated"
to "Unknown" the resulting .qml works.
Old Description:
After loading a premade .qml raster layer style, the raster style changes. However, upon clicking "Apply" or "OK", raster style reverts to the default color ramp loaded. See attached gif for this behavior.
History
#1 Updated by Bas wein over 6 years ago
Same issue here. Seems to only apply to QML's that I made in 2.18. QML's that I make in 3.2 load fine.
#2 Updated by Giovanni Manghi over 6 years ago
- Status changed from Open to Feedback
Bas wein wrote:
Same issue here. Seems to only apply to QML's that I made in 2.18. QML's that I make in 3.2 load fine.
if this is the case than I think is expected, raster symology has been overhauled in QGIS 3 and I would not expect 2.18 QML files to work.
#3 Updated by Bas wein about 6 years ago
- File raster style issue.JPG added
I just checked and this is still an issue in 3.4.
I think this is a very important issue for the long term release. If users are transitioning from 2.x to 3.x and their styles are not respected then that is a serious concern for people that have set up raster styles that they depend on.
As a potential work around I tried to save a 2.18 file with a stylized raster then open it up in 3.4 so I could then save the style. At first it looked fine but as soon as I open up the properties it changes. Looking in the layer styling panel it appears that the color ramp is wrong.
#4 Updated by Bas wein about 6 years ago
- File Broken-Slope_Classes_Soil_Survey.qml added
- File Fixed-Slope_Classes_Soil_Survey.qml added
Update-I recreated the same style in QGIS 3.4, saved it as a .qml, applied it to a raster in 2.18 (it worked), saved it as a .qml from 2.18, applied it as a style in 3.4 and it worked.
I then opened up both of the .qml's in notepad ++. There where a few small differences but the one that seemed to be effecting it was in the broken .qml classificationMinMaxOrigin="MinMaxFullExtentEstimated"
In the working .qml
classificationMinMaxOrigin="Unknown"
Changing this setting made the broken one work. If I had to guess- It seems to me there is an issue with the raster min/max conversion from 2.x to 3.x. I hope this can be fixed. Thanks
#5 Updated by Bas wein about 6 years ago
Also if before you press apply you change your min/max value settings to user defined it will work.
#6 Updated by Giovanni Manghi about 6 years ago
- Affected QGIS version changed from 3.0.2 to 3.4.0
Changing this setting made the broken one work. If I had to guess- It seems to me there is an issue with the raster min/max conversion from 2.x to 3.x. I hope this can be fixed. Thanks
you should use this finding to give this ticket a new/better subject and description.
#7 Updated by Bas wein about 6 years ago
Giovanni Manghi wrote:
Changing this setting made the broken one work. If I had to guess- It seems to me there is an issue with the raster min/max conversion from 2.x to 3.x. I hope this can be fixed. Thanks
you should use this finding to give this ticket a new/better subject and description.
Either I don't have permission to change the subject/description or I can't find the button. Should I open a new ticket?
#8 Updated by Giovanni Manghi about 6 years ago
Either I don't have permission to change the subject/description or I can't find the button. Should I open a new ticket?
post here the new subject and descriptions, I will use them to update this ticket.
#9 Updated by Bas wein about 6 years ago
Thanks!
Subject: 2.18 Raster Style qml's not applying correctly in QGIS 3.4
Description: After loading a .qml raster layer style in QGIS 3.0,3.2,3.4 that was created in 2.18, the raster style changes. However, upon clicking "Apply" or "OK", raster style reverts to the default color ramp loaded. See attached gif for this behavior. However if before you press apply you change your min/max value settings to user defined it will work. Also if the .qml's classificationMinMaxOrigin= is edited from "MinMaxFullExtentEstimated" or "CumulativeCutFullExtentEstimated"
to "Unknown" the resulting .qml works.
Status: Open
Operating System: Win 7, Win 10
#10 Updated by Giovanni Manghi about 6 years ago
- Description updated (diff)
- Category changed from Rasters to Symbology
- Status changed from Feedback to Open
- Subject changed from Cannot apply raster styles to 2.18 Raster Style qml's not applying correctly in QGIS 3.4
- Operating System deleted (
Windows 7)