Bug report #11718
When adding manually a categorized symbology class this is not ordered correctly when clicking on "value"
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Symbology | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | end of life |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 19956 |
Description
new description:
- open a vector
- make a categorized symbology using a interger/double column
- clicking on the "value" column you can order the classes as expected, desc/asc because are numbers
- manually delete one class
- add a new class and give it the value of the previously deleted one
- now when clicking "value" the new class takes and unpredictable position, and not anyway the expected one
old description:
Hi,
it seems that the 'categorized' style builder assumes that column for styling data contains string values.
When the symbol classification is sorted by the Value column, string ordering is applied, not numeric.
For instance, integer categories 0-15 are ordered like: 0, 1, 10, 11, 12, 13, 14, 15, 2, 3, 4, 5, 6, 7, 8, 9.
This makes it difficult to extend the range manually.
Is it possible to detect the data type and order appropriately?
best wishes - JS
History
#1 Updated by jeremy spurway almost 10 years ago
PS.
I forgot to add, I'm using QGIS 2.4.0
#2 Updated by Giovanni Manghi almost 10 years ago
- Status changed from Open to Feedback
- Category set to Symbology
it does not seems to be an issue on qgis 2.6, please try and report back.
#3 Updated by jeremy spurway almost 10 years ago
Hi,
the same issue exists in 2.6; my categorisation column is a 'double' field, and produces a sorted 'Value' list like:
"... 170, 180, 190, 20, 200, 210..."
JS
#4 Updated by Giovanni Manghi almost 10 years ago
jeremy spurway wrote:
Hi,
the same issue exists in 2.6; my categorisation column is a 'double' field, and produces a sorted 'Value' list like:
"... 170, 180, 190, 20, 200, 210..."
JS
what datasource do you use? I tested shapes and cannot replicate.
#5 Updated by jeremy spurway almost 10 years ago
- File nn60_OST50CONT_20130612.zip added
- File licence.txt added
ESRI shp line; as attached.
#6 Updated by Giovanni Manghi almost 10 years ago
jeremy spurway wrote:
ESRI shp line; as attached.
see attached images
#7 Updated by jeremy spurway almost 10 years ago
- File QGIS_vecStyCat_1.png added
- File QGIS_vecStyCat_2.png added
what happens if you click the 'Value' column to (re)order the data?
see attachments for what happens on my installation
#8 Updated by Giovanni Manghi almost 10 years ago
jeremy spurway wrote:
what happens if you click the 'Value' column to (re)order the data?
see attachments for what happens on my installation
if I click on "value" I still get the right order (asc or desc) if I click "legend" it orders it as text, because the legend is text.
#9 Updated by jeremy spurway almost 10 years ago
- File QGIS_vecStyCat_4.png added
- File QGIS_vecStyCat_6.png added
- File QGIS_vecStyCat_5.png added
- File QGIS_vecStyCat_3.png added
what happens if you add a new category, value =10, then order by value?
for me, it doesn't order numerically.
I tried creating a new layer, for a different shape file, and added a new value (=50).
Each time I click 'Value' column header, the '50' category ends up somewhere different - see attached.
#10 Updated by Giovanni Manghi almost 10 years ago
- Status changed from Feedback to Open
- Tracker changed from Feature request to Bug report
- Subject changed from vector style categorized does not detect numeric column to sort Values to When adding manually a categorized symbology class this is not ordered correctly when clicking on "value"
- Affected QGIS version set to master
- Crashes QGIS or corrupts data set to No
#11 Updated by Giovanni Manghi over 7 years ago
- Easy fix? set to No
- Regression? set to No
#12 Updated by Giovanni Manghi over 5 years ago
- Status changed from Open to Closed
- Resolution set to end of life
End of life notice: QGIS 2.18 LTR
Source:
http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/