ST_ImportFrom
Updated at:
Copy as MD
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
| Parameter | Type | Default | Description |
|---|---|---|---|
chunkTableName | cstring | Required | The name of the chunk table. The name must comply with the table naming conventions of AnalyticDB for PostgreSQL. |
url | cstring | Required | The URL of the OSS object to import. For the URL format, see the url parameter in ST_CreateRast. |
storageOption | cstring | '{}' | |
importOption | cstring | '{}' |
Supported formats
ST_ImportFrom supports the following raster formats:
| Format code | 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 | Network Common Data Form |
| AAIGrid | Arc/Info ASCII Grid |
| AIG | Arc/Info Binary Grid |
| GIF | Graphics Interchange Format |
| PNG | Portable Network Graphics (.png) |
| JPEG | JPEG JFIF File Format |
Examples
Import a GeoTIFF file from OSS:
Select ST_ImportFrom('chunk_table','OSS://<ak>:<ak_secret>@oss-cn-beijing-internal.aliyuncs.com/mybucket/data/image.tif');Import a NetCDF file and specify a subset:
-- 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');Is this page helpful?