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

Generates records containing raster tiles 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_TileExplode/RS_TileExplode.svg?fit=max&auto=format&n=AayJA2u8CknIeTgt&q=85&s=580dccdb1ad4554292b058fa56a0a21b" alt="RS_TileExplode" width="820" height="400" data-path="images/sql-functions/RS_TileExplode/RS_TileExplode.svg" />

## Signatures

```sql theme={"system"}
RS_TileExplode(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="Struct<x: Integer, y: Integer, tile: Raster>">
  A struct containing the result fields.
</ResponseField>

## Example

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

```
+---+---+--------------------+
|  x|  y|                tile|
+---+---+--------------------+
|  0|  0|GridCoverage2D["g...|
|  1|  0|GridCoverage2D["g...|
|  2|  0|GridCoverage2D["g...|
|  0|  1|GridCoverage2D["g...|
|  1|  1|GridCoverage2D["g...|
|  2|  1|GridCoverage2D["g...|
|  0|  2|GridCoverage2D["g...|
|  1|  2|GridCoverage2D["g...|
|  2|  2|GridCoverage2D["g...|
+---+---+--------------------+
```
