Writer Directives – GeoMedia Access Warehouse

These directives apply only to GeoMedia Access Warehouses. For other GeoMedia directives, see Writer Directives – GeoMedia SQL Server Warehouse and Writer Directives – all GeoMedia Warehouses.

The directives listed below are prefixed by the current <WriterKeyword> in a mapping file. By default, the <WriterKeyword> for the GeoMedia Warehouse Writer is FM0.

DEF

Required/Optional: Required

Each GeoMedia table must be defined before it is written to. The definition specifies the name of the table, the type of geometry on each row, and the names and types of all attributes.

The syntax of a GeoMedia DEF line is:

<WriterKeyword>_DEF <tableName>	\
	fm0_type fm0_point|fm0_arc|fm0_line|fm0_area|		
fm0_text|fm0_collection|fm0_none \ [fm0_geometry_column <column name>] \
[fm0_primary_index_column <column name>] \
[fm0_drop_table (yes|no)] \
[fm0_truncate_table (yes|no)] \
[<fieldName> <fieldType>]+

When the destination table does not exist, the table definition specifies the table that will be created. When the destination table exists and is not being dropped, the fields and types listed should match those of the existing table.

Fields in the table definition that do not match any existing columns will be ignored by the writer. Where <fieldType> is specified, it should be a field type supported by the target database.

The configuration parameters present on the definition line are described in the following table:

Parameter

Contents

tableName

The name of the table to be written. If a table with the specified name exists, it will be overwritten if the fm0_drop_tableDEF line parameter is set to YES, or it will be truncated if the fm0_truncate_table DEF line parameter is set to YES. Otherwise the table will be appended. Valid values for table names include any character string devoid of SQL-offensive characters and less than 30 characters in length.

fm0_geometry_column

This specifies the name of the column used to store the geometry.

Default:Geometry

fm0_primary_index_column

This specifies the name of the column used to store the default primary index.

Default:PRIMARYINDEX

fm0_drop_table

This specifies that if the table exists by this name, it should be dropped and replaced with a table specified by this definition.

Default: NO

fm0_truncate_table

This specifies that if the table exists by this name, it should be cleared prior to writing.

Default: NO

fieldName

The name of the field to be written. Valid values for field name include any character string devoid of SQL-offensive characters and less than 30 characters in length.

fieldType

See Attribute Types.

OVERWRITE_DATAFILE

Required/Optional: Optional

When writing to a Microsoft Access database, the default action performed depends on the existence of the file or ODBC data source defined in FM0_DATASET. If the file does not exist, a template warehouse is used as a base and the tables and features to be written are appended to it. If the file exists, the tables and features are appended to it. This is the default behavior and is equivalent to setting the OVERWRITE_DATAFILE to NO. Setting this directive to YES means the template warehouse is used regardless of whether or not the data file exists, and anything existing previously in the warehouse named by FM0_DATASET is lost.

Range:YES | NO

Default: NO

CREATE_SPATIAL_INDEX

When creating a new warehouse or overwriting an existing warehouse, native GeoMedia spatial index creation is performed automatically by the FME GeoMedia Access Warehouse Writer as long as the input data comes from a known coordinate system that has a corresponding datum mapping in the autodt.ini file under the GeoMedia install folder. If a spatial index is not desired for the new warehouse, its creation can be turned off by setting this keyword to NO.

When appending to an existing warehouse, creation of spatial index depends on whether the SpatialKeyFieldName property is set for the geometry column and the spatial key column actually exists. If the property is set and the column exists, then a spatial key will be automatically created for the geometry, regardless of the CREATE_SPATIAL_INDEX keyword setting.

Note: When using GeoMedia 5.0 (05.00.23.04) the GeoMedia Hotfix 05.0023.50 must be applied for spatial indexes to be properly created. This applies to both GeoMedia and GeoMedia Professional. The issue is corrected in GeoMedia 5.1. Recall that a valid source coordinate system is still required in all cases.

Example:

FM0_CREATE_SPATIAL_INDEX YES

MODIFICATION_LOG

When writing to a Microsoft Access database, any changes to feature tables or metadata tables are written to ModificationLog and ModifiedTables metadata tables if modification logging is enabled. By default, modification logging is disabled. When writing large number of features, modification logging can add to the size of database.

Example:

FM0_MODIFICATION_LOG NO

MDB_VERSION

This keyword allows you to specify the Microsoft Access file version.

Example:

FM0_MDB_VERSION 2002