span8
span4
span8
span4
域是一组定义允许值用于属性规则。它们被用来约束数据值,以保证数据的完整性。一个域可以在地理数据库中被定义为一种独特的实体,并且可以被应用到包含该域定义地理数据库内的任何要素类的任何属性。
有两种类型的地理数据库域(编码结构域和范围域)并且两者都通过FME支持。经译码域本质上是多个有效的值的列表,而一个域范围是数字值的单个允许范围。
当读取一个地理数据库,FME有一个选项来解决域名。
当这个选项被选中的附加属性将被添加称为_ <属性> _resolved_其中包含编码属性值的文本描述。
Note:如果可以的话,如上所述,我们会建议使用地理数据库模板这里。这是通常更容易比FME要素类型中定义域更加灵活。
FME has the capability to write to existing or create new Geodatabase tables. As such, when writing Geodatabase domains, the workflow requirements will tend to fall under one of three scenarios:
These scenarios will be controlled primarily by the following writer parameters:
- 数据类型:coded_domain / range_domain
- 验证功能,参数值写入:是/否
Despite the scenarios mentioned below, it should be noted that using an XML Workspace document (containing the required domain definitions) as a template on a Geodatabase writer, is an efficient and highly recommended means of writing Geodatabase domains. For more information on importing an XML document with a schema, please see the地理数据库作家文档。
Scenario 1: Writing to an existing table using an existing domain
写入到一个现有的域字段中的任何数据,默认情况下,插入的是正常的。如表中已经存在,其属性(一个或多个)将已经用所需的域相关联,并且也没有必要设置任何参数来定义该连接。
然而,如果你希望验证输入的数据 - 例如,把它比作一个域定义,以确保其具有有效的属性值 - 那么你必须设置参数作家“验证功能,以写”为是。如果验证参数设置为否,则数据将传递到地理数据库没有错误,尽管一些数据值可能不符合域规则。
方案2:使用现有的域写入新表
When creating a new table that is to use an existing domain, the attribute that needs to be associated with a domain should be given the data typecoded_domain要么range_domain(根据其类型)在模式定义。一会又单击属性宽领域的编辑按钮和“域名”部分中输入现有域的名称。
方案3:写一个新表并创建一个新的域
It should be noted that we generally recommended that you use ArcGIS to create and define domains, using FME to associate attributes or validate data when inserting new features. However, creating domains is possible with FME. The process is identical as for using an existing domain, up until the point where one opens the edit dialog. At that point you check the “Create Domain” parameter, enter a new domain name, and define the values for that domain.
需要注意的是,所提供的“验证功能写”参数设置为Yes,进入功能将自动对任何新定义的域验证。
限制
有在问候域写一些限制的。
Firstly, it is not possible to write to an existing table and to either create an association with an existing domain or create an entirely new domain. That is because this association is wrapped up in the table definition, and an existing table definition cannot be changed by FME. You would need to drop the existing table and re-create it entirely in order to be able to do this.
Secondly, for the same reason stated above, creating a domain is a one-off translation. You would set the data type to coded_domain/range_domain for the initial process, but subsequent loads of the data should be done with the data type changed back the actual type of data (char, integer, etc.)
最后,这是不能够动态地创建一个域(即,域定义应手动执行之前定义并在工作区的过程没有定义)。
下面的示例演示方案3:写一个新表并创建一个新的领域。
道路(欧特克AutoCAD的DWG / DXF)
In the above image, we see a visualization of the source Roads AutoCAD DWG. The values that will be subject to the destination Geodatabase domain definition can be seen in the autocad_layer format attribute.
1. Read Source Data
Road feature geometry is read from the source AutoCAD DWG file using the Autodesk AutoCAD DWG/DXFreader while values that will be subject to the Geodatabase domain will be read from the format attribute autocad_layer. When adding the Autodesk AutoCAD DWG/DXF reader, be sure to set Workflow Options to Single Merged Feature Type. This means that we’ll only get a single reader feature type to read all the source data.
In addition, click on the parameters button, and, in the Group Entities By section, select Attribute Schema.
Once the reader has been added to the workspace canvas, double-click on the reader and select the Format Attributes tab. Scroll down and check the box next to autocad_layer. Click OK.
2.地图属性为域代码
该AttributeValueMapper用来映射从源DWG到我们将适用于域定义域代码里的值。在AttributeValueMapper添加到画布上,并打开参数对话框。选择autocad_layer作为源属性,并输入StreetCategory作为目的地属性。输入99作为默认值,因为这将是我们将使用未知街道类型的域代码。中的参数的对话框的值映射部中,输入值,如下面的屏幕截图所示:
2. (Alternate) Map Attributes to Resolved Domain Values
如上所述的步骤的替代,人们可以代替使用AttributeManager,采取从源DWG文件中的值并将其映射到基于解析值的域定义的域定义。要做到这一点,添加一个AttributeManager到工作区,并打开参数对话框。重命名autocad_layer到StreetCategory_resolved - 域名的解析版本(你将需要键入StreetCategory_resolved)。
The above tends to be most applicable when your workflow falls under Scenario #1 (writing to an existing table using an existing domain definition) or Scenario #2 (writing to a new table in the Geodatabase using an existing domain). In both scenarios, it would be assumed that one does not know the actual domain codes contained in the domain definition and instead know the resolved value. However, this process will work when creating a domain as well.
3.写功能和创建域
添加ESRI地理数据库(文件地理数据库)作家到工作区,复制来自读取器的模式,并指定输出地理数据库到的数据将被写入(i.e.Domains)。单击参数选项卡,然后展开高级部分。设置验证功能写为是。此设置将确保传入源数据符合我们的域定义。一旦添加,连接AttributeValueMapper的输出(或者,这取决于工作流程工作区紧随其后,AttributeManager)到地理数据库的作家。亚搏在线
对作家和,在常规选项卡下双击,输出要素类/表(即街道)输入一个更有意义的名称。接下来,单击用户属性选项卡,并在名称下,改变autocad_layer属性StreetCategory和Type设置为coded_domain。
点击编辑按钮和编码域对话框窗口将打开。输入域(即StreetType)的名称,请选中创建域,并输入您的域定义的数据类型。最后,输入代码和解决数值域的定义。
最后,确保From_HBlock设置为char类型。
保存并运行该工作区。
Workspace Utilizing Domain Codes
Workspace Utilizing Resolved Domain Values
* The ESRI Geodatabase (File Geodb) reader/writer used in the above example requires that a licensed version of ArcGIS be available to the user. For more information on required ArcGIS license levels, please see所需的ArcGIS许可的地理数据库FME格式类型。
© 2019 Safe Software Inc |法律