All Products
Search
Document Center

ApsaraDB RDS:ST_RasterDrivers

Last Updated:Oct 18, 2024

This topic describes the ST_RasterDrivers function. This function is used to query all drivers that are supported by raster data sources in GanosBase.

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);

Parameters

Parameter

Description

idx

The ID of the driver.

short_name

The abbreviated name of the driver.

long_name

The full name of the driver.

can_read

Valid values:

  • true: The file formats that are supported by the driver can be used in the ST_CreateRast and ST_ImportFrom functions. For more information, see ST_CreateRast and ST_ImportFrom.

  • false: The file formats that are supported by the driver cannot be used in the ST_CreateRast or ST_ImportFrom function. If you use these file formats in the ST_CreateRast or ST_ImportFrom function, errors are reported. For more information, see ST_CreateRast and ST_ImportFrom.

can_export

Valid values:

  • true: The file formats that are supported by the driver can be used in the S​T_ExportTo function. For more information, see ST_ExportTo.

  • false: The file formats that are supported by the driver cannot be used in the S​T_ExportTo function. If you use these file formats in the S​T_ExportTo function, errors are reported. For more information, see ST_ExportTo.

can_asfile

Valid values:

  • true: The file formats that are supported by the driver can be used in the ST_AsDatasetFile function. For more information, see ST_AsDatasetFile.

  • false: The file formats that are supported by the driver cannot be used in the ST_AsDatasetFile function. If you use these file formats in the ST_AsDatasetFile function, errors are reported. For more information, see ST_AsDatasetFile.

create_options

The options that are included in the create_option parameter in the S​T_ExportTo and ST_AsDatasetFile functions. For more information, see ST_ExportTo and ST_AsDatasetFile.

Examples

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

 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' ty
pe='int' description='DEFLATE compression level 1-9' default='1'/>   <Option 
name='WRITE_BOTTOMUP' type='boolean' default='YES'>   </Option>   <Option 
name='WRITE_GDAL_TAGS' type='boolean' default='YES'>   </Opt
ion>   <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>   <Opti
on 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 l
ayer 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 con
figuration file (or content inlined)'/></CreationOptionList>

-- Query all drivers that are supported by the ST_ImportFrom and ST_CreateRast functions. 
select short_name from 
st_rasterdrivers()  
where can_read =true;

-- Query all drivers that are supported by the ST_ExportTo function. 
select short_name from 
st_rasterdrivers()  
where can_export =true;

-- Query all drivers that are supported by the ST_AsDatasetFile function. 
select short_name from 
st_rasterdrivers()  
where can_asfile =true;