All Products
Search
Document Center

ApsaraDB RDS:ST_RasterDrivers

Last Updated:Mar 28, 2026

Queries all raster drivers supported by GanosBase. Use this function to check which file formats are compatible with read, export, and file conversion operations before calling ST_CreateRast, ST_ImportFrom, ST_ExportTo, or ST_AsDatasetFile.

Syntax

setof record ST_RasterDrivers(
    out idx            integer,
    out short_name     text,
    out long_name      text,
    out can_read       boolean,
    out can_export     boolean,
    out can_asfile     boolean,
    out create_options text
);

Output parameters

ParameterTypeDescription
idxintegerThe driver ID.
short_nametextThe abbreviated driver name.
long_nametextThe full driver name.
can_readbooleantrue: the driver's file formats are supported by ST_CreateRast and ST_ImportFrom. false: using these formats in ST_CreateRast or ST_ImportFrom returns an error.
can_exportbooleantrue: the driver's file formats are supported by ST_ExportTo. false: using these formats in ST_ExportTo returns an error.
can_asfilebooleantrue: the driver's file formats are supported by ST_AsDatasetFile. false: using these formats in ST_AsDatasetFile returns an error.
create_optionstextXML string listing the options available for the create_option parameter in ST_ExportTo and ST_AsDatasetFile.

Examples

Query a specific driver

-- Query information about the netCDF driver
SELECT *
FROM st_rasterdrivers()
WHERE short_name = 'netCDF';

Output:

 idx | short_name |         long_name          | can_read | can_export | can_asfile | create_options
-----+------------+----------------------------+----------+------------+------------+----------------
  36 | netCDF     | Network Common Data Format | t        | t          | t          | <CreationOptionList>
  <Option name='FORMAT' type='string-select' default='NC'>
    <Value>NC</Value>
    <Value>NC2</Value>
    <Value>NC4</Value>
    <Value>NC4C</Value>
  </Option>
  <Option name='COMPRESS' type='string-select' default='NONE'>
    <Value>NONE</Value>
    <Value>DEFLATE</Value>
  </Option>
  <Option name='ZLEVEL' type='int' description='DEFLATE compression level 1-9' default='1'/>
  <Option name='WRITE_BOTTOMUP' type='boolean' default='YES'/>
  <Option name='WRITE_GDAL_TAGS' type='boolean' default='YES'/>
  <Option name='WRITE_LONLAT' type='string-select'>
    <Value>YES</Value>
    <Value>NO</Value>
    <Value>IF_NEEDED</Value>
  </Option>
  <Option name='TYPE_LONLAT' type='string-select'>
    <Value>float</Value>
    <Value>double</Value>
  </Option>
  <Option name='PIXELTYPE' type='string-select' description='only used in Create()'>
    <Value>DEFAULT</Value>
    <Value>SIGNEDBYTE</Value>
  </Option>
  <Option name='CHUNKING' type='boolean' default='YES' description='define chunking when creating netcdf4 file'/>
  <Option name='MULTIPLE_LAYERS' type='string-select' description='Behaviour regarding multiple vector layer creation' default='NO'>
    <Value>NO</Value>
    <Value>SEPARATE_FILES</Value>
    <Value>SEPARATE_GROUPS</Value>
  </Option>
  <Option name='CONFIG_FILE' type='string' description='Path to a XML configuration file (or content inlined)'/>
</CreationOptionList>

Find drivers compatible with a specific operation

-- Drivers supported by ST_ImportFrom and ST_CreateRast
SELECT short_name
FROM st_rasterdrivers()
WHERE can_read = true;

-- Drivers supported by ST_ExportTo
SELECT short_name
FROM st_rasterdrivers()
WHERE can_export = true;

-- Drivers supported by ST_AsDatasetFile
SELECT short_name
FROM st_rasterdrivers()
WHERE can_asfile = true;