Skip to content

[UDF R] Output only Nodata #317

Answered by davidfrantz
thielfab asked this question in Q&A
Mar 13, 2024 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Thanks, you found a bug!

A while ago, I optimized the R UDF code, such that no-data pixels won't arrive on R's end to speed up things.
Unfortunately, the code for copying back from R->C had a buggy if-condition that did not work when NOT using a mask.

Now, both should work. Can you try again?

Cheers,
David

BTW: The call to as.integer() is not necessary, this happens internally anyway:

      "force_rstats_ <- function(array){                                     \n"
      "  dates_str <- paste(years, months, days, sep='-')                    \n"
      "  dates <- as.Date(dates_str, format='%Y-%m-%d')                      \n"
      "  array <- replace(array, array == na_value, NA)          …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@thielfab
Comment options

Comment options

You must be logged in to vote
1 reply
@thielfab
Comment options

Answer selected by thielfab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working fixed Issue was fixed UDF
2 participants