Writer Directives

The directives listed below are processed by the SEF writer. The suffixes shown are prefixed by the current <WriterKeyword> in a mapping file. By default, the <WriterKeyword> for the SEF writer is SEF.

DATASET

Required/Optional: Required

A SEF file consists of an ASCII output file, with a .sef extension. The value for this keyword is the SEF file to be written. A typical mapping file fragment specifying an output SEF dataset looks like:

SEF_DATASET /usr/data/Sef/output.sef

Workbench Parameter: Destination FRAMME (SEF) File

DEF

Required/Optional: Required

Each SEF Feature type must be defined before it can be written. The definition specifies the base name of the file, and the names and the types of all attributes. Note that only user-defined attributes are required. The syntax of a SEF DEF line is:

<WriterKeyword>_DEF <baseName> \
	[<attrName> <attrType>]+ \
	[<componentName>:<attrName> <attrType>]+

The following table shows the attribute types supported.

Field Type

Description

char(<width>)

Character fields store fixed length strings. The width parameter controls the maximum number of characters that can be stored by the field. No padding is required for strings shorter than this width.

date

Date fields store date as character string with the format YYYYMMDD.

number(<width>,<decimals>)

Number fields store single and double precision floating point values. The width parameter is the total number of characters allocated to the field, including the decimal point. The decimals parameter controls the precision of the data and is the number of digits to the right of the decimal.

float

Float fields store floating point values. There is no ability to specify the precision and width of the field.

integer

Integer fields store 32-bit signed integers.

smallint

Small integer fields store 16-bit signed integers and therefore have a range of -32767 to +32767.

logical

Logical fields store TRUE/FALSE data. Data read or written from and to such fields must always have a value of either true or false.

Here’s an example feature with two nongraphic components: component{0}.streetName is an integer while component{1}.streetName is a string; therefore, on our DEF line, we need to define streetName separately in the <componentName>:<attrName> <attrType> format. However, for all other attributes with no such type conflict, the <attrName> <attrType>] format is used.

FACTORY_DEF * CreationFactory \
	CREATE_AT_END \
	NUMBER_TO_CREATE 1 \
	OUTPUT FEATURE_TYPE feat \
		sef_component{0}.sef_type sef_nongraphic \
		sef_component{0}.sef_lbl street1	\
		sef_component{0}.streetName 6 \
		sef_component{0}.sign stop \
		sef_component{1}.sef_type sef_nongraphic \
		sef_component{1}.sef_lbl street2 \
		sef_component{1}.streetName "Dow St" \	
		sef_component{1}.sign	“no right turn”	

The output DEF line is:

SEF_DEF feat \
street1:streetName integer \
street2:streetName  char(50) \
sign char(50)