[QGIS-trac] Re: [Quantum GIS] #1497: colormap edge case handling wrong for negative valued rasters

Quantum GIS qgis at qgis.org
Sun Feb 15 13:09:03 EST 2009


#1497: colormap edge case handling wrong for negative valued rasters
-----------------------------------------------------+----------------------
        Reporter:  Barryrowlingson                   |         Owner:  ersts        
            Type:  bug                               |        Status:  assigned     
        Priority:  major: does not work as expected  |     Milestone:  Version 1.0.1
       Component:  Rasters                           |       Version:  HEAD         
      Resolution:                                    |      Keywords:               
Platform_version:                                    |      Platform:  Linux        
        Must_fix:  No                                |   Status_info:  0            
-----------------------------------------------------+----------------------
Changes (by ersts):

  * status:  new => assigned
  * owner:  nobody => ersts

Comment:

 Replying to [ticket:1497 Barryrowlingson]:

 > If things were symmetric with the positive raster, it should be red, but
 it doesn't get shaded.
 >
 > As it is, it seems that a positive floating point raster will always
 have cells of the single max colour done in one shade, and a negative fp
 raster will always have cells of the minimum colour set transparent...

 If there is a pixel > -0.563 it should be shaded red, but if there is a
 pixel < -8.38 it will not be shaded.

 Check out the trunk and see if your problem still exists. I am not sure I
 totally understand your explanation and may be missing something. If the
 problem still exists, please post an ascii version of your 20x20 grid and
 your color map.


 > Also note the 'Exact' interpolation doesn't match any cells - I thought
 it might find equality with the min and max cells, but doesn't. Probably
 only useful for integer rasters.

 Check your values outside of qgis, or better yet try with an ascii grid.
 It should work for all data. Part of the issue has to do with gdal gives
 data as float but it is used throughout the raster class as doubles and
 the problem comes down to comparing the type of values. Your color map
 entry may be 1.05 but the value may be 1.050000000000001 in the data. This
 issues shows up with the no data value as well. Really need to go back to
 if( Value1 - Valu2 ) < some constant ( e.g. 0.0000000001 ) Consider the
 values equal.

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/1497#comment:1>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list