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

Returns the centroid (point geometry) of the specified pixel's area.
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_PixelAsCentroid/RS_PixelAsCentroid.svg?fit=max&auto=format&n=AayJA2u8CknIeTgt&q=85&s=2eb78cee3cd903a052a5ff939fbea3a7" alt="RS_PixelAsCentroid" width="700" height="360" data-path="images/sql-functions/RS_PixelAsCentroid/RS_PixelAsCentroid.svg" />

## Signatures

```sql theme={"system"}
RS_PixelAsCentroid(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_PixelAsCentroid(RS_MakeEmptyRaster(1, 12, 13, 134, -53, 9), 3, 3))
```

```
POINT (156.5 -75.5)
```
