Skip to content

Visualize raster results

WherobotsDB offers some APIs to aid in easy visualization of raster results.

Visualize raster images

Base64 String

The RS_AsBase64 encodes the raster data as a Base64 string and can be visualized using online decoder.

SELECT RS_AsBase64(rast) FROM rasterDf

HTML Image

The RS_AsImage returns an HTML image tag, that can be visualized using an HTML viewer or in Jupyter Notebook. For more information please click on the link.

SELECT RS_AsImage(rast, 500) FROM rasterDf

The output looks like this:

Output

2-D Matrix

WherobotsDB offers an API to visualize raster data that is not sufficient for the other APIs mentioned above.

SELECT RS_AsMatrix(rast) FROM rasterDf

Output will be as follows:

| 1   3   4   0|
| 2   9  10  11|
| 3   4   5   6|

Please refer to Raster visualizer docs to learn how to make the most of the visualizing APIs.