Files
Introduction
In this tutorial, we will be transforming City of Vancouver Postal Code data, from Esri shapefile (*.shp) to Esri file geodatabase (*.gdb) format. During the translation, we will also be creating a new Esri feature dataset container to hold the feature class.
The Esri shapefile (forwardsortationareas.shp) denotes the different postal districts covering Vancouver. A forward sortation area (FSA) is a geographical region in which all postal codes start with the same three characters. The first letter of an FSA code denotes a particular "Postal District".
This tutorial requires a licensed version of ArcGIS installed on the same machine as FME in order to create the feature dataset. If you do not have a licensed version of ArcGIS, you can still follow along by using the File Geodatabase Open API writer but you won't be able to create the feature dataset, only the feature class.
Video
This video was filmed using FME 2016, but the functionality is still the same in newer versions of FME.
Step-By-Step Instructions
1. Inspect the Data in FME
The first step is to inspect the ForwardSortationAreas.shp file. Open FME Workbench, start a blank workspace, and add a new reader. In the Reader dialog, type 'Esri Shapefile' as the Format, then browse to the ForwardSortationAreas.shp file for the Dataset. Click OK to add the reader to the canvas.
Now, to view the data, click on the ForwardSortationAreas reader feature type on the canvas to open the mini toolbar. Then, on the mini toolbar, click the View Source Data button to view the data in the Visual Preview Window.
We have area features representing the forward sortation areas. There is a single attribute (CFSAUID) that identifies the forward sortation area, which is the first 3 characters of the Postal Code.
2. Inspect the Data in ArcCatalog
Let's examine the CommunityMapping.gdb file in Esri ArcGIS ArcCatalog.
In ArcCatalog, we can see that there are existing feature classes, but no feature datasets. As part of the translation, we will want to add the ForwardSortationAreas feature class to a newly created feature dataset called “Postal”.
3. Set the Output (Writer) Format to Esri Geodatabase
Back in FME Workbench, we need to add a writer to the canvas. Click on "Add Writer" and, in the "Add Writer" dialog box, select "Esri Geodatabase (File Geodb)" for the format.
If you do not have ArcGIS installed on the same machine as FME, the File Geodatabase version of the writer will be unavailable. You can instead use the Open API File Geodb version, but the option to create a feature dataset will be unavailable.
Then, for the Dataset, browse to the CommunityMapping.gdb. Ensure that the Feature Class or Table Definition is set to Copy from Reader and then click OK.
4. Modify Output (Writer) Feature Type Properties
Connect the ForwardSortationArea reader feature type to the new writer feature type. Then, open the writer feature type parameters by double-clicking on it. By default, the translation creates a new feature class named ForwardSortationAreas within the geodatabase. However, we would like to nest this translated feature class inside of a newly created feature dataset named “Postal”.
First, set the Geometry to geodb_polygon, so the feature class will be the correct geometry. Then, to create the feature dataset, expand Table Creation Parameters, and then for Feature Dataset type in Postal. Click OK to confirm the changes.
5. Click the Run Button on the Toolbar
Run the workspace by clicking on the green play button. This carries out the translation.
6. View the Feature Dataset & Feature Class in ArcMap
In ArcMap, refresh the view, and you should now find a Postal feature dataset containing the ForwardSortationAreas feature class.
Data Attribution
The Forward Sortation Areas data set provided here is sourced from Statistics Canada's 2011 Census Digital Boundary Files, 2013. Reproduced and distributed on an "as is" basis with the permission of Statistics Canada. © This data includes information copied with permission from Canada Post Corporation.