span8
斯潘4
本文详细介绍了三个样本工作空间及其相应的空间ETL工具,这些工具可以帮助用户将地形数据转换为与当地政府信息模型兼容的表单,并将其上传到当地政府地理数据库。The tools and workspaces have been updated to conform to the November 5,2012年发布的地方政府信息模型。
所需软件:
Arcgis桌面10.1 FME桌面2012 w/sp2或更高版本或数据互操作性扩展2012 w/sp1 for Arcgis桌面
Arcgis桌面的数据互操作性扩展可用于查看和运行Arcgis中的空间ETLS工具。As an alternative and if you have FME Desktop installed,您可以使用它在FME工作台中打开和运行模板,也可以使用它作为Arcgis的扩展,并在Arcgis环境中查看和运行空间ETL工具。
假设和建议:
本文附带了三个工作区,每个都有不同的主题。第一个涉及行政边界和建筑足迹,第二个工作区侧重于道路数据和设施,and the third one centers around preparing water,land cover and elevation data.要查看工作区内部,打开FME 2012 SP2+中的任何模板或打开Arcgis中的“地形基础图”工具箱,然后右键单击其中一个工具并选择“编辑”。您现在处于“FME工作台”或ARCGIS的“数据互操作性”扩展中。
If you want to try the workspaces,all you need to do is to hit "prompt and run translation" (the play button that has a question mark next to it) and set correct parameters.您还可以将它们用作模板,以建立自己的解决方案。To see how the workspaces handle your data - in case you want to find out what modifications they would need to fit your purpose - there are a number of areas in them that need to be reviewed.在这里,我们将讨论三个工作区之间共享的区域:
The workspaces attached to this article have sample data with them,但是如果你想使用你自己的数据,you have to set the workspace to use your own feature types.如果您是新的FME界面,you can find information about using readers and writers inhttp://docs.亚搏在线safe.com/fme/html/fme_readerswriters/content/welcome/welcome.htm
FME使用published parameters简化用户对工作区的输入。可以在运行时或编辑工作区时设置参数。在这些工作区中,除了源文件和目标文件之外,您可以输入用户名并选择是否截断目标表。
Many tables in the Local Government model contain a field named "LASTEDITOR".The User Name parameter is set up in a way that if a source feature did not have an attribute that could be used to populate it's "LASTEDITOR" field in the output table,或者属性值为空或者为空,the text you enter for the User Name parameter will be written in the feature's "LASTEDITOR" field.这个参数在FME模板和ETL工具中的设置稍有不同。区别在于将其值留空:
- If you are using the FME templates,FME将检查登录到正在运行的操作系统的用户名,并将其用作用户名。如果找不到操作系统的用户名,它将使用单词“FME”作为输入。
- If you are using the ETL tools with the ArcGIS Data Interoperability extension,该值将保留为空。此行为将使模板的行为与即将到来的数据互操作性服务包相匹配。
“truncate destination table first”参数决定在写入目标表之前是否要截断这些表。如果参数设置为是,在将传入的功能写入目标表之前,将删除目标表中的所有行。否则,the new features will be appended to the tables.
可以使用工作区中提供的属性名称重命名或创建属性,并为缺少值的属性设置默认值。有关此变压器的更多信息,请参阅工作台中的描述。
Below is a screenshot of one of the AttributeRenamers used in the "Facilities and Transportation" workspace.
在上述属性名称中,一些属性正在被重命名(例如完整到完整名称)正在创建一些新属性(例如欧内德比菲德鲁特)and default values are being assigned to missing attribute values (e.g.default value for OWNEDBY is set to 1)
在这三个工作区中还使用了另外两组变压器。它们可以不需要任何更改就工作,但由于它们几乎用于所有工作流,亚搏在线描述它们可能很有用。
在大多数工作流中,亚搏在线there are pinkishbookmarksthat contain five transformers: two Testers,一个属性创建者,a TimeStamper and a DateFormatter.每组做相同的事情。第一个测试人员检查输入功能是否已经具有其lasteditor的值,如果确实如此,then it will go straight to the second Tester,otherwise it's value will be determined by the用户名已发布参数and then it will be routed to the second Tester.The second one checks whether the LASTUPDATE field is populated.If it was empty,此功能将发送到时间篡改,以用当前系统时间和日期填充它。如果值已经存在,它将通过日期格式化程序来确保值的格式正确。
此书签是工作区中的重复主题
所有的编写器功能类型都有一个自定义变压器named NullAttributeRemover right before them in the 亚搏在线workflows leading to them.此自定义转换器是对FME商店custom transformer.它检查输入特性的所选属性,如果属性值为空,移除它,以便geodatabase编写器将值写入为空值。
nullattributereMover
在本节中,我们将更详细地介绍三个工作区。
此工作区获取保存有关建筑示意图的信息的输入数据,包裹,以及行政边界,清除输入并将其上载到地理数据库。使用此工作区,特性可以写入构建示意图,所有者包裹,LandBaseMunicipalBoundary,地方政府地理数据库中的行政边界线和县边界表。
以下是在FME工作台中查看的工作区的屏幕截图。
根据你的需要,您可能希望添加或删除工作区中的一些变压器。To run your data through it,in addition to the概述部分中提到的要点,有很多事情需要考虑:
此工作区有一个额外发布的参数,可以设置为将区域转换为英里。此工作区中的四个输出表包含区域字段,并且本地政府数据模型指定以平方英里为单位的区域。如果源数据的投影以英里为单位,将此参数设置为“无”。否则,将其设置为适当的值。Setting this parameter to the correct value ensures that your output area attribute is in square miles.
面积转换参数
attributeValueMapper Transformer可用于将传入的属性值映射到所需的域,并且在映射具有相对较小域的属性时非常有用。在此工作区中,有四个attributeValueMapper用于映射已在本地政府数据模型中定义域的输出属性。If your source attributes already follow the domains set in the Local Government model,您应该从工作流中删除attributeValueMappers。亚搏在线Any input attribute that is not defined in the input domain (left column),将替换为默认值。有关attributeValueManager的更多信息,请参阅变压器说明。
上面的attributeValueMapper将值映射到子类型字段的域中。
如果输入值不在左域中,则填充,它将映射到默认值(此处为2)
此工作区获取保存道路信息的输入数据,railroads and public facilities,清除输入并将其上载到地理数据库。使用此工作区,特性可以写入道路中心线,Railroad,本地政府地理数据库中的FacilitySitePoint和FacilitySite表。
以下是在FME工作台中查看的工作区的屏幕截图。
根据你的需要,您可能希望添加或删除工作区中的一些变压器。To run your data through it,in addition to the概述部分中提到的要点,有很多事情需要考虑:
如前所述在上面,attributeValueMapper对于映射具有相对较小域的属性很有用。在此工作区中,在地方政府模型中,使用变压器5次将一些道路属性映射到其域。
One of the AttributeValueMappers used in the workspace
使用attributeValueMapper映射具有大域的属性可能会非常耗时。用户可能已经拥有包含正确属性值映射的数据库或电子表格。在这种情况下,可以使用SchemaMapper。使用SchemaMapper可能有点困难,但它有几个好处。在属性值映射的情况下,the SchemaMapper uses an external table to map attributes and unlike the AttributeValueMapper,一个架构映射器可以映射多个属性。Although the SchemaMapper's interface has been upgraded over time,详细描述了其功能背后的基本逻辑here和here.
为了我们的目的,我将介绍其中一个模式映射器(本文工作区中的所有模式映射器工作方式相同):
- Let's first look at how the source spreadsheet is organized.这样做,转到名为“source data facilities transportation”(与工作区模板一起提供,或在etl tool.zip文件中同时附加)的文件夹,打开attribute mappings.xls excel文件。
In the spreadsheet,每个工作表都在一个模式映射器中使用。Let's see the one named FacilitySitePoint.
Microsoft Excel中的FacilitySitePoint工作表概述。第一行用于标识SchemaMapper中的每一列。The second row is populated with string to make the SchemaMapper treat all columns as strings
在上面的例子中,第一列指定输入属性的名称。所以在这种情况下,我们正在处理“子类型字段”,“OnType”“FeatureCode”和“CaptureMeth”属性。第三列指定目标属性名称。因为我们已经在工作区中重命名了输入属性,输入和目标属性在这里具有相同的名称。第二列和第四列分别指定源属性和目标属性中的属性值。第五列是一个助手,它保存来自本地政府数据模型的代码定义。架构映射器中未使用最后一列。
As an example,在上述电子表格中,我们正在将具有值“college”的输入子类型字段属性映射到具有值730(教育代码)的输出子类型字段属性。Note that in the spreadsheet,for each input attribute name,第二列的第一行(源属性的值)没有值。如果输入值的行为空,它将匹配所有输入。因此,将此行放在顶部意味着“如果输入功能上的属性值与电子表格中指定给同一属性的任何其他值不匹配,set it to whatever blank value is mapped to".Using the above spreadsheet,if an input SUBTYPEFIELD value could not be matched with the values you have set in the worksheet,它将在输出子类型字段属性上映射到790(映射到本地政府模型中的默认值)。请注意,FME总是使用最后一个匹配项,因此,如果将空白值移动到子类型字段的最后一行,所有输入值(无论是否与其他行匹配)都将替换为790。因此,空白值通常只能用于每个输入属性的顶行。If you completely remove the row with blank input value,然后,无法匹配的属性值将原封不动地输出。
-现在让我们检查SchemaMapper转换器。在变压器中,读取属性映射所需的工作表,并添加两个功能:“过滤器”和“新属性”。
过滤器对输入功能起作用,在这种情况下,使用Excel工作表的前两列:
第一列用于属性名称字段,第二个设置为属性值字段。请注意,这两列是灰色的,“新属性”创建新属性(或替换现有属性),在这种情况下,设置为使用第三列和第四列:
第三列用于属性名称字段,第四个用于属性值字段。注意这两列是灰色的
此工作区中使用的三个模式映射器映射道路中心线中的不同属性,本地政府地理数据库中的FacilitySitePoint和FacilitySite表。要为您自己的数据使用模式映射器,you need to fill in appropriate values in the second columns (Attribute code on entering Feature) of the Excel worksheets.
此工作区获取保存有关水体信息的输入数据,土地覆盖和海拔,清除输入并将其上载到地理数据库。使用此工作区,功能可以写入水线,Waterbody,植被,二十岁的学生,十尺伯爵,TwoFootContour and SpotElevation tables in a Local Government Geodatabase.如果您还有要写入FiveFootContour表的源数据,您可以将工作流用于双轮廓,并在工作流末尾添加F亚搏在线eatureTypeFilter,也可以复制工作流,并通过副本将源连接到FiveFootprotour编写器功能类型。
以下是在FME工作台中查看的工作区的屏幕截图。
根据你的需要,您可能希望添加或删除工作区中的一些变压器。To run your data through it,in addition to the概述部分中提到的要点,有很多事情需要考虑:
此工作区使用两个模式映射器将输入属性映射到本地政府地理数据库的水线和水体表中“类型”属性的域。可以找到有关如何组织Excel工作表并在SchemaMapper中使用的详细信息在上面.
正如变压器的名字所暗示的,它计算输入多边形的面积。此转换器在工作区中仅使用一次,因此没有为它发布面积转换参数。如果源数据的投影使用的单位不是英里,您可以在面积计算器的乘数参数中输入转换率。
乘数设置为将平方英尺转换为平方英里
这些工作区旨在为您提供一个起点,并帮助您使用最佳实践将数据加载到现有的本地政府文件地理数据库中。
预期您可能有不同的源格式和模式,您可能需要调整此工作区以使用您自己的数据。
如果您有与此工作区相关的问题,请联系我们:支持/支持并将该主题命名为“Arcgis地方政府地形基线图”,以便在安全软件支持下快速找到最佳资源。亚搏在线
Reading Basic Geodatabase Annotation - GDB to DGN
Performing spatial queries on database tables using the FeatureReader
How do I convert curved text from Geodatabase to Microstation DGN?
Attribute Table in ArcGIS: "Could Not Load Data"
How to Read and Translate all Feature Classes from Multiple ESRI Geodatabases
?2019安全亚搏在线软件公司|合法的