[GRASS-dev] [GRASS GIS] #3210: r.texture: bug when non continuous series of values

GRASS GIS trac at osgeo.org
Tue Nov 22 14:20:09 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 mmetz):

 Replying to [comment:17 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:

 Division by zero results in inf. For variance, variance should in this
 case not be inf but zero, therefore the fix is IMHO correct. A slightly
 different patch, also testing for division by zero in other texture
 measures, has been applied in r69872-4 for all G7 branches.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3210#comment:19>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list