I am trying to establish a workflow to gapfill temporal maps using r.hants
and r.series.lwr. It is important that the solution also works in windows
for the teaching.
The issue I am encountering is that both r.hants and r.series.lwr are
returning 0 values in Windows with a majority of the valid pixels in the
original raster converted to NULL() in outputs.
While in Linux it works well and gives the intended results.
r.univar map=ETact_SEBAL_2019_03_mm_month_lwr@TMPMAP
total null and non-null cells: 10413
total null cells: 417
Of the non-null cells:
----------------------
n: 9996
minimum: 0
maximum: 78.5551
range: 78.5551
mean: 5.9911
mean of absolute values: 5.9911
standard deviation: 11.3704
variance: 129.287
variation coefficient: 189.789 %
sum: 59887.0226345476
------------
the issue is here in your original command:
range=0,inf
winGRASS doesn't recognize inf or INF as infinity.
there is somewhere an old ticket in trac. please open an issue in github for this.
kind regards
Helmut
[p.s. it's not possible anymore to post via nabble.com in the GRASS ML: Read-Only Archive. You cannot post here. This is a read-only archive. was there any change there in the settings?]
----------------------------------------
[...]
My guess - input.d8cut->answer contains extra chars (CR/LF issue?) and thus changing line to read:
if (strncmp(input.d8cut->answer, "infinity", 8) == 0) {
would solve the issue. Still, if it is so, then it is worth to digg deeper to see why it is failing as strcmp is used in many modules.
[...]
I guess that the MS Windows version of sscanf does not recognize infinity as a floating point number, while the Linux version does.
[...]
----------------------------------------
IMHO it's still worth to fix the issue with inf/INF as this issue pops up from time to time.
if it's not possible, the manual should be updated where needed that examples work also in winGRASS. PR welcome.
Thank you for testing and finding the issue. Both commands work well without infinity in Windows.
Big help for continuing to use GRASS GIS in Windows for the course.
I have opened an issue in github.
Regards
Sajid
On Fri, Jun 26, 2020 at 11:05 AM Helmut Kudrnovsky <hellik@web.de> wrote:
[…]
My guess - input.d8cut->answer contains extra chars (CR/LF issue?) and thus changing line to read:
if (strncmp(input.d8cut->answer, “infinity”, 8) == 0) {
would solve the issue. Still, if it is so, then it is worth to digg deeper to see why it is failing as strcmp is used in many modules.
[…]
I guess that the MS Windows version of sscanf does not recognize infinity as a floating point number, while the Linux version does.
[…]
IMHO it’s still worth to fix the issue with inf/INF as this issue pops up from time to time.
if it’s not possible, the manual should be updated where needed that examples work also in winGRASS. PR welcome.
On Sat, Jun 27, 2020 at 2:26 AM Sajid Pareeth <spareeth@gmail.com> wrote:
Dear Helmut
Thank you for testing and finding the issue. Both commands work well without infinity in Windows.
Big help for continuing to use GRASS GIS in Windows for the course.
I have opened an issue in github.
I have taken liberty to transfer it to "grass-addons":