Count handler can expose unititialized values when used with the flatten filter and empty geometries
paleolimbot opened this issue · comments
wk::wk_flatten(wk::wkt("MULTILINESTRING EMPTY"))
#> <wk_wkt[0]>
wk::wk_handle(wk::wkt("MULTILINESTRING EMPTY"), wk::wk_flatten_filter(wk::wk_count_handler()))
#> $n_geom
#> [1] 329216
#>
#> $n_ring
#> [1] 0
#>
#> $n_coord
#> [1] 0
Created on 2022-01-24 by the reprex package (v2.0.1)
Even more minimal reprex:
wk::wk_count(wk::wkt())
#> n_geom n_ring n_coord
#> 1 933369368 931197112 0
Created on 2022-09-19 by the reprex package (v2.0.1)