span8
span4
span8
span4
以前:教程:入门在PostGIS和PostgreSQL| Next:将从PostGIS的
Connecting to a database is slightly different from selecting a file for a file/folder-based format.The operation relies much more on format-specific parameters.In this article, we'll learn how to view and inspect data stored in PostGIS or PostgreSQL using the FME Data Inspector and FME Workbench Visual Preview (2019.0+).After inspecting, we will use FME Workbench to transform and translate our data.Note: This example will use PostGIS in the text and screenshots, but it is also applicable to the PostgreSQL format.
使用FME 2016.1这段视频被记录的数据是从当前的文章不同,但其概念仍然是相同的。
The basic connection parameters are:
主机(服务器)名称
网络端口号
数据库(服务)名称
用户名
密码
To connect to the Safe Software provided training database, use the following credentials when setting up your connection.Please be aware that this is a public database, and the data available can change at any time.This database is for training purposes only and should only be used during training courses and articles:
港口:5432
数据库:fmedata
用户名:fmedata
密码:fmedata
There are two main ways to set up a database connection in FME.The first way is through the FME Options, which allows you to set up the database connection before creating a workspace.The second more common way is to create the database connection while adding a reader or writer.
1。FME选项:
In FME Workbench or FME Data Inspector, on the top menu bar go to Tools > FME Options.When the FME Options dialog opens, select Database Connections from the side menu.From there, you can click on the + sign on the bottom to create a new connection.
Fill in the connection parameters for your database:
Once the parameters are filled in, this connection will be saved and be persistent between FME Workbench and FME Data Inspector.This method allows you to set up the database connection without the need to connect to a table.For more information, see the数据库连接documentation.
2。读者或作者:
In FME Workbench or FME Data Inspector when you add a PostGIS or PostgreSQL reader or writer, you can add the Connection by clicking the drop-down and selecting Add a Database Connection.
In the Add Database Connection dialog, fill in the database credentials.
Before you can add the reader, you will need to open the parameters and select which table to read.Then click OK twice to add the reader to the canvas.
If adding a writer, you will need to set the table name in the Feature Type dialog.
在FME工作台2019.0+,数据可以直接在FME Workbench窗口使用Visual预览观看。如果你有FME的旧版本,或者选择FME数据检查,继续下一节。
1。打开FME工作台
在一个空白的FME工作台画布,添加PostGIS的读者。如果您尚未建立数据库连接,单击下拉菜单旁边的连接,然后按照连接到数据库中列出的步骤。一旦你选择或连接的数据库连接,单击参数按钮。
在参数对话框,单击省略号表列表旁边开辟了PostGIS / PostgreSQL数据库。选择您想在读哪些表。一旦表已被选中,单击确定两次向读者添加到画布上。
2。打开Visual预览
一旦读者特征类型已经被添加到画布上,点击它即可打开弹出菜单。在弹出菜单中,单击查看源数据按钮,打开Visual预览。
现在,您可以查看视觉预览数据,并继续您的工作流程,并通过进程查看数据。亚搏在线
在FME工作台数据工作之前,这是一个好主意,检查它的FME数据检查。
1。打开FME数据检查
打开FME数据检查,并在左上角,点击打开。在选择数据集,以查看对话框中,选择了PostGIS作为格式,然后连接,选择已创建的PostGIS的连接。如果您尚未创建的连线,按照上一节中的步骤:连接到数据库。一旦连接到数据库,点击参数按钮。
在参数窗口中,单击省略号旁表列表来选择哪些数据集视图。单击确定两次来查看数据集。
2。查看数据
然后查看数据,一旦你满意,回到FME工作台。
数据归属
从公开的数据显示这里始发的数据由提供温哥华市, 不列颠哥伦比亚省。它包含了开放政府许可协议进行许可信息 - 温哥华。请注意,并非所有的训练PostGIS的数据库是从温哥华市的,因为它是一个公共数据库,任何人都可以上传数据的数据。
从PostgreSQL的转换为MapInfo(非空间,以空间)
PostGIS Error if Access Not Granted to Geometry Table
Updating Databases: Using Change Detection to Set Operation Type
Updating Databases: Filtering Features to Set Operation Type
Performing spatial queries on database tables using the FeatureReader
FME is loading features with invalid geometries into my Database
© 2020 Safe Software Inc |Legal