Writer Directives – Feature Classes for all Geodatabase Types
This section describes the directives the Geodatabase writer module recognizes when writing to a Feature Class.
Each directive is prefixed by the current <WriterKeyword>_
when it is placed in a mapping file. By default, the <WriterKeyword>
for the Geodatabase writer is the same as the <WriterType>
.
These directives are only relevant when writing to feature classes, and are not used for raster datasets.
Tip: Due to the complexity and capabilities of a Geodatabase, writing features to one can be difficult, particularly when trying to create feature classes. The Personal Geodatabase writer has a mode whereby it will calculate the extents, scales, and grid sizes on your behalf.
Tip: To take advantage of this ability, set the XY_SCALE directive to zero. If a non-zero value for the directive GRID_1 is specified, then the specified value will be used instead of using the grid 1 size calculated by the Personal Geodatabase writer. If no z values are found while calculating the extents, the minimum Z value will be default_Z - 20,000 and the Z scale will be 10,000 . The value for default_Z will be taken from the directive DEFAULT_Z_VALUE. Please note that feature classes that exist before the translation will not have their extents and grid 1 size changed.
Tip: Even when the writer calculates the x,y,z origins, scales and grid 1 size, the DEF lines can override the calculated values by setting the configuration parameter GEODB_XYSCALE to a non-zero value. See GEODB_XY_SCALE for more information. (This functionality is not available when using the Enterprise Geodatabase or File-based Geodatabase writer.)
Note: It is important to understand that the initial values assigned to the writer directives, where possible, come from values in the settings box. The DEF line configuration parameters that correspond to the directives will not be assigned values. This prevents the problem whereby the values for the directives are changed, but never get used because they are overridden by the corresponding DEF line configuration parameters. The DEF line configuration parameters should only be used when the feature classes have differing dimensions (2d or 3d), origins, scales, grid sizes, and measure support.
The directives listed below are used by all Geodatabases.
TRANSACTION_TYPE
Required/Optional: Optional
This statement indicates which transaction mechanism the Geodatabase writer should use. Within ArcGIS, there are currently two transaction mechanisms: edit sessions and (regular) transactions. An edit session corresponds to a long transaction. During an edit session, edits made by other users do not become visible until the edit session is ended. If a translation does not complete successfully and the Geodatabase writer is using an edit session, then all the edits will be discarded.
Values: VERSIONING | EDIT_SESSION | TRANSACTIONS | NONE
- VERSIONING: Starts an edit session and then ends it when the translation is finished. This value should be used when writing to a versioned table in an Enterprise Geodatabase.
- EDIT_SESSION: Starts an edit session and then ends it when the translation is finished. This value should be used when edits are made to tables that have custom behavior associated with them. This value corresponds to non-versioned edit sessions for a table in an Enterprise Geodatabase.
-
TRANSACTIONS: Starts the (regular) transaction mechanism. This can be used only when writing to non-versioned tables that do not have custom behavior.
Note: Transactions are not supported in File Geodatabase.
- NONE: No transaction mechanism is used. This can be used only when writing to non-versioned tables that do not have custom behavior. NONE differs from TRANSACTIONS with TRANSACTION_INTERVAL set to zero in that if the write fails, all successful features are committed for NONE, but are discarded for TRANSACTIONS.
Default Value: TRANSACTIONS
Workbench Parameter: Transaction Type
Example:
GEODATABASE_MDB_Transaction_TYPE EDIT_SESSION
TRANSACTION
Required/Optional: Optional
Workbench Parameter: Transaction Number
Example:
GEODATABASE_MDB_Transaction 0
TRANSACTION_INTERVAL
Required/Optional
Optional
Values
Default Value: 1000
GEODATABASE_MDB_TRANSACTION_INTERVAL 50
Mapping File Syntax
Parameter: <transaction_interval> The number of features in each transaction.
Workbench Parameter
Features to Write Per Transaction
TEMPLATEFILE
If specified, this tells FME to import the complete schema from the template file into the database. The import occurs after opening the Geodatabase for writing, but before any tables are created or features are written. Any error that occurs during import will cause the translation to fail.
Note: Although the template file may contain both schema and data, FME will only import the schema.
Required/Optional
Optional
Values
The pathname of the Esri XML workspace document to import.
Mapping File Syntax
GEODATABASE_MDB_TEMPLATEFILE C:/tmp/XMLEXPORT.XML
Workbench Parameter
Template File
HAS_Z_VALUES
Required/Optional: Optional
This directive determines whether or not the dataset contains z coordinates. The value of this directive may be overridden by the DEF line parameter of GEODB_HAS_Z_VALUES if a value is specified for it. Valid values for this directive are YES, NO, or AUTO_DETECT. When set to AUTO_DETECT, the writer determines the dimension of the feature class by checking the dimension of the first feature headed for that feature class.
Parameter: <has_z_values>
Values: YES | NO| AUTO_DETECT
Default Value: AUTO_DETECT
Workbench Parameter: Contains Z Values
Example:
GEODATABASE_MDB_HAS_Z_VALUES yes
DEFAULT_Z_VALUE
Required/Optional: Optional
This directive determines the z value to use when writing a 2X_ORIGIN
Required/Optional: Optional
The X-coordinate of the origin for all feature classes (individual origins can be set – see Geodatabase Table Representation) and all feature datasets. This is used as an offset because coordinate data is stored as positive integers, relative to the origin, ranging from 0 to 2147483647 (so if the X origin is set below 0, then the maximum value will also drop, and vice versa).
This directive is used only when creating new feature classes.
This directive corresponds to the Min X property of the Feature Class's domain in ArcGIS.
Note: This directive is not used by the File-based Geodatabase writer, as default values are used for the domain and resolution. The default values used are dependent on the coordinate system of the feature class/feature dataset being created.
Parameter: <x_origin>
Value: real number
Default Value: 0
Workbench Parameter: X Origin
Example:
GEODATABASE_MDB_X_ORIGIN -120.29
Y_ORIGIN
Required/Optional: Optional
The Y-coordinate of the origin for all feature classes (individual origins can be set – see Geodatabase Table Representation) and all feature datasets. This is used as an offset because coordinate data is stored as positive integers, relative to the origin, ranging from 0 to 2147483647 (so if the Y origin is set below 0, then the maximum value will also drop, and vice versa).
This directive is used only when creating new feature classes.
This directive corresponds to the Min Y property of the Feature Class's domain in ArcGIS.
Note: This directive is not used by the File-based Geodatabase writer, as default values are used for the domain and resolution. The default values used are dependent on the coordinate system of the feature class/feature dataset being created.
Parameter: <y_origin>
Value: real number
Default Value: 0
Workbench Parameter: Y Origin
Example:
GEODATABASE_MDB_Y_ORIGIN -32.55
D feature to a 3D feature class.
If the GEODATABASE_<SDE|MDB|FILE>_DEFAULT_Z_VALUE statement is not specified, then a default value of 0 is used.
Parameter: <default_z_value> The value to use for the Z coordinate(s) when writing a 2D feature to a 3D feature class.
Values: real numbers
Default Value: 0
Workbench Parameter: Default Z Value
Example:
GEODATABASE_SDE_DEFAULT_Z_VALUE -11.5
Z_ORIGIN
Required/Optional: Optional
The Z-coordinate of the origin for all feature classes (individual origins can be set – see Geodatabase Table Representation) and all feature datasets. This is used as an offset because coordinate data is stored as positive integers, relative to the origin, ranging from 0 to 2147483647 (so if the Z origin is set below 0, then the maximum value will also drop, and vice versa).
This directive is used only when creating new feature classes.
This directive corresponds to the Min Z property of the Feature Class's domain in ArcGIS.
Note: This directive is not used by the File-based Geodatabase writer, as default values are used for the domain and resolution. The default values used are dependent on the coordinate system of the feature class/feature dataset being created.
Parameter: <z_origin>
Value: real number
Default Value: 0
Workbench Parameter: Z Origin
Example:
GEODATABASE_SDE_Z_ORIGIN 120
XY_SCALE
Required/Optional: Optional
A scaling conversion factor from world units to integer system units for all feature classes (individual scales can be set – see Geodatabase Table Representation) and all feature datasets. This is used to specify the level of precision to keep when storing XY coordinates, since all coordinates are stored as integers. Depending on the scale, it changes the precision of the coordinates stored. For example, if you have the coordinate (5.354, 566.35) and you set the XY_SCALE to be 100, then the coordinate stored will be (5.35, 566.35).
When writing to a Personal Geodatabase, if this value is set to 0 then the x,y,z origins and scales will automatically be calculated. These calculated values will be used instead of the values supplied by the writer directives for the x,y,z origins and scales. The grid 1 size will also be calculated, but will only be used if the value for the GRID_1 directive is 0. Even when the writer calculates the x,y,z origins, scales and grid 1 size, the DEF lines can override the calculated values by setting the configuration parameter GEODB_XYSCALE to a non-zero value. See GEODB_XY_SCALE for more information.
This directive is used only when creating new feature classes.
This directive corresponds to the inverse of the Feature Class’s XY resolution in ArcGIS.
Note: This directive is not used by the File-based Geodatabase writer, as default values are used for the domain and resolution. The default values used are dependent on the coordinate system of the feature class/feature dataset being created.
Parameter: <xy_scale>
Value: real number greater than 0.
When writing to a Personal Geodatabase, zero can be specified, in which case the writer will calculate the extents and scales itself. Only used when creating new feature classes.
Default Value: 100 when writing to an Enterprise Geodatabase; 0 when writing to a Personal Geodatabase
Workbench Parameter: X/Y Scale
Example:
GEODATABASE_MDB_XY_SCALE 1000
Z_SCALE
Required/Optional: Optional
A scaling conversion factor from world units to integer system units for all feature classes (individual scales can be set – see Geodatabase Table Representation) and all feature datasets. This is used to specify the level of precision to keep when storing Z coordinates, since all coordinates are stored as integers. Depending on the scale, it changes the precision of the coordinates stored. For example, if you have the z coordinate 5.354 and you set the Z_SCALE to be 100, then the coordinate stored will be 5.35.
This directive is used only when creating new feature classes.
This directive corresponds to the inverse of the Feature Class’s Z resolution in ArcGIS.
Note: This directive is not used by the File-based Geodatabase writer, as default values are used for the domain and resolution. The default values used are dependent on the coordinate system of the feature class/feature dataset being created.
Parameter: <z_scale>
Value: real number greater than 0.
Default Value: Enterprise Geodatabase writer: 100; Personal Geodatabase writer: 0
The default value for a Personal Geodatabase is 0 because by default the writer calculates the extents and scales, and therefore ignores the value assigned to this directive.
Workbench Parameter: Z Scale
Example:
GEODATABASE_SDE_Z_SCALE 10
HAS_MEASURES
Required/Optional: Optional
Parameter: <has_measures>
Values: YES | NO
Default Value: NO
Workbench Parameter: Contains Measures
Example:
GEODATABASE_MDB_HAS_MEASURES yes
MEASURES_ORIGIN
Required/Optional: Optional
The minimum measures value possible. This is used as an offset because measure data is stored as positive integers (0 to 2147483647) relative to the measures origin. This value is applied to all feature classes and feature datasets, although individual feature classes can override this value using the DEF line parameter GEODB_MEASURES_ORIGIN.
This directive is used only when creating new feature classes.
Note: This directive is not used by the File-based Geodatabase writer, as default values are used for the domain and resolution. The default values used are dependent on the coordinate system of the feature class/feature dataset being created.
Parameter: <measures_origin>
Values: real number
Default Value: 0
Workbench Parameter: Measure Origin
Example:
GEODATABASE_MDB_MEASURES_ORIGIN -412.98
MEASURES_SCALE
Required/Optional: Optional
A scaling conversion factor from world units to integer system units for all feature classes. Individual feature classes can override this value using the DEF line parameter GEODB_MEASURES_SCALE. This is used to specify the level of precision to keep when storing measures, since all measures are stored as integers. Depending on the scale, it changes the precision of the measures stored. For example, if you have the measure 566.354 and you set the MEASURES_SCALE to be 100, then the measures stored will be 566.35. The value is only used when creating a new feature class.
Note: This directive is not used by the File-based Geodatabase writer, as default values are used for the domain and resolution. The default values used are dependent on the coordinate system of the feature class/feature dataset being created.
Parameter: <measures_scale>
Values: real number greater than 0
Default Value: 100
Workbench Parameter: Measure Scale
Example:
GEODATABASE_MDB_MEASURES_SCALE 10000
GRID_1
Required/Optional: Optional
This sets the global grid 1 size for the whole translation. It may be overridden if the DEF line has the setting for GRID{1} parameter. Valid values are real numbers greater than zero.
When using the Enterprise or File-based Geodatabase writer, if the value is 0 and no value is specified for the GRID{1} DEF line parameter (or it is 0) then the grid size will be automatically calculated. The File-based Geodatabase writer will also automatically calculate sizes for grids 2 & 3. This directive is only used when creating new feature classes.
Parameter: <grid_1_size>
Values: real number greater than 0
Default Value: Personal or File-based Geodatabase writer: 0; Enterprise Geodatabase writer: 1000
Workbench Parameter
: Grid 1
Example:
GEODATABASE_MDB_GRID_1 45.6
ANNOTATION_UNITS
Required/Optional
Optional
Mapping File Syntax
GEODATABASE_MDB_ANNOTATION_UNITS nautical_miles
Parameter
<annotation_units>
Values
unknown_units (default), decimal_degrees, inches, points, feet, yards, miles, nautical_miles, millimeters, centimeters, meters, kilometers, and decimeters
Workbench Parameter
Annotation Units
SIMPLIFY_GEOM
Required/Optional
Optional
Values
YES | NO (default)
Workbench Parameter
Simplify Geometry