CARIS Batch Utility : Compose Processes : Modify S-57 Header
 

Modify S-57 Header

Description

The ModifyS57Header process modifies the header information of an S-57 file.

Currently some fields in the DSID (data set identification) and DSPM (dataset parameters) sections of the header may be modified by this process.

The option names (IntendedUsage, DatasetName, etc.) match sub-field names in the DSID or DSPM sections of the header with three exceptions. The IHOAgencyCode option is for the ProducingAgency sub-field in the DSID section of the header. The DSIDComment option is for the Comment sub-field in the DSID section of the header. The DSPMComment option is for the Comment sub-field in the DSPM section of the header.

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 ModifyS57Header [options] input output

User Interface Command

None.

Options

This table describes the parameters for this process.

Parameter

Long

Short

Description

Can Repeat

Notes

IntendedUsage

A number specifying the new intended usage.

This is the INTU sub-field in the DSID section of the S-57 header

FALSE

DatasetName

n

A string specifying the new dataset name.

This is the DSNM sub-field in the DSID section of the S-57 header.

FALSE

Optional.

EditionNumber

e

A number specifying the new edition number.

The valid range is 1 to 999.

This is the EDTN sub-field in the DSID section of the S-57 header.

FALSE

Optional.

UpdateNumber

U

A number specifying the new update number.

The valid range is 0 to 999.

This is the UPDN sub-field in the DSID section of the S-57 header.

FALSE

Optional.

IssueDate

d

A string specifying the new issue date.

Dates are specified in the standard ISO 8601 extended format for batch processes, which is YYYY-MM-DD or YYYY-DDD. See ISO 8601 documentation for more information.

This is the ISDT sub-field in the DSID section of the S-57 header.

FALSE

Optional.

ProductSpecification

p

A number specifying the new product specification.

The valid range is 1 to 2.

This is the PRSP sub-field in the DSID section of the S-57 header.

FALSE

Optional.

IHOAgencyCode

a

The new agency code.

Common Options

This is the AGEN sub-field in the DSID section of the S-57 header.

FALSE

Optional.

IHOAgencyCodeFile

A

Common Options

FALSE

Optional.

DSIDComment

c

A string specifying the new data set identification comment.

This is the COMT sub-field in the DSID section of the S-57 header.

FALSE

Mandatory when IHOAgencyCode is used.

CompilationScale

s

A number specifying the new compilation scale.

This is the CSCL sub-field in the DSPM section of the S-57 header.

FALSE

Optional.

DSPMComment

m

A string specifying the new data set parameter comment.

This is the COMT sub-field in the DSPM section of the S-57 header.

FALSE

Optional.

Example1

Example

Objective

You want to change the IHO agency code in the header of an S-57 file.

Description

Command Line Syntax

The name of the input file is gb4x0000.000 and it is located in D:\inputs\

D:\inputs\gb4x0000.000

The IHO agency code is changed to CA.

--iho-agency-code CA

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

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

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

D:\outputs\gb4x0000.000

Command Line

carisbatch --run ModifyS57Header --iho-agency-code CA --iho-agency-code-file C:\system\agencies.txt D:\inputs\gb4x0000.000 D:\outputs\gb4x0000.000

Outcome

The heading is changed.

Extra Notes

N/A

Example 2

Example

Objective

You want to change the edition number and issue date in the header of an S-57 file.

Description

Command Line Syntax

The edition number is changed to 23.

--edition-number 23

The issue date is changed to 2017-03-27.

--issue-date 2017-03-27

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

D:\inputs\gb4x0000.003

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

D:\outputs\gb4x0000.000

Command Line

carisbatch --run ModifyS57Header --edition-number 23 --issue-date 2017-03-27 D:\inputs\gb4x0000.003 D:\outputs\gb4x0000.003

Outcome

The heading is changed.

Extra Notes

N/A