Skip to content
πŸŽ‰ SedonaDB 0.4.0 is out now! πŸ—ΊοΈ Python DataFrame API, R dplyr, Geography support & GPU-accelerated spatial joins. Read the release blog β†’

RS_AsArcGrid

Introduction: Returns a binary value (byte array) representing an ArcGrid image for each input raster. ArcGrid only supports a single band. If your raster has multiple bands, you need to specify which band to use as the source.

Possible values for sourceBand: any non-negative value (>=0). If not given, it will use Band 0.

Format:

RS_AsArcGrid(raster: Raster)

RS_AsArcGrid(raster: Raster, sourceBand: Integer)

Return type: Binary

Since: v1.4.1

SQL Example

SELECT RS_AsArcGrid(raster) FROM my_raster_table

SQL Example

SELECT RS_AsArcGrid(raster, 1) FROM my_raster_table

Output:

+--------------------+
|             arcgrid|
+--------------------+
|[4D 4D 00 2A 00 0...|
+--------------------+

Output schema:

root
 |-- arcgrid: binary (nullable = true)