Skip to contents

R-side twin of cell_model_tile_sql(). Use it to add a tile IN (…) filter so DuckDB prunes to the relevant partitions — without it a query reads every partition, which is the whole problem cell_model exists to solve.

Usage

cell_model_tiles(cell_id, ncol = .CELL_GRID_NCOL)

Arguments

cell_id

integer vector of cell ids

ncol

grid width in columns; MUST match what the writer used. Pass cell_grid_ncol(con) when reading a database rather than assuming.

Value

sorted unique integer tile ids

Examples

cell_model_tiles(c(1080221L, 1080222L))
#> [1] 436