[GRASS-dev] [GRASS GIS] #498: r.sun2 out of sync / broken svn history

Markus Neteler neteler at osgeo.org
Tue Apr 7 04:54:07 EDT 2009


Hoping for feedback... r.sun still needs a fix for LatLong.

Markus

---------- Forwarded message ----------
From: Markus Neteler <neteler at osgeo.org>
Date: Sat, Mar 14, 2009 at 9:09 AM
Subject: Re: [GRASS-dev] [GRASS GIS] #498: r.sun2 out of sync / broken
svn  history
To: Hamish

On Fri, Mar 13, 2009 at 11:40 AM, Hamish <hamish_b at yahoo.com> wrote:
>
> MN:
>> I am looking in devel_branch6:
> ....
>> Is that the same as in the comment? I am not good in these
>> logical comparisons.
>
>
> ah,
> https://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/raster/r.sun/main.c#L1332
> https://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/raster/r.sun2/main.c#L1848
>
> oh yeah, it needs the latin==NULL && lt=NULL checks otherwise the
> values set in the if(latin) part just before or lt earlier will
> always be overwritten.
>
>
> hmmmm.. but then the longitude variable is not set.
> some sort of if(longin) { ... clone of if(latin) { ... needed
> at r.sun2/main.c#L1855 to set that???

I have attached a diff - please check.

> I've used r.sun quite a bit, but never latin= or lat= options.
> (nor really understood why you would use that)

nor me ...

> also I notice la_min and la_max for lat= option are not set so stay
> at init values of +-90deg. prob better to set max=min=latitude,
> together with a -90<lat<90 check at its sscanf(). (and check sscanf
> returns "1" answer; and pass through G_scan_northing() so it can accept DDD:MM:SS format)

Mhh, not sure how to do that, could you try?

Markus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rsun2.diff
Type: application/octet-stream
Size: 1053 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20090407/32ea114d/rsun2.obj


More information about the grass-dev mailing list