You are here: 流行格式 > ESRI地理数据库读卡器/作家 > 表格表示 > User Attributes

User Attributes

For information on the parameters in this dialog that are specific to all formats, seeAbout Writer Feature Types: User Attributes

This section of the_DEFstatement defines the attributes for a table.

  • The specified within the FME mapping file must obey the following rules:
    • Attribute Name case must conform to the conventions and restrictions of the underlying RDBMS database. When writing to a Personal or File Geodatabase, the case is preserved, but when writing to an Enterprise Geodatabase whether or not the case is preserved depends on the underlying database (i.e., in Oracle, attribute names are made uppercase, whereas in Microsoft SQL Server at ArcSDE 9.2 or later, case is preserved).
    • 属性名称必须遵守地理数据库的所有长度和字符限制。写入地理数据库时,有限制为30个字符。

      Note:If a table is being created and one of the attribute names conflicts with a Geodatabase system field (i.e., the object ID or one of the shape fields), then a different name will be selected for the system field and a warning message logged.

  • The definition defines the type and has the form

支持的属性类型如下所示:

smallint (n)

This type is used to represent small integer values with less than or equal to n digits.

If an invalid width is specified for this data type then FME will correct the value and output a warning saying that it has done so. A valid value for the width lies between 1 and 5 inclusive.

Note:This only applies to Geodatabase SDE. It will behave like a regular smallint in the other Geodatabases.

整数

This type is used to represent 32-bit integer values.

整数(n)

此类型用于表示具有小于或等于n个数字的整数值。

If an invalid width is specified for this data type then FME will correct the value and output a warning saying that it has done so. A valid value for the width lies between 1 and 10 inclusive.

Note:This only applies to Geodatabase SDE. It will behave like a regular integer in the other Geodatabases.

漂浮

This type is used to represent 32-bit float values.

漂浮(n,m)

This type is used to represent float values with a precision not exceeding n and a scale not exceeding m.

如果为此数据类型指定了无效的宽度和/或十进制,则FME将纠正值并输出警告说它已完成。A valid value for the width lies between 1 and 6 inclusive. A valid value for the decimal lies between 0 and the value of the width inclusive.

Note:This only applies to Geodatabase SDE. It will behave like a regular float in the other Geodatabases.

double

This type is used to represent 64-bit float values.

double(n,m)

This type is used to represent double values with a precision not exceeding n and a scale not exceeding m.

如果为此数据类型指定了无效的宽度和/或十进制,则FME将纠正值并输出警告说它已完成。宽度的有效值位于1至38之间。十进制的有效值在于0和宽度的值之间的值。

Note:This only applies to Geodatabase SDE. It will behave like a regular float in the other Geodatabases.

布尔基

This type is used to represent Boolean values. The possible values are真的false

char(n)

此类型用于表示长度不超过的字符值n人物。FME将使用UTF-16编码读取和写入地理数据库。

date

This is used to store and retrieve date information within a Geodatabase.

When a date field is read by the Geodatabase reader, it is placed in the FME feature with the formHHMMSS.,YYYYMMDD, oryyyymmddhhmmss.。时间部分使用24小时时钟指定。写入时,日期属性也必须是这三种形式中的一种。这些形式与所有其他FME日期兼容。

Note:When the Geodatabase writer creates a new table, all the fields, except for the object ID field, will be defined as allowing null values.

guid

这用于存储和检索地理数据库中的GUID。当地理数据库读取器读取GUID字段时,它将放置在FME功能中,而无需周围的括号。

The Geodatabase writer will accept GUID values with or without surrounding braces.

subtypes

Subtypes allow you to define a subclassification of a table based on a field. For instance, a table namedroadmay have a field called健康)状况which can have valuesgood,bad, 和miserable。In the Geodatabase, the field must be an integer type of some sort in order to be able to create subtypes on it.

For the Geodatabase writer, subtypes can be created when creating a new table using the following syntax on DEF lines

<属性名称>子类型(value1:value2:value3:..... valuen)

或者

subtype_codes(code1:val1:code2:val2:....coden:valn)

Note:参数列表(即,括号之间的所有内容)必须是分离的,并且必须使用特殊的XML样编码进行编码。Workbench自动正确编码列表。您可以联系安全软件以获取帮助。亚搏在线

In the first case, descriptions can be supplied as strings, in which case codes are generated by the Geodatabase writer starting at zero. In the second case, the input list consists of pairs of codes and corresponding descriptions.

列表中的第一个代码将用作默认子类型代码。在仅指定描述的第一种情况下,为其创建的代码value1will be used as the default subtype code. For instance, if the DEF line is specified as follows

subtype_codes(1:a:3:b:4:c:5:d)

then1will be used as the default code (which maps toa).

The following restrictions are applied when subtypes are created:

  • 每个表只能拥有一个子类型。
  • 所有代码都必须是唯一且有效的整数。
  • 所有的value,description对必须是独一无二的。
  • You cannot add subtypes to an existing table. If you do, thedef行将忽略线路定义,表将使用现有子类型,如果存在一个。如果表格上存在子类型,则将在其中进行比较def行定义和现有的子类型定义。如果它们不同,将记录警告消息。

写入功能时,子类型属性必须包含代码(由地理数据库存储为整数)。要提供描述而不是要素的代码,请使用特殊属性geodb_subtype_name。If the subtype attribute is not specified, then the writer will look for thegeodb_subtype_name属性并将描述将描述转换为其相应的代码。看看Writing Subtypes and Domainsfor more information.

Example:

< writerKeyword > \ _DEF道路
type geodb_polyline \
健康)状况subtype_codes(0:good:1:bad:2:悲惨的) \
。。。。。。。。。\
。。。。。。。。。

域名

The domains can be specified at the DEF lines using the following syntax:

range_domain(domain_name:field_type:min_val:max_val)
coded_domain(domain_name.:field_type:name_1:value_1:…..
name_n:value_n)

This syntax is used to create new domains along with the new field. The domains defined as above are added to both the workspace and the field of the table. If the domain name already exists in the workspace, a comparison is made against the existing definition. A warning is issued if they differ, and the existing domain is used.

Note:参数列表(即,括号之间的所有内容)必须是分离的,并且必须使用特殊的XML样编码进行编码。Workbench自动正确编码列表。To encode the argument list manually within a mapping file or FME Objects, seeSubstituting Strings in Mapping Filesin the FME Fundamentals on-line help file. You can also contact Safe Software for assistance.

例1:

要定义具有以下代码和浮动字段类型的代码和值的域:

Code

Values

1.2

val1

3.6

val2,val3

4.5

在这里测试“报价”

you would use the following format:

Coded_Domain(FloatCodeddom:Float:1.2:Val1:3.6:Val2 <逗号> Val3:4.5:
testquoteshere)

To use an existing domain, you can use the following short syntax:

Range_Domain(Domain_Name)
coded_domain(domain_name.)

An error will be generated if the domain does not exist in the workspace or is not defined elsewhere using the long syntax (i.e., the syntax specified at the beginning of this section) for domains.

Note:如果在翻译中多次引用相同的新域,则只需要在一个属性上指定长语法形式;所有其他实例都可以使用短表格。在映射文件或工作区中指定了长表单的属性无关紧要。

要在指定现有域时指定文本字段的长度,可以使用短语的以下变体:

coded_domain(domain_name.:char)

Note:Theare the result of applying FME’s XML-like way of escaping certain characters. Contact Safe Software if more information is needed, keeping in mind that Workbench automatically performs this encoding when creating new domains and subtypes.

例如,

coded_domain(TextDomain.:char50)

It is important to note:

  • The variant of this short syntax is allowed for text fields only.
  • Since ArcGIS allows text fields to have only coded value domains, using this field type withrange_domain将导致错误。
  • If no text length is specified for a text field, that is, if the syntax used is:

coded_domain(domain_name.)

then FME will insert a default length of 254 characters.

例2:

A complete DEF line example is shown below:

GEODATABASE_MDB_OUT_DEF Q1_LINE \
geodb_type geodb_polyline \
GEODB_DROP_TABLE YES \
GEODB_TRUNCATE_TABLE NO \
GEODB_OBJECT_ID_NAME Object_ID \
GEODB_OBJECT_ID_NAME Object_ID \
GEODB_OBJECT_ID_ALIAS "Object ID" \
GEODB_SHAPE_NAME Shape \
GEODB_SHAPE_ALIAS Shape \
geodb_config_keyword默认值\
GEODB_FEATURE_DATASET "" \
geodb_grid {1} $(_ geodboutgrid1)\
GEODB_AVG_NUM_POINTS "" \
geodb_has_measures no \
GEODB_HAS_Z_VALUES $(_GEODBOutDimension) \
geodb_xorigin“”\
GEODB_YORIGIN "" \
GEODB_ZORIGIN "" \
GEODB_XYSCALE "" \
GEODB_ZSCALE "" \
GEODB_ANNO_REFERENCE_SCALE "" \
geodb_oid整数
igds_class double \
igds_color double \
igds_graphic_group double \
igds_style double \
igds_weight double \
Object_ID integer \
Shape_Length double \
property range_domain(intDomain:integer:0:100) \
testVal range_domain(realDomain:double:0.5:25.5) \
textVal coded_domain(textVal:char50:a:all:b:bad) \
漂浮Val coded_domain(floatCodedDom:float:1.2:val1:3.6:val2val3:
4.5:testquoteshere)