GDAL
October 7, 2009, 3:46am
1
#778: i.rgb.his, i.his.rgb: propagate NULLs
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: minor | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: i.rgb.his, i.his.rgb | Platform: All
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Hi,
NULL cells in i.rgb.his R,G,B input appear as non-NULL cells (0) in H,I,S
output maps. Same happens in the reverse i.his.rgb process.
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/778> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
June 25, 2012, 4:58pm
2
#778: i.rgb.his, i.his.rgb: propagate NULLs
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: i.rgb.his, i.his.rgb | Platform: All
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Changes (by cmbarton):
* priority: minor => major
Comment:
This remains a serious hidden bug. At the very least, it should be
documented in the manuals for these routines. Especially for remote
sensing imagery, 0 is a meaningful value. To mix 0's with nulls is to
corrupt the information in the image. Because of the potential for data
corruption and because it is an undocumented behavior that differers from
most (all?) other raster modules, I'm also upping the priority to major.
Note that because neither i.rgb.his or i.his.rgb deal with nulls
correctly, they cannot be used with a MASK.
Is this difficult to fix?
Michael
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/778#comment:1> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
June 25, 2012, 8:00pm
3
#778: i.rgb.his, i.his.rgb: propagate NULLs
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: i.rgb.his, i.his.rgb | Platform: All
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by glynn):
Replying to [comment:1 cmbarton]:
> Is this difficult to fix?
Not really.
In 7.0, nulls resulted in garbage. 7.0 doesn't have an equivalent of
G_get_map_row(), but rgb2his/his2rgb don't explicitly check for nulls, so
they will be treated as the literal value -2147483648. This should be
fixed by r52207.
In 6.x, change G_get_map_row() to G_get_c_raster_row() in main(), then
manually back-port r52207.
Also, we might want to do something about the hard-coded 0..255 range
(r.composite uses the colour table to convert cell values to intensities),
but that's a separate issue.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/778#comment:2> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
June 25, 2012, 8:42pm
4
#778: i.rgb.his, i.his.rgb: propagate NULLs
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: i.rgb.his, i.his.rgb | Platform: All
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by cmbarton):
Thanks much. I agree about the 0-255 range. Can it simply be a setting,
like in i.pca, with a default of 0,255 but changeable to a different
min,max?
Michael
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/778#comment:3> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
June 25, 2012, 9:51pm
5
#778: i.rgb.his, i.his.rgb: propagate NULLs
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: i.rgb.his, i.his.rgb | Platform: All
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by hamish):
backported to devbr6 in r52208 for testing.
thanks,
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/778#comment:4> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
June 25, 2012, 9:58pm
6
#778: i.rgb.his, i.his.rgb: propagate NULLs
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: i.rgb.his, i.his.rgb | Platform: All
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by cmbarton):
I'll recompile and test in GRASS 7. Do I need to test separately in GRASS
6?
Michael
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/778#comment:5> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
June 25, 2012, 10:05pm
7
#778: i.rgb.his, i.his.rgb: propagate NULLs
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: i.rgb.his, i.his.rgb | Platform: All
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by hamish):
> Do I need to test separately in GRASS 6?
the more testing the better :). Once it is confirmed working in devbr6
with real data we can backport to 6.4.
thanks,
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/778#comment:6> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
June 25, 2012, 10:07pm
8
#778: i.rgb.his, i.his.rgb: propagate NULLs
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: i.rgb.his, i.his.rgb | Platform: All
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by cmbarton):
By devbr6, you mean 6.5?
Michael
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/778#comment:7> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
June 25, 2012, 10:10pm
9
#778: i.rgb.his, i.his.rgb: propagate NULLs
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: i.rgb.his, i.his.rgb | Platform: All
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by hamish):
> By devbr6, you mean 6.5?
yes.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/778#comment:8> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
June 25, 2012, 11:01pm
10
#778: i.rgb.his, i.his.rgb: propagate NULLs
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: i.rgb.his, i.his.rgb | Platform: All
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by cmbarton):
This works in GRASS 7 at least. Still compiling devbr6.
Michael
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/778#comment:9> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
June 26, 2012, 7:16pm
11
#778: i.rgb.his, i.his.rgb: propagate NULLs
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: i.rgb.his, i.his.rgb | Platform: All
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by glynn):
Replying to [comment:3 cmbarton]:
> I agree about the 0-255 range. Can it simply be a setting, like in
i.pca, with a default of 0,255 but changeable to a different min,max?
It could be, but that's limited to a linear scale. Using the colour table
is more flexible, although that limits you to 8-bit resolution.
Probably the easiest solution is to just add a "divisor" option, which
would default to 255 (or maybe to 1.0 for floating-point maps), and maybe
a flag to use the colour table. That would allow for more than 8-bit
resolution, and for floating-point maps using 0.0..1.0. If you want
anything more complex (e.g. "gamma" law), you have to pre/post-process the
maps with r.mapcalc.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/778#comment:10> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
September 2, 2013, 7:33am
12
#778: i.rgb.his, i.his.rgb: propagate NULLs
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: i.rgb.his, i.his.rgb | Platform: All
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by mlennert):
This was never backported to the 64 release branch. It probably should, or
?
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/778#comment:11> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
September 2, 2013, 8:48am
13
#778: i.rgb.his, i.his.rgb: propagate NULLs
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: i.rgb.his, i.his.rgb | Platform: All
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by hamish):
Replying to [comment:11 mlennert]:
> This was never backported to the 64 release branch. It probably should,
or ?
I have just begun backports for the 6.4.4 round, currently I'm going
through module by module seeing what should be backported and what is
still a work in progress or experiment. I'm starting with simple stuff in
scripts/ & haven't got to i.rgb.his yet. (kdiff3 seems to be useful here,
I've had trouble with regex filtering of false positives using meld et al.
tips on the wiki)
regards,
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/778#comment:12> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
September 2, 2013, 5:51pm
14
#778: i.rgb.his, i.his.rgb: propagate NULLs
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: i.rgb.his, i.his.rgb | Platform: All
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by cmbarton):
For pan sharpening at least, it would be helpful if these modules could
deal with floating point values instead of just integers.
Michael
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/778#comment:13> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
September 3, 2013, 7:07am
15
#778: i.rgb.his, i.his.rgb: propagate NULLs
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: i.rgb.his, i.his.rgb | Platform: All
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by mlennert):
Replying to [comment:13 cmbarton]:
> For pan sharpening at least, it would be helpful if these modules could
deal with floating point values instead of just integers.
I think this is a different issue and shouldn't be part of this ticket. It
was already mentioned in #774 .
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/778#comment:14> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
March 26, 2014, 9:44am
16
#778: i.rgb.his, i.his.rgb: propagate NULLs
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: i.rgb.his, i.his.rgb | Platform: All
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by neteler):
Hamish, do you plan to backport to 6.4.svn?
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/778#comment:15> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
May 14, 2015, 9:56pm
17
#778: i.rgb.his, i.his.rgb: propagate NULLs
--------------------------+----------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Resolution: | Keywords: i.rgb.his, i.his.rgb
CPU: Unspecified | Platform: All
--------------------------+----------------------------------
Comment (by wenzeslaus):
So only backport is missing? Or can we even close the ticket without the
backport? (since the change is in 7.0.0 (the latest release) as fas as I
understand from the comments) There is something about the backport in
comment:2 but it is really that easy and who will test it?
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/778#comment:16> ;
GRASS GIS <http://grass.osgeo.org >