Writer Directives
The directives that are processed by the SDF3 writer are listed below. The suffixes shown are prefixed by the writer keyword in a mapping file. By default, the <WriterKeyword> for the SDF3 writer is SDF3.
DATASET
Required/Optional: Required
The value for this keyword is the name of the output SDF3 file. If an existing file is specified, that file will be overwritten unless otherwise specified by the OVERWRITE_FILE directive. A typical mapping file fragment specifying an output SDF3 dataset looks like:
SDF3_DATASET /tmp/data.sdf
Workbench Parameter: Destination Autodesk MapGuide Enterprise SDF File
DEF
Required/Optional: Required
The SDF3 writer uses DEF lines to define feature types in the output file. A typical mapping file fragment specifying an output feature type looks like:
SDF3_DEF <featureName> \ [fdo_index_column <fdo_index_column>] \ [fdo_writer_mode <fdo_writer_mode>] \ [fdo_geometry_column <fdo_geometry_column>] \ [fdo_overwrite_table <fdo_overwrite_table>] \ [<attributeName> <attributeType>[,<indexType>]]*
The configuration parameters present on the definition line are described in the following table:
Parameter |
Contents |
featureName |
This declares the name of the feature type to be written. |
fdo_index_column |
This specifies the name of the default index attribute that is added to the feature type if no user attribute is specified with an IDENTITY index type. Default: PRIMARYINDEX |
fdo_writer_mode |
This specifies the feature type level writer mode settings. Valid values are INSERT, UPDATE, DELETE, and INHERIT_FROM_WRITER. Note that INSERT mode allows for only INSERT operations where as UPDATE and DELETE can be overwritten at the feature levels. INHERIT_FROM_WRITER simply indicates to take this value from the writer level and not to override it at the feature type level. Default: INHERIT_FROM_WRITER |
fdo_geometry_column |
This specifies the name of the geometry attribute that will hold the geometry when creating a new feature type in the output file. Default: Geometry |
fdo_overwrite_table |
This specifies the action to be taken if a feature type already exists in the output file with the name specified by featureName. Valid values are YES, NO, and TRUNCATE. Default: NO |
attributeName |
This declares the name of the attribute. The maximum length of attribute names is 100 characters. |
attributeType |
This declares the type of the data property. The valid values are listed below: boolean datetime decimal(width, precision) int16 int32 int64 byte single double char(width) blob(width) clob(width) |
indexType |
The valid values are listed below: IDENTITY Attributes with an IDENTITY index type must uniquely identify the feature within the feature type: features with non-unique values for IDENTITY attributes cannot be inserted into the output SDF3 file. If multiple attributes are declared with an IDENTITY index type, then those multiple attribute form a composite identity key. |
OVERWRITE_FILE
Required/Optional: Optional
This directive specifies whether the output file should be overwritten, if it exists. If this directive is set to NO, then the SDF3 writer will append the new features to the dataset.
The default value for this directive is NO.
SDF3_OVERWRITE_FILE NO
Workbench Parameter: Overwrite File
WRITER_MODE
Required/Optional: Optional
Note: For more information on this directive, see the chapter Database Writer Mode.
This directive specifies the operations that will be performed by default by this writer. The operations are INSERT, UPDATE, or DELETE.
The default writer-level value for this operation can be overwritten at the feature type level. The corresponding feature type DEF parameter name is called WRITER_MODE
. It has the same valid options as the writer-level mode, as well as the value INHERIT_FROM_WRITER, which causes the writer-level mode to be inherited by the feature type as the default for features written to that feature type.
This operation can also be set for individual features, using the fme_db_operation attribute. Note that when WRITER_MODE is set to INSERT, all features are inserted unless otherwise set for UPDATE or DELETE.
Note: If UPDATE or DELETE modes are specified as described above, the fme_where attribute is required to identify the rows in the table to be updated or deleted, respectively. This attribute should not contain the identifier where.
fme_where PRIMARYINDEX=100
Note: For the SDF3 writer, only the primary index column can be used in the where clause with numeric comparison expressions that evaluate to true or false.
If the WRITER_MODE
directive is not specified, then a value of INSERT is given.
SDF3_WRITER_MODE INSERT
Workbench Parameter: Writer Mode
REMOVE_SCHEMA_QUALIFIER
Required/Optional: Optional
The value for this keyword is either yes or no. A value of yes indicates that the feature type name in FME should not contain the schema name prefix before the table name. The default value of no indicates the table name will contain the schema prefix separated by a period.
SDF3_REMOVE_SCHEMA_QUALIFIER NO
SDF3_DEF default.mytable
or
SDF3_REMOVE_SCHEMA_QUALIFIER YES
SDF3_DEF mytable
XY_TOLERANCE
Required/Optional: Optional
This directive specifies the X/Y-axis tolerance values for the output SDF3 file. Valid values are floating-point numbers. The tolerances are in distance units that depend on the coordinate system.
The default value is 0.0.
SDF3_XY_TOLERANCE 0.0
Workbench Parameter: X/Y Tolerance
Z_TOLERANCE
Required/Optional: Optional
This directive specifies the Z-axis tolerance values for the output SDF3 file. Valid values are floating-point numbers. The tolerances are in distance units that depend on the coordinate system.
The default value is 0.0.
SDF3_Z_TOLERANCE 0.0
Workbench Parameter: Z Tolerance