[GRASS-dev] i.topo.corr ported to GRASS 7
Markus Neteler
neteler at osgeo.org
Sun Aug 28 10:04:33 EDT 2011
On Sun, Aug 28, 2011 at 2:11 AM, Glynn Clements
<glynn at gclements.plus.com> wrote:
>
> Markus Neteler wrote:
>
>> > BTW, does it really need three separate versions of what appears to be
>> > essentially the same function?
>>
>> I guess not (I am not the original author). Rather likely it can be reduced
>> to one routine. I suppose that the DOUBLE function should survive and
>> the result be casted appropriately.
>
> Either that, or use the generic functions (the ones which take a
> RASTER_MAP_TYPE argument) and G_incr_void_ptr().
>
> But looking at the i.topo.corr code, I'd suggest just using the DCELL
> version. Regardless of the input type, the result is always DCELL, as
> are most of the calculations.
Ok. Doing so, I reduced also in main.c to
dem.rast = Rast_allocate_buf(DCELL_TYPE);
eval_cosi(&out, &dem, zenith, azimuth);
This leads (while apparently still calculating something reasonable) to
these errors:
ERROR: Input window changed while maps are open for read
ERROR: Cairo: input file has incorrect dimensions: expected: 640x480 got:
698x533
ERROR: Cairo: input file has incorrect dimensions: expected: 640x480 got:
698x533
(the latter will come from the former). Any pointers?
Markus
More information about the grass-dev
mailing list