文档

ST_RasterDrivers

更新时间:

获得所有Ganos Raster支持的数据源驱动列表。

语法

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

参数

参数名称

描述

idx

驱动序号。

short_name

驱动名称缩写。

long_name

驱动名称全称。

can_read

返回值:

can_export

返回值:

  • true:表示文件类型可以在ST_ExportTo函数中使用。

  • false:表示文件类型在ST_ExportTo函数中使用会报错。

can_asfile

返回值:

create_options

可以使用在ST_ExportToST_AsDatasetFile时创建参数。

示例

-- 查询netCDF驱动相关信息。
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>

-- 查询所有 ST_ImportFrom和ST_CreateRast支持的驱动名称。
select short_name from 
st_rasterdrivers()  
where can_read =true;

-- 查询所有 ST_ExportTo 支持的驱动名称。
select short_name from 
st_rasterdrivers()  
where can_export =true;

-- 查询所有 ST_AsDatasetFile 支持的驱动名称。
select short_name from 
st_rasterdrivers()  
where can_asfile =true;
  • 本页导读 (1)
文档反馈