> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Visualize Raster Results

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

## Visualize raster images

### Base64 String

The [RS\_AsBase64](/reference/wherobots-db/raster-data/output/RS_AsBase64) encodes the raster data as a Base64 string and can be visualized using [online decoder](https://base64-viewer.onrender.com/).

```sql theme={"system"}
SELECT RS_AsBase64(rast) FROM rasterDf
```

### HTML Image

The [RS\_AsImage](/reference/wherobots-db/raster-data/output/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.

```sql theme={"system"}
SELECT RS_AsImage(rast, 500) FROM rasterDf
```

The output looks like this:

<Frame>
  <img src="https://mintcdn.com/wherobots/GrWfTlqud5HZFYRl/images/image/DisplayImage.png?fit=max&auto=format&n=GrWfTlqud5HZFYRl&q=85&s=8f27a0ab5e36c07f41a5863ce844769e" alt="Output" width="1110" height="345" data-path="images/image/DisplayImage.png" />
</Frame>

### 2-D Matrix

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

```sql theme={"system"}
SELECT RS_AsMatrix(rast) FROM rasterDf
```

Output will be as follows:

```sql theme={"system"}
| 1   3   4   0|
| 2   9  10  11|
| 3   4   5   6|
```

Please refer to the raster output function reference pages ([RS\_AsBase64](/reference/wherobots-db/raster-data/output/RS_AsBase64), [RS\_AsImage](/reference/wherobots-db/raster-data/output/RS_AsImage), [RS\_AsMatrix](/reference/wherobots-db/raster-data/output/RS_AsMatrix)) to learn how to make the most of the visualizing APIs.
