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

Returns an empty raster geometry. Every band in the raster is initialized to `0.0`.

## Signatures

```sql theme={"system"}
RS_MakeEmptyRaster(numBands: Integer, bandDataType: String = 'D', width: Integer, height: Integer, upperleftX: Double, upperleftY: Double, cellSize: Double)
```

```sql theme={"system"}
RS_MakeEmptyRaster(numBands: Integer, bandDataType: String = 'D', width: Integer, height: Integer, upperleftX: Double, upperleftY: Double, scaleX: Double, scaleY: Double, skewX: Double, skewY: Double, srid: Integer)
```

## Parameters

<ParamField body="numBands" type="Integer" required>
  The number of bands in the raster. If not specified, the raster will have a single band.
</ParamField>

<ParamField body="bandDataType" type="String">
  Optional parameter specifying the data types of all the bands in the created raster. Accepts one of:

  1. `"D"` - 64 bits Double
  2. `"F"` - 32 bits Float
  3. `"I"` - 32 bits signed Integer
  4. `"S"` - 16 bits signed Short
  5. `"US"` - 16 bits unsigned Short
  6. `"B"` - 8 bits unsigned Byte

  Defaults to `'D'`.
</ParamField>

<ParamField body="width" type="Integer" required>
  The width of the raster in pixels.
</ParamField>

<ParamField body="height" type="Integer" required>
  The height of the raster in pixels.
</ParamField>

<ParamField body="upperleftX" type="Double" required>
  The X coordinate of the upper left corner of the raster, in terms of the CRS units.
</ParamField>

<ParamField body="upperleftY" type="Double" required>
  The Y coordinate of the upper left corner of the raster, in terms of the CRS units.
</ParamField>

<ParamField body="cellSize" type="Double" required>
  The size of the cells in the raster, in terms of the CRS units. Used with the first signature, which defaults to the Cartesian coordinate system.
</ParamField>

<ParamField body="scaleX" type="Double" required>
  The scaling factor of the cells on the X axis.
</ParamField>

<ParamField body="scaleY" type="Double" required>
  The scaling factor of the cells on the Y axis.
</ParamField>

<ParamField body="skewX" type="Double" required>
  The skew of the raster on the X axis, effectively tilting cells in the horizontal direction.
</ParamField>

<ParamField body="skewY" type="Double" required>
  The skew of the raster on the Y axis, effectively tilting cells in the vertical direction.
</ParamField>

<ParamField body="srid" type="Integer" required>
  The SRID of the raster. Use `0` for the default Cartesian coordinate system. Use `4326` for WGS84.
</ParamField>

For more information about ScaleX, ScaleY, SkewX, SkewY, please refer to the [Affine Transformations](/reference/wherobots-db/raster-data/raster-affine-transformation) section.

<Note>
  If any other value than the accepted values for the bandDataType is provided, RS\_MakeEmptyRaster defaults to double as the data type for the raster.
</Note>

## Return type

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

## Examples

### With 2 bands

```sql theme={"system"}
SELECT RS_MakeEmptyRaster(2, 10, 10, 0.0, 0.0, 1.0)
```

```
+--------------------------------------------+
|rs_makeemptyraster(2, 10, 10, 0.0, 0.0, 1.0)|
+--------------------------------------------+
|                        GridCoverage2D["g...|
+--------------------------------------------+
```

### With 2 bands and dataType

```sql theme={"system"}
SELECT RS_MakeEmptyRaster(2, 'I', 10, 10, 0.0, 0.0, 1.0) - Create a raster with integer datatype
```

```
+--------------------------------------------+
|rs_makeemptyraster(2, 10, 10, 0.0, 0.0, 1.0)|
+--------------------------------------------+
|                        GridCoverage2D["g...|
+--------------------------------------------+
```

### With 2 bands, scale, skew, and SRID

```sql theme={"system"}
SELECT RS_MakeEmptyRaster(2, 10, 10, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 4326)
```

```
+------------------------------------------------------------------+
|rs_makeemptyraster(2, 10, 10, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 4326)|
+------------------------------------------------------------------+
|                                              GridCoverage2D["g...|
+------------------------------------------------------------------+
```

### With 2 bands, float dataType, scale, skew, and SRID

```sql theme={"system"}
SELECT RS_MakeEmptyRaster(2, 'F', 10, 10, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 4326) - Create a raster with float datatype
```

```
+------------------------------------------------------------------+
|rs_makeemptyraster(2, 10, 10, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 4326)|
+------------------------------------------------------------------+
|                                              GridCoverage2D["g...|
+------------------------------------------------------------------+
```
