CARIS HPD : HPD Server API : FOID Conversion Functions : FoidStringToNumber
 

FoidStringToNumber

Converts a FOID as a display string to the internal FOID number format.

The foid string is displayed with leading zeros (e.g. "1C 0000000002 00001"), but the leading zeros may be omitted when calling this function (e.g. "1C 2 1"). The string must have exactly two spaces separating the three parts of the FOID in order to be parsed successfully.

Input

Parameter

Type

Description

v_foid

VARCHAR2

The feature object identifier (FOID) as a display string.

Output

Type

Description

INTEGER

The feature object identifier (FOID) as a number.

Examples

column n format 9999999999999999999

select FoidStringToNumber('1C 0000000240 00001') n from dual;

 

 

                   N

--------------------

2025493936704848112

select FoidNumberToString(foid1), FoidNumberToString(foid2), relation, time_start, time_end

from SOURCE_RELATION_VW

where foid1 = FoidStringToNumber('1C 2 1') or foid1 = FoidStringToNumber('1C 0000000240 00001');

Exceptions

Input string is too large to be a FOID.

Input string must have two spaces.

Input string must have no more than two spaces.

ID number is not a number.

Subdivision is not a number.

Input string has an unknown agency code 'AGENCY CODE'.

Input Subdivision ID 'SUBDIVISION ID' must be a positive number and fit into 2 bytes.

Input ID number 'ID NUMBER' must be a positive number and fit into 4 bytes.