Exercise 4 | Tourist Bureau Project |
Data | Community Mapping/Food Vendors (Esri Geodatabase) |
Overall Goal | Create a GPS-compatible dataset of food vendors for the local tourist bureau |
Demonstrates | Basic Data Translation and Data Inspection |
Start Workspace | None |
End Workspace | C:\FMEData2017\Workspaces\DesktopBasic\Basics-Ex4-Complete.fmw |
You've barely started in your new job, but requests are coming in fast!
The local tourist bureau is running a promotion where they provide tourists with a GPS device to help them visit street food vendors in the city. Your manager wonders whether you can use FME to produce the data to be used in this scheme.
Let's get onto that right away shall we?!
1) Start FME Workbench
Start FME Workbench. In the Create Workspace section of the Start window, choose the option to Generate (Workspace). When prompted generate a translation with the following parameters:
Reader Format | Esri Geodatabase (File Geodb API) |
Reader Dataset | C:\FMEData2017\Data\CommunityMapping\CommunityMap.gdb |
Writer Format | GPS eXchange Format (GPX) |
Writer Dataset | C:\FMEData2017\Output\Training\FoodVendors.gpx |
.1 UPDATE |
In FME2017.1 the format is now called Esri Geodatabase (File Geodb Open API) |
Click OK to accept the parameters. When prompted which tables to use from the source data (there are several) deselect all tables except for FoodVendors and click OK to create the workspace.
2) Connect Reader/Writer
When first created, the Reader and Writer are not connected in this workspace. Connect them by dragging a connection from the output port of the Reader to the input port of the Writer object labelled WayPoint:
Click the expand buttons on the two objects to expose the list of attributes on each:
Now drag a connection between the Reader attribute VendorName and the Writer attribute name. Repeat the process for VendorDescription and description:
The technique of connecting objects like this is called Schema Mapping, and we shall learn more about it later.
3) Run Workspace
Save the workspace so you have a copy of it, then run the workspace by pressing the green play button. The workspace will run and the data written to a Garmin POI dataset.
4) Inspect Data
Go to the FME Data Inspector. Select File > Open Dataset from the menubar. This opens the dialog titled "Select Dataset to View".
Set the format type and select the GPX dataset. However, the GPX format does not record its coordinate system inside the dataset, so to include a background map you must also set the coordinate system (LL83) in this dialog.
NB: Because of the coordinate system limitation for this format, you can't use the Inspect options inside Workbench. That's because the data will be passed directly to the Data Inspector without the option to set the coordinate system. You have to open it manually as above.
Click OK and the dataset will be opened for you to verify that it is correct.
5) Filter Data
All this talk of food is making you hungry. It must be lunchtime. To find somewhere to get a quick lunch filter the data to show hot dog vendors in the city.
CONGRATULATIONS |
By completing this exercise you proved you know how to:
|