FME Version
Introduction
The following exercises will cover how to export from Smallworld to FME Feature Store (FFS), Esri Geodatabase and Autodesk AutoCAD 3D.
Step-by-Step Instructions
Export to FME Feature Store (FFS)
FME Feature Store (FFS) is the internal FME format. It’s useful to write Smallworld objects to FFS as this format maintains much of the complex structure of the Smallworld data, including multiple geometries and sectors. If you ever need to send Safe an example of your Smallworld data, this is the best format to use.
This example also shows how to preserve the Smallworld multiple spatial columns in an FFS dataset.
1. Generate Workspace
Start FME Workbench and on the Start tab, select the option to Generate workspace.
Reader Format: | Smallworld 4/5 |
Reader Dataset: | localhost:30000 |
Reader Coord System: | OSGB-GPS-2015 |
2. Set Service: FMENOFACTORY
On the Parameters dialog, set the Service: FMENOFACTORY to preserve the multiple spatial columns.
3. Select Tables to View
The Select Feature Types dialog appears.
Select each of these feature types:
- electricity.cable
- electricity.joint
- electricity.substation
- electricity.supply_point
- gis.min_road
Click OK to close the Select Feature Types dialog
4. Use Search Envelope
Check the Use Search Envelope and enter:
Minimum X: | 545000 |
Minimum Y: | 259000 |
Maximum X: | 547000 |
Maximum Y: | 261000 |
Note that these values are in meters to match the British National Grid coordinate system.
5. Set the Reader Defaults
At the bottom of the Smallworld 4/5 Parameters dialog, select the Defaults option and set “Save as My Defaults”. This will save your parameter settings for future use.
6. Writer Parameters
Writer Format: | FME Feature Store (FFS) |
Writer Dataset: | C:\FMEData2017\Output\Cambridge.ffs |
Click OK to generate the workspace.
7. Run and Inspect Output
Run the translation. Inspect the output in the FME Data Inspector. Use the select tool to select the Union Lane LV cable.
Notice the path geometry and the path segments that represent the original chain and chain sectors from Smallworld.
Select one of the Supply Point features. Notice how the multiple geometries of the Smallworld object are represented by an FME aggregate.
Writing to FFS is essentially a “dump” of Smallworld objects. If the translation to FFS fails, then there are probably errors in the Smallworld data.
Using FFS files is a good way to send “raw” Smallworld data to the Safe Software support team if you need help with your Smallworld translations.
Export to Esri File Geodatabase
The Esri Geodatabase format supports only one geometry per feature class. When the Smallworld FME service is used with the Esri writer, FME Workbench automatically will generate separate reader and writer feature types for each geometry on the Smallworld object.
1. Generate Workspace
Start FME Workbench. Select the option to Generate workspace.
Reader Format: | Smallworld 4/5 |
Reader Dataset: | localhost:30000 |
Reader Coord System: | OSGB-GPS-2015 |
Parameters > Service: | FME |
Parameters > Table List: |
|
Parameters > Search Envelope: |
|
Writer Format: |
Esri Geodatabase (File Geodb Open API) |
Writer Dataset: | C:\FMEData2017\Output\Cambridge.gdb |
Writer Coord. System: | <same as source> |
You'll see several feature types for each Smallworld object, cable_centreline_dv/hv/lv. You only need to select the object names, i.e. electricity.cable and FME will automatically include their related geometries.
Be sure to specify the Smallworld reader Service: FME and the reader coordinate system of OSGB-GPS-2015, as shown.
Click OK to generate the workspace.
2. Run and Inspect Output
Run the translation. Inspect the output in the FME Data Inspector.
Notice how separate feature classes are created in the Esri File Geodatabase for each geometry on the single Smallworld object.
Use the inspection tool to select the Supply Point location and then the Supply Point label point. Observe that these two features representing the same Smallworld object are related by id.
3. Modify Workspace (Advanced)
This is typically where you’d do some more sophisticated schema mapping to represent your data in a more structured way in the Esri Geodatabase. This might include:
- Merge Cable high and low voltage features
- Map HV & LV to subtypes or domains
- Create annotation feature classes
- Relationship feature class
See the workspace: "smallworld2-completeadvanced.fmw" for some ideas.
The Esri Geodatabase (File Geodatabase Open API) writer only has limited support for point, lines and areas. To gain the full benefits of the Esri Geodatabase, you can use the Esri Geodatabase (File Geodb) writer, provided you have ArcGIS installed and an ArcGIS license. For more details on working with Esri Geodatabases, look at this tutorial.
Export to Autodesk AutoCAD
AutoCAD supports only one geometry per feature, but you can have features with different geometries in the same layer. When the Smallworld 'FME' service is used with the AutoCAD writer, FME Workbench automatically will generate separate reader and writer feature types for each geometry on the Smallworld object.
1. Generate Workspace
Start FME Workbench. Select the option to Generate workspace.
Reader Dataset: | localhost:30000 |
Reader Coord System: | OSGB-GIS-2015 |
Parameters > Service: | FME |
Parameters > Table List: |
|
Parameters > Search Envelope: |
|
Writer Format: |
Autodesk AutoCAD RealDWG DWG/DXF |
Writer Dataset: | C:\FMEData2017\Output\Cambridge.dwg |
Writer Coord. System: | <same as source> |
Parameters > Attribute Output | Extended Entity Data |
Note: FME 2017 32bit no longer supports AutoCAD 3D Object . These formats are only available on 64bit FME in FME 2017.
Click OK to generate the workspace.
2. Run Translation
Run the translation and inspect the output in the FME Data Inspector.
This is typically where you’d do some more sophisticated schema mapping to represent your data in a more structured way in the AutoCAD file. This might include:
- Merge Supply Point high and low voltage features
- Merge Supply Point labels into the same layer as the Supply Point locations
- Use an AutoCAD template file to define the structure of your AutoCAD file
- Use the DWGStyler to add symbology such as blocks, line styles etc.
- Write a coordinate system .prj
See the workspace smallworld3-completeadvanced.fmw for some ideas on expanding your workflow. For more ideas on working with AutoCAD data see this tutorial.
Data Export Summary
In summary, it’s pretty straightforward to extract data from GE Smallworld. Gotchas are:
- Make sure the FME connection service is running in Smallworld
- Coordinate system – remember to select the coordinate system. For Smallworld 5 you're using the application coordinate system.
- Multiple vs. Single geometry export using Service: FMENOFACTORY or FME respectively
- Schema mapping of the results to the output schema
Comments
0 comments
Please sign in to leave a comment.