span8
span4
span8
span4
Geodatabase readers allows FME to retrieve data from ESRI's Geodatabase structure.Support is provided for translating several aspects of a Geodatabase,including Geodatabase annotation.The following illustrates how to create a basic translation of annotation and features between Geodatabase and AutoCAD DWG.The source datasets are Geodatabase feature classes,one with line geometry (rapid_transit_lines),the other with Geodatabase annotations (rapid_transit_linesAnno).These feature classes are taken from Geodatabase format and written to AutoCAD DWG.
FME treats Geodatabase annotation as line geometry.As such,the insertion point of the annotation feature being read will be based on the annotation's alignment along the corresponding line geometry.For example,if the annotation's alignment is bottom/left,the annotation will be read in with an insertion point corresponding to the bottom/left of the calculated line geometry for the annotation feature.
Rapid Transit Lines (ESRI Geodatabase - File Geodb)
In the above image,we see the contents of our Rapid Transit Line feature class categorically symbolized by individual transit line for easier visualization.
Rapid Transit Lines Annotation (ESRI Geodatabase - File Geodb)
In the above image,we see a visualization of a couple of our Geodatabase annotations in relation to their corresponding features.The annotations we see were generated from standard labels using ESRI ArcGIS software at a scale of 1:10,000,saved as an annotation feature class,and are non-feature linked.
1.Read Source Data - ESRI Geodatabase (File Geodb)*
When adding the Geodatabase reader to your workspace,be sure to add the specific tables from the input Geodatabase (i.e.rapid_transit_line and rapid_transit_lineAnno) as individual feature types.Once the feature types have been added to the workspace,double click on the rapid_transit_lineAnno feature type,click on the Format Attribute tab,and expose/select the following attributes:
These parameters will help to control the text styling as we translate from Geodatabase to DWG.
2.Feature Styling
The transit line features will be written to one layer in our destination DWG file;however,in order to help delineate the individual transit lines,let's apply a unique colour to each transit line.A TestFilter transformer will allow us to separate out the individual line features based on the name of the transit line.Once added,connect the rapid_transit_line feature type to the transformer and edit the TestFilter parameters.Under "Test Condition",double click on the blank space next to "If".This will launch the Test Condition dialog box.Enter a test condition for the first transit line (i.e LINE = Canada Line) and set the Output port to "Canada Line".
Repeat the above process,replacing instances of "Canada Line" with "Expo Line" and "Millennium Line" respectively.Once complete,the TestFilter parameters should appear as follows:
Next,add three DWGStyler transformers to the workspace.The DWGStyler transformer allows for various textual and feature styling.By connecting each output port (i.e Canada Line,Expo Line,and Millennium Line) from the TestFilter transformer to an individual DWGStyler,each transit line feature can by styled in a different manner.For purposes here,double click on each styler individually and choose a desired colour for the various output transit lines.
3.Text Styling
The annotations coming from the Geodatabase must be styled in such as way that allows for more seamless output to the destination DWG.This is where the translation will make use of the parameters exposed in the annotation feature type (see Step 1).
3a.Set Font Style and Text Size
Add another DWGStyler to the workspace and connect the rapid_transit_lineAnno feature type to the transformer.Open the DWGStyler's parameters dialog,set the following values,then click OK:
3b.Set Alignment for CAD Text
Values for vertical and horizontal text alignment are taken from the previously exposed Geodatabase parameters - geodb_v_align and geodb_h_align.These values will be applied to corresponding autocad attributes that will be used to set the text justification in the final DWG output.A TestFilter separates the data based on the vertical alignment (i.e.top,center,bottom).AttributeValueMappers take the resultant output from the TestFilter and applies both the vertical and horizontal alignment to corresponding autocad alignment attributes - setting the final justification for the AutoCAD annotation (via the autocad_justification format attribute).
4.Write CAD Data
Add the Autodesk AutoCAD DWG/DXF writer to the workspace,connecting the output from all DWGStyler transformers in the feature styling section and all AttributeValueMapper transformers in the text alignment section.Once added,open the writer's feature type properties and expose/select autocad_justification from the format attributes tab.Run the workspace.
* The ESRI Geodatabase (File Geodb) reader used in the above example requires that a licensed version of ArcGIS be available to the user.For more information on required license levels,please seeRequired ArcGIS License Types for FME Geodatabase Formats.
Topographic Base Map Data Preparation for Local Government
Performing spatial queries on database tables using the FeatureReader
How do I convert curved text from Geodatabase to Microstation DGN?
Reading Basic Geodatabase Annotation - GDB to DGN
Polygon Within a Distance of Selected Features
Working with Curved Multi-part Geodatabase Annotation
How to Read and Translate all Feature Classes from Multiple Esri Geodatabases
Extract Geodatabase Coded Domain Definitions
© 2019 亚搏在线Safe Software Inc |Legal