Validates the OSGB format of an oblique photography object stored in Object Storage Service (OSS), reporting missing files and file errors.
Syntax
record ST_ValidateOSGB(cstring url, cstring options default '{}', out valid boolean, out reason text);Parameters
| Parameter | Description |
|---|---|
url | The OSS path of the oblique photography project. |
options | Options in JSON format. Default value: {}. See Options. |
Options
| Option | Type | Description | Default | Example |
|---|---|---|---|---|
parallel | Integer | The degree of parallelism (DOP). Higher values accelerate validation but consume more memory. Set to a value less than 16. Values less than 1 are ignored. | 1 | 16 |
exclude | String | A string matched against file paths to exclude matching files. | — | Tile_A (excludes OSGB files with Tile_A in the path) |
include | String | A string matched against file paths to include only matching files. | — | Tile_B (includes only OSGB files with Tile_B in the path) |
Return values
| Field | Type | Description |
|---|---|---|
valid | boolean | Indicates whether the OSGB format is valid. |
reason | text | The reason the OSGB format is invalid. Returns NULL if the format is valid. |
Usage notes
ST_ValidateOSGB checks the OSGB structure of an oblique photography project stored in OSS and reports missing files and file errors. Use this function in scenarios that require high data integrity or to troubleshoot fatal errors before data import.
To import OSGB files from OSS into your database, use ST_ImportOSGB.
Examples
Basic validation
SELECT ST_ValidateOSGB('OSS://<ak>:<ak_secret>@oss-cn-beijing-internal.aliyuncs.com/mybucket/path_to_oblique_project/');Output:
f | Missing or error file(s): +
| /Data/Tile_+006_+004/Tile_+006_+004_L19_000000t3.osgb +
| /Data/Tile_+006_+004/Tile_+006_+004_L20_0000130t3.osgb+
| /Data/Tile_+006_+004/Tile_+006_+004_L21_00001110.osgb +Validation with parallelism
SELECT ST_ValidateOSGB('OSS://<ak>:<ak_secret>@oss-cn-beijing-internal.aliyuncs.com/mybucket/path_to_oblique_project/', '{"parallel": 4}');Output:
f | Missing or error file(s): +
| /Data/Tile_+006_+004/Tile_+006_+004_L19_000000t3.osgb +
| /Data/Tile_+006_+004/Tile_+006_+004_L20_0000130t3.osgb+
| /Data/Tile_+006_+004/Tile_+006_+004_L21_00001110.osgb +