This topic describes how to configure the ST_ImportFrom function. You can use the ST_ImportFrom function to transfer an Object Storage Service (OSS) file to a raster object in Apsara PolarDB.
Syntax
raster ST_ImportFrom(cstring chunkTableName, cstring url);
Parameters
Parameter | Description |
---|---|
chunkTableName | The name of the chunk table. The name must comply with the table naming conventions of Apsara PolarDB. |
url | The URL of the external OSS object. For more information, see the description of the url parameter in ST_CreateRast. |
Description
The ST_ImportFrom function creates a raster object and imports an external OSS object into the raster object.
The following table lists the supported raster formats.
Format | Full name |
BMP | Microsoft Windows Device Independent Bitmap(.bmp) |
EHdr | ESRI .hdr Labelled |
ENVI | ENVI .hdr Labelled Raster |
GTiff | TIFF/BigTIFF/GeoTIFF(.tif) |
HFA | Erdas Imagine .img |
RST | Idrisi Raster Format |
INGR | Intergraph Raster Format |
netCDF | NetCDF: Network Common Data Form |
AAIGrid | Arc/Info ASCII Grid |
AIG | Arc/Info Binary Grid |
GIF | Graphics Interchange Format |
PNG | Portable Network Graphics |
JPEG | JPEG JFIF File Format |
Example
Select ST_ImportFrom('chunk_table','OSS://ABCDEFG:1234567890@oss-cn.aliyuncs.com/mybucket/data/4.tif');