> ## 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.

# RS_PixelAsPolygon

Returns a polygon geometry that bounds the specified pixel.
The pixel coordinates specified are 1-indexed.
If `colX` and `rowY` are out of bounds for the raster, they are interpolated assuming the same skew and translate values.

<img src="https://mintcdn.com/wherobots/AayJA2u8CknIeTgt/images/sql-functions/RS_PixelAsPolygon/RS_PixelAsPolygon.svg?fit=max&auto=format&n=AayJA2u8CknIeTgt&q=85&s=eb72824817810e3f7c0096cfcb6150bd" alt="RS_PixelAsPolygon" width="700" height="390" data-path="images/sql-functions/RS_PixelAsPolygon/RS_PixelAsPolygon.svg" />

## Signatures

```sql theme={"system"}
RS_PixelAsPolygon(raster: Raster, colX: Integer, rowY: Integer)
```

## Parameters

<ParamField body="raster" type="Raster" required>
  The input raster.
</ParamField>

<ParamField body="colX" type="Integer" required>
  The col x value.
</ParamField>

<ParamField body="rowY" type="Integer" required>
  The row y value.
</ParamField>

## Return type

<ResponseField type="Geometry">
  The resulting geometry.
</ResponseField>

## Example

```sql theme={"system"}
SELECT ST_AsText(RS_PixelAsPolygon(RS_MakeEmptyRaster(1, 5, 10, 123, -230, 8), 2, 3))
```

```
POLYGON ((131 -246, 139 -246, 139 -254, 131 -254, 131 -246))
```
