Divides the grid into one or two lists of chunked sf objects, depending on the data-collection case (1,2,3).
get_batches(cases, grid, batch_size)
(list) A list of two elements, b1
and b2
, each a list
of sf subsets (chunks). b2
might be NULL
if not needed.
[mandatory] (integer) 1=All build, 2=All update, 3=Mixed.
[mandatory] (sf) The sf object (grid) containing column 'add' to distinguish existing vs. new rows.
[mandatory] (integer) If cases
= 1 or 2, we'll call
get_batch(grid,batch_size=batch_size)
.