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

Returns an array of rasters resulting from the split of the input raster based upon the desired dimensions of the output rasters.

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

## Signatures

```sql theme={"system"}
RS_Tile(raster: Raster, width: Int, height: Int, padWithNoData: Boolean = false, noDataVal: Double = null)
```

## Parameters

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

<ParamField body="width" type="Int" required>
  The width value.
</ParamField>

<ParamField body="height" type="Int" required>
  The height value.
</ParamField>

<ParamField body="padWithNoData" type="Boolean" required default="false">
  The pad with no data value.
</ParamField>

<ParamField body="noDataVal" type="Double" required default="null">
  The no data val value.
</ParamField>

## Return type

<ResponseField type="Array<Raster>">
  The resulting raster.
</ResponseField>

## Examples

```sql theme={"system"}
WITH raster_table AS (SELECT RS_MakeEmptyRaster(1, 6, 6, 300, 400, 10) rast)
SELECT RS_Tile(rast, 2, 2) AS tiles FROM raster_table
```

```
+--------------------+
|               tiles|
+--------------------+
|[GridCoverage2D["...|
+--------------------+
```

User can use `EXPLODE` function to expand the array of tiles into a table of tiles.

```sql theme={"system"}
WITH raster_table AS (SELECT RS_MakeEmptyRaster(1, 6, 6, 300, 400, 10) rast)
SELECT EXPLODE(RS_Tile(rast, 2, 2)) AS tile FROM raster_table
```

```
+--------------------+
|                tile|
+--------------------+
|GridCoverage2D["g...|
|GridCoverage2D["g...|
|GridCoverage2D["g...|
|GridCoverage2D["g...|
|GridCoverage2D["g...|
|GridCoverage2D["g...|
|GridCoverage2D["g...|
|GridCoverage2D["g...|
|GridCoverage2D["g...|
+--------------------+
```
