This function creates a raster object based on Alibaba Cloud OSS.


raster ST_CreateRast(cstring url);


Parameter Description
url The path of OSS raster files.


The path of OSS files is in the following format: oss://access_id:secrect_key@endpoint/path_to/file. The parameter endpoint can be omitted, and the system will automatically find the corresponding endpoint. If the endpoint is omitted, the path must start with the forward slash (/).

The endpoint is the address used to access OSS from the intranet. To ensure that data is imported at the fastest speed, make sure that the ApsaraDB RDS for PostgreSQL instance is in the same region as the OSS bucket. For more information, see Endpoints.


-- Specify the AccessKey ID, AccessKey Secret, and endpoint.
Select ST_CreateRast('OSS://');

-- Specify the AccessKey ID and AccessKey Secret.
Select ST_CreateRast('OSS://ABCDEFG:1234567890@/mybucket/data/4.tif');

-- Specify the URL in https format. AccessKey-based access has better performance than URL-based access.
Select ST_CreateRast('');