This function imports an Object Storage Service (OSS) object to a raster object in AnalyticDB for PostgreSQL.

Syntax

raster ST_ImportFrom(cstring chunkTableName, 
                     cstring url, 
                     cstring storageOption default '{}',
                     cstring importOption default '{}');

Parameters

ParameterDescription
chunkTableNameThe name of the chunk table. The name must comply with the table naming conventions of AnalyticDB for PostgreSQL.
urlThe URL of the imported OSS object. For more information, see the description of the url parameter in ST_CreateRast.

Description

The following table lists the supported raster formats.

FormatFull name
BMPMicrosoft Windows Device Independent Bitmap(.bmp)
EHdrESRI .hdr Labelled
ENVIENVI .hdr Labelled Raster
GTiffTIFF/BigTIFF/GeoTIFF(.tif)
HFAErdas Imagine .img
RSTIdrisi Raster Format
INGRIntergraph Raster Format
NetCDFNetwork Common Data Form
AAIGridArc/Info ASCII Grid
AIGArc/Info Binary Grid
GIFGraphics Interchange Format
PNGPortable Network Graphics (.png)
JPEGJPEG JFIF File Format

Examples

Select ST_ImportFrom('chunk_table','OSS://<ak>:<ak_secret>@oss-cn-beijing-internal.aliyuncs.com/mybucket/data/image.tif');

-- Specify an OSS object that is in NetCDF and contains a subset.
Select ST_ImportFrom('chunk_table','OSS://<ak>:<ak_secret>@oss-cn-beijing-internal.aliyuncs.com/mybucket/data/image.nc:hcc');