Feature request #14845
Add an option to automatically classify discrete rasters when styling them
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Symbology | ||
Pull Request or Patch supplied: | No | Resolution: | |
Easy fix?: | No | Copied to github as #: | 22798 |
Description
Hi
I am currently working with discrete rasters (landuse categories, boolean rasters...) and there seems to be no straight-forward way to style them.
If I have 30 landuse classes (1, 2, 3,... , 30), I need to use "Single-band pseudo-colour" and to add my 30 values manually. Moreover, if I don't want to display values 18,19,20 and remove them from the list, the pixels with those values will still be displayed (with colours interpolated between 17 and 21).
Would be great to have an additional "Render type" for discrete rasters. It should offer the option to automatically "retrieve all unique values" (like ArcGIS does). The renderer should then only display the pixels matching this list of values. Pixels with other values will just be ignored, not interpolated.
See for reference here
Thanks!
Associated revisions
[FEATURE] Allow classifying paletted renderer using unique values
from a raster layer
Adds an easy way to style discrete rasters such as landuse classes
using the Paletted renderer. Just select the Paletted renderer,
pick a band, then hit the "Add Unique Values" button. The unique
pixel values will be fetched from the layer and a color assigned
to each using the currently selected color ramp.
Fix #14845
Sponsored by
- Stéphane Henriod
- Satelligence (http://satelligence.com/)
- Bird's Eye View (https://www.birdseyeviewgis.com/)
- + other anonymous backers
History
#1 Updated by shenriod - over 8 years ago
#2 Updated by Giovanni Manghi over 8 years ago
- Category set to Symbology
#3 Updated by shenriod - almost 8 years ago
I am not familiar with the etiquette of the ticketing system so sorry if I'm not posting at the right place!
I have the feeling that this requested feature (styling boolean or discrete rasters) is quite "basic" for a professional GIS software like QGIS. Any chance this request can get some attention? :-)
Thanks!
#4 Updated by Giovanni Manghi almost 8 years ago
shenriod - wrote:
I am not familiar with the etiquette of the ticketing system so sorry if I'm not posting at the right place!
I have the feeling that this requested feature (styling boolean or discrete rasters) is quite "basic" for a professional GIS software like QGIS. Any chance this request can get some attention? :-)
Thanks!
I agree, there is a lot of room for improvements about discrete rasters.
Anyway while QGIS is fundamentally users necessity driven, do not expect someone wake up in the morning and add/fix (for free or just because) what is for you/me an important feature. Raise your concerns in the users/developers mailing lists and see if the request gains momentum and if is possible to put together a group of people willingly to support the request.
#5 Updated by shenriod - almost 8 years ago
Thanks for the hint, I will do so!
Edit: follow the discussion here:
http://lists.osgeo.org/pipermail/qgis-user/2017-January/038793.html
http://lists.osgeo.org/pipermail/qgis-user/2017-January/038795.html
http://lists.osgeo.org/pipermail/qgis-user/2017-January/038801.html
#6 Updated by Rick Rupp almost 8 years ago
I agree this is a feature that I very much would like to see/support.
#7 Updated by shenriod - almost 8 years ago
- File landcover.zip added
Adding a typical (fake) discrete raster if anyone wants to make tests
#8 Updated by Martin Dobias almost 8 years ago
Just a note - if you do not want colors to be interpolated, just set the interpolation type to "Exact". This will solve the issue that raster value 5 still gets rendered (as mentioned in the screenshot).
Also you do not need to add all the values manually, you can set min value to 1, max value to 30, number of classes to 30 and the list of colors will be populated by entries as wanted. Of course having a button to fetch all distinct values from raster would be useful...
Multi-selection of classes to edit or remove them would be handy.
In the mail to qgis-dev list you mentioned loading/saving of color maps - that's already possible, look for load/save buttons.
#9 Updated by Andy Harfoot almost 8 years ago
I have posted a workaround in the form of a Processing script as an answer to the GIS SE question on the same topic http://gis.stackexchange.com/questions/194116/qgis-style-a-discrete-raster
It's rough and ready, but does the trick.
#10 Updated by Nyall Dawson over 7 years ago
- Status changed from Open to Closed
Fixed in changeset d03844d24e96adfa57b608e2f40aebea5a8d317f.