Skip to main content
Returns an empty raster geometry. Every band in the raster is initialized to 0.0.

Signatures

Parameters

Integer
required
The number of bands in the raster. If not specified, the raster will have a single band.
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'.
Integer
required
The width of the raster in pixels.
Integer
required
The height of the raster in pixels.
Double
required
The X coordinate of the upper left corner of the raster, in terms of the CRS units.
Double
required
The Y coordinate of the upper left corner of the raster, in terms of the CRS units.
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.
Double
required
The scaling factor of the cells on the X axis.
Double
required
The scaling factor of the cells on the Y axis.
Double
required
The skew of the raster on the X axis, effectively tilting cells in the horizontal direction.
Double
required
The skew of the raster on the Y axis, effectively tilting cells in the vertical direction.
Integer
required
The SRID of the raster. Use 0 for the default Cartesian coordinate system. Use 4326 for WGS84.
For more information about ScaleX, ScaleY, SkewX, SkewY, please refer to the Affine Transformations section.
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.

Return type

The resulting raster.

Examples

With 2 bands

With 2 bands and dataType

With 2 bands, scale, skew, and SRID

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