RS_Shape¶
Returns the shape (size of each dimension) of a raster band.
Usage¶
list<int64> RS_Shape(rast: raster)
list<int64> RS_Shape(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 shape of a raster band as a list of dimension sizes. The entries correspond to the dimension names returned by RS_DimNames.
For a standard 2D raster this returns [height, width]. For an
N-dimensional raster with a time dimension it might return
[12, 256, 256] meaning 12 time steps at 256x256 spatial resolution.
When the band index is omitted, all bands must agree on their shape; if they disagree, an error is returned prompting the user to specify a band index.
Examples¶
SELECT RS_Shape(RS_Example());
┌────────────────────────┐
│ rs_shape(rs_example()) │
│ list │
╞════════════════════════╡
│ [32, 64] │
└────────────────────────┘