The NITF text header (sarpy.io.general.nitf_elements.text)

The text extension subheader definitions.

class sarpy.io.general.nitf_elements.text.TextSegmentHeader(**kwargs)

Bases: NITFElement

Text Segment Subheader for NITF version 2.1 - see standards document Joint BIIF Profile (JBP) for more information.

TE: str

File part type. Takes values in {'TE'}. Default value is TE.

Type:

str

TEXTID: str

Text Identifier. This field shall contain a valid alphanumeric identification code associated with the text item. The valid codes are determined by the application.

Type:

str

TXTALVL: int

Text Attachment Level. This field shall contain a valid value that indicates the attachment level of the text. Default value is 0.

Type:

int

TXTDT: str

Text Date and Time. This field shall contain the time (UTC) of origination of the text in the format YYYYMMDDhhmmss

Type:

str

TXTITL: str

Text Title. This field shall contain the title of the text item.

Type:

str

Security: NITFSecurityTags

The security tags.

Type:

NITFSecurityTags

ENCRYP: str

Encryption. Takes values in {'0'}. Default value is 0.

Type:

str

TXTFMT: str

Text Format. This field shall contain a valid three character code indicating the format or type of text data. Valid codes are MTF to indicate USMTF (Refer to MIL-STD-6040 for examples of the USMTF format), STA to indicate BCS, UT1 to indicate ECS text formatting, and U8S to indicate U8S text formatting. Takes values in {'', 'UT1', 'MTF', 'U8S', 'STA'}.

Type:

str

UserHeader: UserHeaderType

User defined header.

Type:

UserHeaderType

classmethod from_bytes(value, start)
Parameters:
  • value (bytes|str) – the header string to scrape

  • start (int) – the beginning location in the string

get_bytes_length()

Get the length of the serialized bytes array

Return type:

int

classmethod minimum_length()

The minimum size in bytes that takes to write this header element.

Return type:

int

to_bytes()

Write the object to a properly packed str.

Return type:

bytes

to_json()

Serialize element to a json representation. This is intended to allow a simple presentation of the element.

Return type:

dict

class sarpy.io.general.nitf_elements.text.TextSegmentHeader0(**kwargs)

Bases: NITFElement

Text Segment Subheader for NITF version 2.0 - see standards document MIL-STD-2500A for more information.

TE: str

File part type. Takes values in {'TE'}. Default value is TE.

Type:

str

TEXTID: str

Text Identifier. This field shall contain a valid alphanumeric identification code associated with the text item. The valid codes are determined by the application.

Type:

str

TXTDT: str

Text Date and Time. This field shall contain the time (UTC) of origination of the text in the format YYYYMMDDhhmmss

Type:

str

TXTITL: str

Text Title. This field shall contain the title of the text item.

Type:

str

Security: NITFSecurityTags0

The security tags.

Type:

NITFSecurityTags0

ENCRYP: str

Encryption. Takes values in {'0'}. Default value is 0.

Type:

str

TXTFMT: str

Text Format. This field shall contain a valid three character code indicating the format or type of text data. Valid codes are MTF to indicate USMTF (Refer to MIL-STD-6040 for examples of the USMTF format), STA to indicate BCS, UT1 to indicate ECS text formatting, and U8S to indicate U8S text formatting.

Type:

str

UserHeader: UserHeaderType

User defined header.

Type:

UserHeaderType

classmethod from_bytes(value, start)
Parameters:
  • value (bytes|str) – the header string to scrape

  • start (int) – the beginning location in the string

get_bytes_length()

Get the length of the serialized bytes array

Return type:

int

classmethod minimum_length()

The minimum size in bytes that takes to write this header element.

Return type:

int

to_bytes()

Write the object to a properly packed str.

Return type:

bytes

to_json()

Serialize element to a json representation. This is intended to allow a simple presentation of the element.

Return type:

dict