Opened 8 years ago
Last modified 6 years ago
#3221 new defect
r.cross output misses one category
Reported by: | pvanbosgeo | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.7 |
Component: | Default | Version: | svn-trunk |
Keywords: | Cc: | ||
CPU: | Unspecified | Platform: | Linux |
Description
I have two layers with 2 categories (1 and 2) each. When combined using r.cross the output is a map with three categories according to the message on the command line. Also, the map created has three colours.
Yet, there should be four categories, and there is indeed a fourth category with value 0 (but without category label)
r.stats -l input=grevrobenvclust 0 1 category 1; category 2 2 category 2; category 1 3 category 2; category 2 * no data
This category 0 is the area where both layers have a value 1. See also the attached screenshot.
So there are the problems that:
- only three categories are reported, while there are four in reality
- one (the first) category has no category label with the values of the input maps
- the category 0 (without category label) is assigned the same colour as category 3
- When running the tool to create interactively the colour table, colours are only assigned to categories 1-3, so the category 0 should not have a colour (see attached screenshot). Clicking the 'apply' button without changing the categories, and the category 0 will indeed disappear from the map.
Attachments (1)
Change History (6)
by , 8 years ago
Attachment: | screenshot.png added |
---|
comment:1 by , 8 years ago
Platform: | Unspecified → Linux |
---|---|
Version: | unspecified → svn-trunk |
comment:2 by , 8 years ago
comment:3 by , 7 years ago
Milestone: | 7.0.6 → 7.0.7 |
---|
comment:5 by , 6 years ago
IIUC, this was fixed in #72281.
I tested in relbranch and I get a category 0 which is the product of the 2 input maps:
r.cross -z input=landclass96@PERMANENT,geology_30m@PERMANENT output=test r.category map=test 0 developed; CZfg 1 developed; CZlg 2 developed; CZig 3 developed; CZbg ...
Replying to pvanbosgeo:
I can confirm this with the NC dataset in grass73. Maybe some issue with category value 0 ?:
With r.stats I get:
and when running r.stats directly on the two input maps: