span8
span4
span8
span4
feature-linked-annotation.fmwt
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.
How it works in FME: If the relationship for the annotation exists in the geodatabase,then FME will automatically create the annotation and the relationship.The FME Geodatabase writer will retrieve the object ID of the new feature and then write the annotation feature and the relationship linking to it.The result is that you only need to write the to the primary feature class (Zones in the example below) and the one FME feature contains enough information to write two features: one annotation feature (ZoneNames) and one primary feature (Zones).The annotation created is based on the annotation rules you've created in your target geodatabase in the annotation feature class (ZoneNames)
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) 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,设置事务类型编辑会话。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) 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 clickOK.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,设置事务类型编辑会话。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) 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 seeRequired ArcGIS License Types for FME Geodatabase Formats.
When converting one geodatabase to another,it is also possible to create new feature-linked annotations in the same way as described above.However,in some cases you may have edited your annotations and you want to preserve those edits.To do this you need to link the source annotations back to the primary feature and set the geodb_
In this example,the source geodatabase has the feature class Zones and feature-linked annotation ZoneNames.FME (2018.1 and higher) will automatically add geodb_text_feat_class_name to annotation features.In earlier versions of FME you had to set this to the name of the annotation feature class,i.e.ZoneNames.The workspace uses:
The workspace is attached:geodb-to-geodb-featurelinkedanno2017.fmwt
Converting from Geodatabase Format
Converting to Geodatabase Format
Viewing and Inspecting Geodatabases
Writing ArcGIS Geodatabase Attachments
Working with Curved Multi-part Geodatabase Annotation
Tutorial: Getting Started with Geodatabase
Introduction to Working with Geodatabase Relationship Classes
Setting FONT SIZE explicitly in Geodatabase Annotations
Working with Geodatabase Field Aliases: Altering Alias Values
How do I convert curved text from Geodatabase to Microstation DGN?
© 2019 亚搏在线Safe Software Inc |Legal