Visualize raster results
Sedona offers some APIs to aid in easy visualization of raster results.
Visualize rasters as images¶
SELECT RS_AsBase64(rast) FROM rasterDf
The RS_AsImage returns an HTML img tag, that can be visualized using an HTML viewer or in Jupyter Notebook. For more information please click at the link.
SELECT RS_AsImage(rast, 500) FROM rasterDf
The output looks like:
Rasters can also be visualized as a 2-D matrix where each value in the matrix corresponds to the value in the cell at the corresponding grid coordinate
SELECT RS_AsMatrix(rast) FROM rasterDf
Output will as follows:
| 1 3 4 0| | 2 9 10 11| | 3 4 5 6|
Please refer to Raster visualizer docs for more details on how to make most of the raster visualization in SedonaSQL.