斯潘8
斯潘4
Inpart 2,您学习了如何将工作区发布到FME服务器并从Web用户界面运行它。现在,在第3部分中,you will modify that workspace so it allows for "self-serve" data access.To accomplish this,执行以下操作:
在本教程的第3部分中,您将学习如何启用FME工作区进行自助数据访问,以便任何人都可以下载您的数据。This involves creating published parameters in FME Workbench,publishing the workspace to FME Server,并从Web用户界面运行工作区。
a) Open workspace
从打开工作区part 2在FME工作台中。或者,open the template attached to this article (亚搏国际在线官网CommunityMapping.fmwt) in FME Workbench.
On the Generic Writer,默认的编写器格式设置为ESRI shapefile。但是,the goal is for the user to select the format of their choice,从一个小名单上,at run time.This is accomplished with published parameters.
FME中的参数控制着FME的工作方式。They exist in many places,比如读者,作家,和变形金刚。
b)仔细查看通用编写器的参数之一:输出格式
双击此参数将显示它已设置好,用户可以从格式库中的任何格式中进行选择。但这不是我们想要的。目标是向用户提供4种常见格式的列表。
So,create a new user parameter,并据此定义…
c) In the Navigator,find the User Parameters > Published Parameters node,right-click,并选择创建用户参数
- For Type,选择别名选项
- For Name,输入输出格式
- For Prompt,输入输出格式
- Click the button next to Configuration.我们要导入我们想要的格式。
-单击导入,then Writer Formats.搜索并选择esri shapefile,GML宾利微型站设计V8,and MapInfo TAB.单击确定,好的。Select Esri Shapefile for the default value.Note that Published is checked by default - when a user parameter is published,a user is prompted for a value when the workspace runs.您的对话框应如下所示:
d)将发布的参数链接到输出格式参数
新的输出格式参数出现在已发布的参数下,但我们仍然必须将它链接到通用编写器的输出格式参数。找到通用编写器的输出格式参数,右键单击输出格式,选择链接到用户参数,then select the new Output Format parameter we just created.
Notice how the cogwheel icon turned purple.
e) Run the workspace
如果立即运行工作区,它将使用默认值并输出esri shapefile。However,if you click the "Set Workbench to Prompt Before Running Workspace" icon (a green question mark icon) in your toolbar and then run,系统将提示您选择输出格式。Notice only those 4 formats are presented now in the drop down list.Pick GML.工作区运行成功。
f)发布功能类型以读取参数
Set up the workspace so the user gets to choose which layers they want to request!It's actually quite simple.
- Expand the File Geodatabase Reader > Parameters > Features to Read.This parameter lets the user decide which feature types to process when the workspace runs.
-右键单击要读取的要素类型,然后选择创建用户参数。Go with the defaults for the definition,然后点击确定。确认新参数出现在“已发布参数”下。
g)运行带有提示的工作区并运行
-确保选中“Run(运行)”菜单中的“Run with Prompt(使用提示运行)”,otherwise,此工作区将使用默认值运行。
-再次运行工作区。
注意,这次有两个参数要设置。For more information on published parameters,退房本章of the Server training.
a)工作台内,go to File > Publish to FME Server,或选择“发布到FME服务器”工具。
b) Connect to your FME Server
- If you are setting it up for the first time,在“连接”下选择“添加Web连接”
-输入连接名称,能见度,服务器URL,用户名、密码和身份验证。
c)选择存储库和工作区名称。
Click on the New button to create a new repository.Enter Server Tutorial for the name,and a description "FME Server 2018 Tutorial".Rename the workspace to 亚搏国际在线官网CommunityMapping.fmw.
d)上传数据文件
- Click on the Select Files button
- Select Location
- Click the "Upload to a shared resource folder" radio button and then select the Data folder and hit OK
- Select the checkbox for 亚搏国际在线官网communitymap.gdb.好啊
-确保选中“上传数据文件”,然后点击下一步。
-注意:如果完成part 2and kept the same workspace name (亚搏国际在线官网CommunityMapping.fmw),you will be prompted "The Workspace ‘亚搏国际在线官网CommunityMapping.fmw' already exists in this repository.是否确实要更新此工作区?“单击“是”覆盖它,或者单击“否”,如果不想覆盖,请返回并更改工作区名称。
-确保选择了数据下载服务,然后单击“发布”
a)打开FME服务器Web用户界面
Log in with the author/author username/password.
b) Click Run Workspace
On the Run Workspace page,select Server Tutorial for the repository and the 亚搏国际在线官网CommunityMapping workspace.选择服务的数据下载。
查看已发布的参数。显示了在FME工作台中设置和刚测试的2个。就像以前一样,select an output format,并选择一个或多个图层。
Click Run Workspace.
c)结果
The Data Download service presents a URL link to the translation results in a zip file.A quick inspection of the contents of the zip file confirms the results are what we expected.
Note: The parameters in this workspace were all set up manually to demonstrate how to work with published parameters.A quicker way to create the workspace is select the Dynamic Schema option when generating the new workspace.
?2019安全亚搏在线软件公司|合法的