[GRASS-dev] Re: [GRASS GIS] #610: r.sun: incidout uses 0 instead of NULL

GRASS GIS trac at osgeo.org
Fri May 22 07:09:25 EDT 2009


#610: r.sun: incidout uses 0 instead of NULL
---------------------+------------------------------------------------------
  Reporter:  hamish  |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect  |      Status:  new                      
  Priority:  normal  |   Milestone:  6.5.0                    
 Component:  Raster  |     Version:  6.4.0 RCs                
Resolution:          |    Keywords:  r.sun                    
  Platform:  All     |         Cpu:  All                      
---------------------+------------------------------------------------------
Comment (by mmetz):

 Replying to [comment:6 neteler]:
 > I contacted Jaro:
 >
 > On Fri, May 22, 2009 at 11:09, Jaro Hofierka wrote:
 > > ... I believe that it is in rsunlib.c in lumcline2() function.
 > > If s < 0 (shadow) it returns 0, what in fact should be null.
 > >
 >
 > > Also please note that the s variable in lumcline() is initiated to 0.
 {{{
     double s = 0;
 }}}
 > > (this covers also other causes of shadows)
 >
 > > So what is returned from the lumcline() as 0 should be written as null
 in
 > > the output.

 As simple as
 {{{
 if (s <= 0)
     return UNDEFZ;
 }}}
 in trunk/raster/r.sun2/rsunlib.c#L438 - #L439 ?

 Markus M

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/610#comment:7>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list