span8
span4
span8
span4
This type of workflow is set up very simply, but with maximum flexibility.Any source dataset (of the chosen format) can be selected, and it will be read and written (to the destination format) correctly.This workflow creates an output that is an exact mirror image of the source dataset’s schema.
The important part is that a user can change the source to a different dataset, and the translation will still work.As well, the user will not need to make any changes to the workspace.This approach is perfect for when there is a large number of Feature Types inside a dataset, each with a different schema.This approach is also useful when new Feature Types will be added to the workflow in the future.
In the following example, a database (InteropolisDatabase.sdf) contains multiple Feature Types, each with a different schema.Each Features Type will be reprojected and then written dynamically using its own schema.
InteropolisDatabase.sdf contents:
1。开始产生一个工作区
Open FME and select the Generate Workspace tool.For the source and destination use:
2。设置工作区是动态
In the dialog, there are two workflow options: Static Schema and Dynamic Schema.
If the Static Schema option is selected, each Feature Type would need to be added separately:
However, if the Dynamic Schema option is chosen, a schema-less workspace with both a dynamic Reader and Writer is created.For this example select '动态模式'.
3。生成
Select OK to generate the workspace.Both the Dynamic Reader and Writer will have a single Feature Type displayed, regardless of the number of Reader Feature Types selected.Add a Reprojector transformer between the reader and the writer, set the Destination Coordinate System to LL84.
In the image above Reader Feature Type is named ‘
在后台,读者要素类已配置由合并过滤器设置为一个星号(*)来读取所有功能,无论要素类的名称。
目的地功能类型已被配置为写入所有特征与由所述源数据集定义的架构。
Note: Individual Readers and Writers can be made dynamic without having to use the Generate Workspace dialog.This is done by setting the options above in each Feature Type’s properties dialog.
4。运行工作区
When the workspace is run, all of the InteropolisDatabase source data is read through a single feature type.
On the Writer side, the incoming “fme_feature_type” attribute (this contains the Feature Type name) is used to search the source dataset.如果找到了正确的要素类的名称,则该模式将被使用。例如,“fme_feature_type”为“路”功能将搜索InteropolisDatabase为“道路”数据集和发现时,它会使用该模式。这些数据将被动态地划分返回到它的组成层中,使用合适的架构来组织的原始属性和几何类型。
当创建一个动态工作流,一个额外亚搏在线的用户参数称为“功能类型改为”在工作区中自动发布。
此参数创建了一个快速的方法来改变特征类型的数量被读取。当工作区使用“提示符,然后运行”运行,用户将被要求选择其所需的特征类型应该翻译。
在对话框里面,对话框出现在双击“特征类型改为”并选择适用的特征类型。在这个例子中添加BusStops,CityParks和道路。
如果动态转换运行期间所需的工作空间的引用数十个源要素类型(例如数据库),而不是所有的人这是特别有用。
由于目的地特征类型是源数据集的模式的精确镜像,属性在工作空间内创建不会自动添加到输出。任何新的属性需要对作家的用户属性选项卡中添加的。例如,戳器变压器内产生的时间戳属性已被添加到下面的图像中的目标要素类型:
当工作区运行时,任何新的属性被写入到输出的每个特征类型。
添加一个通用阅读器和/或一般作家到该工作流程,可以产生能够读取一个单个工作区/写数据的任何格式,不管有什么样亚搏在线的架构。
© 2019 Safe Software Inc |Legal