% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/raster.R
\name{vec_write_time_cube}
\alias{vec_write_time_cube}
\title{Write a 4D time-cube raster to .vec}
\usage{
vec_write_time_cube(
  x,
  times,
  path,
  dtype = "f32",
  tile_size = 512L,
  layout = c("image", "pixel"),
  extent = NULL,
  gt = NULL,
  epsg = 0L,
  nodata = NA_real_,
  band_names = NULL,
  compression = c("fast", "balanced", "max")
)
}
\arguments{
\item{x}{Numeric 4D array \code{c(rows, cols, bands, time)}.}

\item{times}{Numeric/integer vector with \code{length(times) == dim(x)[4]},
in the unit of your choice (epoch ms, year, step index).}

\item{path}{Output \code{.vec} path.}

\item{dtype}{Storage dtype (see \code{vec_write_raster}).}

\item{tile_size}{Tile edge in pixels.}

\item{layout}{Tile layout — one of \code{"image"} (default; one tile per
\verb{(band, time, ty, tx)}, optimal for "give me one full image at time
T" reads) or \code{"pixel"} (Phase 6b; one tile per \verb{(band, ty, tx)}
holding the full time stack as \verb{[tw*th, n_time]}, optimal for "give
me the time series at pixel \verb{(x, y)}" reads).}

\item{extent, gt, epsg, nodata, band_names, compression}{Same semantics as
\code{vec_write_raster()}.}
}
\value{
Invisible \code{NULL}.
}
\description{
Each (band, time) combination becomes a stack of tiles tagged with the
chosen time stamp. Stamps are stored as int64 in the per-tile index
entry; a value of \code{0} is reserved for "untimed" so this writer remaps
any caller-supplied 0 to 1 internally.
}
