RS_NumDimensions¶
Returns the number of dimensions in a raster band.
Usage¶
int32 RS_NumDimensions(rast: raster)
int32 RS_NumDimensions(rast: raster, band: int)
Arguments¶
- rast (raster): Input raster
- band (int): Band index (1-based). A null or out-of-range index returns null.
[!WARNING]
Experimental. This function is experimental; its behavior may change without notice.
Description¶
Returns the number of dimensions in a raster band. A standard 2D raster
has 2 dimensions (y and x). N-dimensional rasters (e.g., from Zarr
or NetCDF sources) may have additional dimensions such as time,
pressure, or wavelength.
When the band index is omitted, all bands must agree on the number of dimensions; if they disagree, an error is returned prompting the user to specify a band index.
Examples¶
SELECT RS_NumDimensions(RS_Example());
┌────────────────────────────────┐
│ rs_numdimensions(rs_example()) │
│ int32 │
╞════════════════════════════════╡
│ 2 │
└────────────────────────────────┘