跳转至
🎉 SedonaDB 0.4.0 已正式发布!🗺️ 新增 Python DataFrame API、R dplyr 接口、Geography 支持及 GPU 加速空间连接。阅读发布博客 →

RS_BandAsArray

Introduction: Extract a band from a raster as an array of doubles.

Format: RS_BandAsArray (raster: Raster, bandIndex: Integer).

Return type: Array<Double>

Since: v1.4.1

BandIndex is 1-based and must be between 1 and RS_NumBands(raster). It returns null if the bandIndex is out of range or the raster is null.

SQL Example

SELECT RS_BandAsArray(raster, 1) FROM raster_table

Output:

+--------------------+
|                band|
+--------------------+
|[0.0, 0.0, 0.0, 0...|
+--------------------+