All Products
Search
Document Center

PolarDB:ST_ValidateOSGB

Last Updated:Mar 28, 2026

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

ParameterDescription
urlThe OSS path of the oblique photography project.
optionsOptions in JSON format. Default value: {}. See Options.

Options

OptionTypeDescriptionDefaultExample
parallelIntegerThe 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.116
excludeStringA string matched against file paths to exclude matching files.Tile_A (excludes OSGB files with Tile_A in the path)
includeStringA string matched against file paths to include only matching files.Tile_B (includes only OSGB files with Tile_B in the path)

Return values

FieldTypeDescription
validbooleanIndicates whether the OSGB format is valid.
reasontextThe 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 +