Directives (Technical Reference)

多稿器在底层映射文件中处理多个指令。运行工作区时,您将看到翻译日志中的条目。例如:

Using MultiWriter with keyword `MULTI_WRITER' to output data

明确指定不同类型的作家时,多写字器配置有这些关键字。这些细节在Workbench Log窗格中可见。

Keyword

Value

MULTI_WRITER_TYPE{key}

Contains the name of the writer to use for features identified by key. Although the key can be any string, it is typically a numeric ID in the range of 0 to N-1, where N is the number of writers being configured.

For applications that require partitioning one dataset into several tiles, the key can be composed of a row,column pair. Although the row and column can be any strings, they are typically numeric, with row in the range of 0 to I-1 and column in the rage of 0 to J-1, where I*J is the number of writers being configured. This configuration is demonstrated in Example 6.

MULTI_WRITER_KEYWORD{key}

包含通过键标识的编写器的关键字查找播放映射文件以获取自己的设置。

It is important to note that the type or types specified by theMULTI_WRITER_KEYWORD在相关线中无效,因为当使用多写器时,目的地是由多写器封装的逻辑数据集。因此,相关线的输出部分必须使用MULTI_WRITER, unless the keyword is explicitly reset using theWRITER_KEYWORDcommand (Example 5 shows how to do this).

When the Multi-Writer is configured to create multiple datasets of the same type, the following keywords are used:

Keyword

Value

multi_writer_type {*}

Contains the type of the writer to use for all the datasets written to the folder specified by the MULTI_WRITER_DATASET keyword. The * is required, and indicates that the same writer type will be used for all datasets.

MULTI_WRITER_DATASET{*}

包含用于命名各个编写器创建的目标数据集的参数化模板。此模板中允许的参数是“”或“”和“”。

MULTI_WRITER_ID_ATTRIBUTE

Specifies an alternative attribute to use instead of multi_writer_id. This can be useful if you are nesting one Multi-Writer inside of another.

MULTI_WRITER_DATASET_ORDER

确定输出数据集的排序。此关键字接受三个值:

BY_ID: The output dataset ordering will be based on the value of the multi_writer_id attribute. If values of all the multi_writer_id attributes are numeric, then they will be ordered numerically; otherwise they will be ordered alphanumerically.For example, if multi_writer_ids are 1,2,3.....10,11,12 then they will be ordered numerically; if the IDs are test1,test2,test3, ....test10,test11, test12 then they will be ordered alphanumerically (and as a result the output ordering will look like test1, test10, test11, test12, test2,....test9).

BY_INPUT: The output dataset ordering will be based on how the datasets were input to the writer. If they were input in certain order, then that order will be maintained during the output.

NONE: The output ordering will be random.

MULTI_WRITER_FIRST_WRITER_ID

The multi_writer_id of the first writer. If the value of MULTI_WRITER_DATASET_ORDER keyword is BY_INPUT or NONE then the writer matching this ID will be forced to write the output immediately without caching the features for better performance.

The MULTI_WRITER_KEYWORD is not specified when the MULTI_WRITER_TYPE{*} is used. In this situation, the Multi-Writer makes the keyword for each individual writer the same as the identifier for that same writer. Thus individual writers will scan the mapping file first for their specific keyword and then for the generic one. For example, the following lines:

WRITER_TYPE MULTI_WRITER MULTI_WRITER_TYPE{*} GIF GIF_DEF BrightGreen GIF_RED 0 GIF_GREEN 255 GIF_BLUE 0 COLOR_3_DEF BrightGreen GIF_RED 160 GIF_GREEN 128 GIF_BLUE 128

result in the first definition ofBrightGreenbeing used by all the individual writers GIF writers except for theCOLOR_3writer, which will use its own.

Note:When the MULTI_WRITER_TYPE{*} mode is used, the Multi-Writer will attempt to create any folders needed for each individual writer.

Theexamplesillustrate these concepts in detail.