CARIS Batch Utility : Compose Processes : Reassign S57 FOIDs
 

Reassign S57 FOIDs

Description

The ReassignS57FOIDs process reassigns the feature object IDs (FOIDs) of all features in an S-57 file.

This process is run on a base S-57 file with no existing feature object ID lookup table.The original FOIDs are listed and cross-referenced to new FOIDs in the FOID lookup table. Then the process is run again for an S-57 update using the FOID lookup table that was created by the first run as input. This is required because a base and update S-57 file may contain the same FOIDs and if a common FOID is modified in the base it must be assigned the same value in the update.

Inputs

An S-57 file that may be a base (000) or update (001, 002, etc.) file.

Outputs

An S-57 file that may be a base (000) or update file (001, 002, etc) with an extension that matches the input S-57 file.

Command Line Syntax

carisbatch --run ReassignS57FOIDs [options] input output

Options

This table describes the parameters for this process.

Parameter

Long

Short

Description

Can Repeat

Notes

IHOAgencyCode

a

Common Options

FALSE

This must be specified explicitly.

IHOAgencyCodeFile

A

Common Options

FALSE

This must be specified explicitly.

UniqueFOIDFile

U

Common Options

FALSE

FOIDLookupTableFile

F

The path to the feature object ID lookup table file. This can be a new or existing file.

The original FOIDs are listed and cross-referenced to new FOIDs. If the file does not exist, it is created by the process. If the file already exists, it is updated by the process and its content is used to reassign FOIDs.

FALSE

This must be specified explicitly.

Example

To use this command refer to the following example

Example

Objective

You want to reassign all feature object IDs in an S-57 file.

Description

Command Line Syntax

The IHO agency code is DE.

--iho-agency-code DE

The IHO agency code file is named agencies.txt and is located in c:\system\.

-iho-agency-code-file C:\system\agencies.txt

The unique FOID file is named uniqueid.txt and is located in c:\system.

--unique-foid-file C:\system\uniqueid.txt

The FOID lookup table is named foidlookuptable.txt and is located in d:\output\.

--foid-lookup-table-file D:\output\foidlookuptable.txt

The input file is named gb4x0000.007 and is located in D:\input\

D:\input\gb4x0000.007

The output file is named gb4x0000.007 and is located in D:\output\.

D:\output\gb4x0000.007

Command Line

carisbatch --run ReassignS57FOIDs --iho-agency-code DE --iho-agency-code-file C:\system\agencies.txt --unique-foid-file C:\system\uniqueid.txt --foid-lookup-table-file D:\output\foidlookuptable.txt D:\input\gb4x0000.007

Outcome

The FOIDs are reassigned, the lookup table is created or updated, and the unique ID file is updated.

Extra Notes

N/A