All Products
Search
Document Center

PolarDB:ST_ValidateOSGB

Last Updated:Apr 23, 2024

This topic describes the ST_ValidateOSGB function. This function validates the OSGB format of an oblique photography object that is stored in Object Storage Service (OSS).

Syntax

record ST_ValidateOSGB(cstring url, cstring options default '{}', out valid boolean, out reason text);

Return values

Return value

Description

valid

Indicates whether the OSGB format of the oblique photography object stored in OSS is valid.

reason

The reason why the OSGB format of the oblique photography object stored in OSS is invalid. If the format is valid, the value NULL is returned.

Parameters

Parameter

Description

url

The path of the file in OSS.

options

The options in JSON strings. For more information, see Options.

Usage notes

This function validates the OSGB format of an oblique photography object stored in OSS. This function checks and reports OSGB files that are lost and errors that occur in OSGB files. This function is used in scenarios that require high data integrity or used to troubleshoot files in which fatal errors occur during data import.

You can use the ST_ImportOSGB function to import OSGB files stored in OSS to your database. For more information about the function, see ST_ImportOSGB.

The following table describes the options that you can configure for the options parameter.

Option

Type

Description

Default value

Example

parallel

Integer

The degree of parallelism (DOP). If you increase the parallelism, data import is accelerated, but may consume a large amount of memory. You can specify an appropriate value based on the actual data or the running status of the database.

We recommend that you set this option to a value less than 16. If the value of this option is less than 1, this option is ignored.

1

16

exclude

String

The string in the file path of excluded files.

-

Tile_A (OSGB files with Tile_A in the file path are excluded).

include

String

The string in the file path of included files.

-

Tile_B (Only OSGB files with Tile_B in the file path are included).

Examples

SELECT ST_ValidateOSGB('OSS://<ak>:<ak_secret>@oss-cn-beijing-internal.aliyuncs.com/mybucket/path_to_oblique_project/');

---------
 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 +

Parallel

SELECT ST_ValidateOSGB('OSS://<ak>:<ak_secret>@oss-cn-beijing-internal.aliyuncs.com/mybucket/path_to_oblique_project/', '{"parallel": 4}');

---------
 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 +