Bug report #6900
GRASS raster stretching is not applied in QGIS master on project load
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | Radim Blazek | ||
Category: | Project Loading/Saving | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 16025 |
Description
It works fine in QGIS 1.8.
Basically when opening a project with a GRASS raster, QGIS calculates in a wrong way the min/max values (you can see from raster properties) and so the stretching (on project load) is not applies (grey rectangle).
The user can then re-compute min/max values and the stretching is correctly applied.
Associated revisions
disabled raster data file timestamp check in loading style, fixes #6900
History
#1 Updated by Radim Blazek almost 12 years ago
Does it happen only if an existing project is loaded or also if a new GRASS layer is added?
What do you see in raster properties? Min/max values correctly set and contrast enhancement set to Stretch to MinMax and it does not render correctly?
The project was created with 1.8 or master?
#2 Updated by Giovanni Manghi almost 12 years ago
- File Capture.PNG added
- File Capture2.PNG added
Radim Blazek wrote:
Does it happen only if an existing project is loaded or also if a new GRASS layer is added?
only when loading from project
What do you see in raster properties? Min/max values correctly set and contrast enhancement set to Stretch to MinMax and it does not render correctly?
see attached screenshot:
no CE when it should be, and min/max values wrong
The project was created with 1.8 or master?
master
#3 Updated by Radim Blazek almost 12 years ago
Only with GRASS? All rasters?
I cannot confirm, it works here.
#4 Updated by Giovanni Manghi almost 12 years ago
Radim Blazek wrote:
Only with GRASS? All rasters?
I cannot confirm, it works here.
project and mapset here
#5 Updated by Radim Blazek almost 12 years ago
- Status changed from Open to Closed
- Resolution set to worksforme
Your layer in project file has
<contrastEnhancement> <minValue>-2.14748e+09</minValue> <maxValue>2.14748e+09</maxValue> <algorithm>0</algorithm> </contrastEnhancement>
if I add the same layer to that project and save it, it has
<contrastEnhancement> <minValue>219.136</minValue> <maxValue>1659.36</maxValue> <algorithm>1</algorithm> </contrastEnhancement>
I don't think it is related to GRASS. I cannot help you.
#6 Updated by Giovanni Manghi almost 12 years ago
- Category changed from Rasters to Project Loading/Saving
- Status changed from Closed to Reopened
- Resolution deleted (
worksforme)
It may be not a GRASS issue, but still an issue and a regression.
#7 Updated by Radim Blazek over 11 years ago
- Status changed from Reopened to Closed
Fixed in changeset dbb0730d3691ce039a418ef6ba55aa34a53bd2e5.
#8 Updated by Radim Blazek over 11 years ago
Sorry Giovanni, your project file was correct, I was wrong.
Raster layer was checking timestamp of data file stored with style so that if data changed (for example min/max changed) symbology was completely recreated. However it could may make sense in some cases, it would probably cause more problems and confusion (e.g. if file + project are copied) so I disabled the timestamp check.