Image Archives in Zarr

View Source

Store image tiles as chunks and process with Broadway:

array
|> ExZarr.Array.stream_chunks(concurrency: 16, metadata: true)
|> Stream.map(fn %{index: idx, data: tile} ->
  {idx, process_tile(tile)}
end)
|> then(&ExZarr.Array.write_stream(output_array, &1, batch_size: 8))

Each chunk corresponds to a spatial tile. Use metadata: true to recover pixel bounds without separate coordinate math.