You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (meta->flags&WK_FLAG_HAS_Z&&meta->flags&WK_FLAG_HAS_M) {
trans_filter->xyzm_in[2] =coord[2];
trans_filter->xyzm_in[3] =coord[3];
} elseif (meta->flags&WK_FLAG_HAS_Z) {
trans_filter->xyzm_in[2] =coord[2];
trans_filter->xyzm_in[3] =R_NaN;
} elseif (new_meta->flags&WK_FLAG_HAS_M) {
trans_filter->xyzm_in[2] =R_NaN;
trans_filter->xyzm_in[3] =coord[2];
} else {
trans_filter->xyzm_in[2] =R_NaN;
trans_filter->xyzm_in[3] =R_NaN;
}
I think the bug is line 158, which tests for the m dimension being in the output. This results in garbage output in m dimension, when use_m = TRUE and input dimensions are xy. The below reprex shows what I mean.
Transformers are using meta flags inconsistently when operating on coords.
wk/src/transform.c
Lines 152 to 164 in 67f7013
I think the bug is line 158, which tests for the
m
dimension being in the output. This results in garbage output inm
dimension, whenuse_m = TRUE
and input dimensions arexy
. The below reprex shows what I mean.If my understanding is correct, fix is a 1-liner.
Created on 2024-03-06 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: