The following rules must be observed when adding or accessing metadata (attachments) on any layer:
All attachments must be identified by a type expressed as a four-letter code consisting of ASCII letters, numerals and underscores. These are called meta-types.
The first entry in the four letter code must not be a numeral except in specific cases
Some four-letter codes are reserved and should not be used by plug-ins
Custom/plugin-specific codes must not use uppercase letters
Attachments should be kept small (a few KB at most). If more data is needed, it should be stored in an external file and the reference kept in the attachment.
Accessing Layer Attachments
Layer attachments can be accessed via any FastExternalsTM interface that implements the meta_data parameter and any of meta_query(), meta_read() and meta_write().
Please note that these function pointers can be zero if the interface is not implemented or is disabled by the user. Also note that errors result in zero returns. The plug-in is expected to degrade gracefully in these circumstances.
Reserved meta-types
The following identifiers are reserved but can be used by your plug-in as long as you use them in the prescribed manner (click the link for detailed description):