Returns an XYZ tile URL template (with {z}/{x}/{y} placeholders) for the
msens TiTiler factory. The SQL is canonicalized (whitespace collapsed) then
base64url-encoded. Consistent canonicalization is critical so repeated calls
with equivalent SQL produce identical URLs — Varnish keys on the full URL.
Usage
cell_tile_url(
sql = NULL,
colormap = "spectral_r",
rescale = NULL,
color = NULL,
mtime = NULL,
mdl_key = NULL,
base = "https://titiler-v8.marinesensitivity.org"
)Arguments
- sql
character(1); SELECT returning
cell_idandvaluecolumns- colormap
character; rio-tiler colormap name (default: "spectral_r")
- rescale
numeric length-2
c(min, max)for normalization;NULLlets the server auto-compute from the SQL result on each tile request (prefer a client-side value fromcell_stats()for cache stability)- color
character(1); hex
#rrggbbor#rrggbbaafor a single-color mask. When set, the server renders every valid pixel in this flat color (ignoringcolormap+rescale) — useful for binary "cell is present / cell is outside X" overlays.- mtime
character; optional cache-bust tag, typically the mtime of the source DuckDB file (e.g. from
file.info(sdm_db)$mtime). Distinct from the data version tag (v6,v7, ...) used in paths.- mdl_key
character(1); the STABLE model key fast-path. When given (and
sqlNULL), the tile reads exactly one serving partition by exact path — the merged-model equivalent of a dense SQL point query, with no S3 LIST. titiler resolvesmdl_key-> the internal integer partition id from themodelregistry, so this URL keeps referencing the same model across releases even as that internal id is renumbered.- base
character; base URL of the tile service. Defaults to the v8
titiler-v8factory, which accepts?mdl_key=. (The legacytitilecacheVarnish caches the v7 titiler, whose API takes?sql=and 422s onmdl_key— so it must not be used for v8 tiles.)