Describes the regular grid that spatial_join() uses to partition two
streamed layers for the both-sides-larger-than-RAM case. Cell (cx, cy)
covers [origin_x + cx * cellsize_x, origin_x + (cx + 1) * cellsize_x) and
likewise in y, so a coordinate maps to the cell floor((coord - origin) / cellsize). Pick a cellsize comparable to the scale of the join (large
enough that most cells hold a workable shard, small enough that one cell's
features fit in memory); for an extended-on-extended join choose it larger
than the left features.
Usage
grid(cellsize, origin = c(0, 0))See also
spatial_join() for the join it partitions.