Although annotations are stored in a separate feature layer in a Geodatabase, they can be linked to other features through feature-linked annotations. Feature-linking occurs when there is a relationship between an annotation feature class and some other feature class.
Linking is carried out by defining a relationship through a common attribute. The relationship must already be defined in the Geodatabase before writing the data.
If the feature being linked to by the annotation has not yet been written, then it is possible for the Geodatabase writer to write the feature, retrieve the object ID of the new feature and then write the annotation feature linking to it. The result is that the one FME feature contains enough information to write two features: one annotation feature and one non-annotation feature.
Zones (MapInfo TAB)
In the above image, we see a visualization of the Zones TAB file and its accompanying attributes. The ZoneName attribute will provide the values for the feature-linked annotation.
1. Set Up Destination Geodatabase
As mentioned above, feature-linking is carried out by defining a relationship through a common attribute. As such, it is necessary to determine the relationship between your features and annotations in a destination Geodatabase prior to writing the data. This process would entail using ArcGIS to create an empty feature class to hold the Zone features, an empty feature-linked annotation class (designed with the required scale, placement properties, text size, etc) to hold the Zone annotations, and a relationship class to link the two together (Note* Generating a feature linked annotation class in ArcGIS should create the necessary relationship class).
For purposes here, a previously created Geodatabase template file has been applied to the attached workspace and will be used during the translation to apply the required schema to our destination Geodatabase. The template file in this example is called `DESTINATION_GDB_TEMPLATE.XML`, and is set as the "Template File" parameter for the writer.
2. Read Source Data - MapInfo TAB (MITAB)
Zoning feature geometry and annotations are read from the TAB source file using the MapInfo TAB (MITAB) reader, providing the features and annotations for the destination feature classes (Zones and ZoneNames) in the Geodatabase referenced in Step 1. The annotation values will be provided from the ZoneName attribute in the source data.
3. Write Geodatabase Features and Feature-Linked Annotation
Add the ESRI Geodatabase (File Geodb ArcObject) writer. As mentioned above, rather than create the Geodatabase from scratch, we’ll use an ArcGIS XML Workspace Document. This template was created by exporting it from an existing Geodatabase. In this case, the template file was exported from a Geodatabase containing a feature class, feature-linked annotation class, and relationship class. A Writer parameter sets the template to use in creating the Geodatabase and can be set when adding your Geodatabase writer.
Once added, connect the output of the MapInfoTAB reader to the Geodatabase writer. In the Navigator window, set the transaction type to Edit Session. We are dealing with complex features that can only be edited in an Edit Session or Version. In addition, ensure that Overwrite Existing Geodatabase is set to No.
Adding the Writer If You Are NOT Using A Template File:
If a template file is not available and a destination Geodatabase was created from scratch as mentioned in Step 1, when adding the ESRI Geodatabase (File Geodb ArcObject) writer, be sure to set the Add Feature Type(s) section of the writer dialog to "Import from Dataset".
When prompted, set the format and select the Geodatabase created in Step 1 and click OK. FME will scan the Geodatabase to confirm what tables exist. When prompted with a list of classes, select only the feature class that you wish to populate with features.
Once the writer is added, connect the output of the MapInfoTAB reader to the Geodatabase writer. In the Navigator window, set the transaction type to Edit Session. We are dealing with complex features that can only be edited in an Edit Session or Version. In addition, ensure that Overwrite Existing Geodatabase is set to No.
* The ESRI Geodatabase (File Geodb ArcObject) writer used in the above example requires that a licensed version of ArcGIS be available to the user. For more information on required ArcGIS license levels, please see Required ArcGIS License Types for FME Geodatabase Formats.
1 Person is following this .