[GRASS-dev] [GRASS GIS] #3210: r.texture: bug when non continuous series of values
GRASS GIS
trac at osgeo.org
Tue Nov 22 08:03:26 PST 2016
#3210: r.texture: bug when non continuous series of values
--------------------------+-------------------------
Reporter: mlennert | Owner: grass-dev@…
Type: defect | Status: reopened
Priority: normal | Milestone: 7.2.0
Component: Raster | Version: svn-trunk
Resolution: | Keywords: r.texture
CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------
Comment (by mlennert):
There also seems to be something wrong with the Difference Variance
calculation in the new version.
{{{
r.texture lsat7_2002_80 out=lsat8_text method=dv
r.info lsat8_text_DV -r
min=-inf
max=0.1154514
}}}
By checking whether tmp is 0 in the function, I get an output that again
looks much more interesting than the <= g7.0.5 output, but not sure this
is right way to approach this:
{{{
- var = ((tmp * sum_sqr) - (sum * sum)) / (tmp * tmp);
+ if (tmp > 0) {
+ var = ((tmp * sum_sqr) - (sum * sum)) / (tmp * tmp);
+ } else {
+ var = 0;
+ }
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3210#comment:17>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list