span8
span4
span8
span4
Completed Workspace as an FME Template
A common scenario that one may encounter when working with an Esri file geodatabase is to receive a set of data which contains changes to the features and attributes of feature classes in an existing file geodatabase. The following example will show how to use geodatabase functionality in order to update existing geodatabase features with an edited shapefile dataset.
In the above image, we see a visualization of the original/destination feature class showing the current and required location of three drinking fountains.
In the above image, we see a visualization of the updated Drinking Fountains Shapefile and its accompanying attributes.
1. Create Destination File Geodatabase
Using the update functionality of a file geodatabase assumes that the destination geodatabase to be updated already exists. For purposes here, an XML workspace document has been provided so that the required file geodatabase needed for this example can be imported into ArcGIS. In order to do so, within ArcCatalog or ArcMap, create a new, empty file geodatabase. Once created, download the provided XML template file (refer to downloads section) and import the template into the empty geodatabase as an XML workspace document (select the Import Data option).
2. Read Source Data
Drinking fountain geometry is read from the shapefile source file with the Esri shapefile reader. This shapefile contains the updated feature location for the three drinking fountains that are misplaced in the destination feature class.
3. Update Maintainer Attribute
The AttributeManager will be used used to update the value of the "Maintainer" attribute from that of the Parks department to the Engineering department as you received additional information from management indicating that the responsible department for maintaining those particular drinking fountains has changed. Connect the Shapefile reader to the AttributeManager and in the AttributeManager properties, simply type "Engineering" for the Attribute Value of the Maintainer attribute. You will notice that the Action for the attribute will automatically switch to "Set Value".
4. Update Original Feature Class
Add the Esri Geodatabase (File Geodb Open API) writer to the workspace. For the writer dataset, navigate to the geodatabase created in step 1 and for Feature Class or Table Defintition, select "Import from Dataset". The Import from Dataset option is selected because the feature class already exists in the geodatabase and we intend to update it.
When prompted, set the format and select the file geodatabase as noted in the paragraph above (it may – should – already be set by FME). FME will now scan the geodatabase to confirm what tables exist. When prompted with a list of classes, select DrinkingFountains only.
Once the writer has been added to the canvas, double click on the writer feature type to enter the Feature Type Properties dialog. Click the Format Parameters tab and type "FountainID" in the Update/Delete Key Fields section.
Save and Run the workspace and inspect the DrinkingFountains dataset. You should now find that the erroneous drinking fountains have been moved into the correct position. If you can’t find the new drinking fountains, they should be located close to the following locations (coordinate values are in UTM):
Fountain ID | X Coordinate | Y Coordinate |
24 | 491772 | 5459404 |
49 | 491288 | 5459477 |
69 | 492418 | 5459028 |
Writing Geodatabase Relationship Classes
Working with Geodatabase Domains: Creating A Coded Domain
Working with Geodatabase Subtypes: Creating A Subtype
Working with Geodatabase Metadata: Writing/Updating Metadata
Converting to Geodatabase Format
Converting from Geodatabase Format
Viewing and Inspecting Geodatabases
Tutorial: Getting Started with Geodatabase
Writing ArcGIS Geodatabase Attachments
Working with Geodatabase Field Aliases: Altering Alias Values
© 2019 Safe Software Inc | Legal