This topic describes the ST_RasterDrivers function. This function is used to query all drivers that are supported by raster data sources in Ganos.
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:
|
can_export | Valid values:
|
can_asfile | Valid values:
|
create_options | The options that are included in the create_option parameter in the ST_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;