Yes, FME can translatea lot of data formats, and yes, it can performa lot of transformationson your data… but after all those hundreds of readers, writers, and transformers, what if it still doesn’t support the functionality you need?
There are a few ways users can extend FME with more readers, writers, and transformers. The traditional way is to code a plug-in using one of the various SDKs that comes with FME. This and other methods are mentioned below. Now, as of FME 2016,if you have a third-party command-line tool that can read, write, or manipulate data, you can integrate it with FME by building an ordinary workspace.
More specifically, you would use the FeatureReader and/orFeatureWriterand build a custom transformer. This brings the tool’s full capabilities into the FME workflows we all know and love, and hides the tool’s complexities beneath a friendly dialog box.
Check out theFME Hubto see a few custom formats and transformers other FME users have created.
I want to transform my data in a way FME does not support.
If you have a command-line tool that processes data in this way,create a custom transformer. Your custom transformer should collect parameters, use the FeatureWriter to save the data in the format expected by the tool, build and execute a command line, then read the processed features back with the FeatureReader.Learn how to do this.
I want to read a format FME does not support.
If you have a command-line tool that can read the format and save it as something FME can read,create a custom transformer that will act as a Reader. Your custom transformer should collect parameters from the user, build the command line and execute it, then use the FeatureReader to read the data created by the command-line tool. The data features will leave your custom transformer as though imported by any standard FME reader, and you can do any manipulation you want and write to any supported format.Learn how to do this.
I want to convert my data to a format FME does not support.
If you have a command-line tool that can save to the format,create a custom transformer that will act as a Writer. Your custom transformer should collect parameters, save the data features to temporary file(s) with the FeatureWriter, then assemble a command line and execute it on the temporary file. The results will go to the location specified by the user, just like a normal FME writer.Learn how to do this.
Some tools and libraries to consider.
- LAStools
- ImageMagick
- Orfeo ToolBox
- FreeCAD
- Check outthis Wikipedia list of free graphics software— lots of possibilities for open-source toolkits here that work with a variety of 2D and 3D data.
Functionality with some of the above has been integrated with FME by our users and theFME wizardhimself (this how-to guidehas downloadable workspaces for the examples shown in the above images).
If you have a toolkit or library you want included in this list, leave a comment and I’ll add it!
如果我没有第三方ol for the functionality I want?
To read/write simple data: Create a custom format
If you know how the format stores data, you can create your own reader as aCustom Format. (Seecustom format examplesin the FME Hub.) To do this, use existing readers (most often CSV, Text, XML) along with a few transformers to restructure the data, then save the Workspace as a custom format. Note that custom formats are limited to readers, and a custom transformer as discussed above offers a lot more flexibility in terms of where you can place it in your workspace.
For coders: Use scripts
You can usePythonorTclscripts within a workspace, viastartup/shutdown scriptsand the following transformers:
For serious coders: Use the FME Plug-in SDK
Developers, you can code your ownreader/writerortransformerwith the FME Plug-in SDK. Lots of our partners use this to add new functionality to FME. These days I prefer not to touch coding with a 39½-foot pole, so I’ll leave you with those links and move on…
What if I want to integrate FME with my own application?
If you are actually looking to extend your own application with FME (i.e. having FME directly integrated into your software, like theFME Exporter for Revitor theEsri Data Interoperability extension),you can develop a plug-in to read/write your formator run an FME Workspace.
*
Custom transformers make FME’s potential truly limitless. FME already supports hundreds of formats and transformations, and now the FeatureReader and FeatureWriter bring a whole lot more within reach. By creating a customreader or writer, you can leverage the full power of FME for any data you have, regardless of format. By creating a customtransformer, you can bring even more transformation power to the formats FME already supports.What third-party tools would you like to leverage with FME?
To learn more about integrating third-party tools with FME,register for next week’s LiDAR webinar.
Tiana Warner
Tiana is a Senior Marketing Specialist at Safe Software. Her background in computer programming and creative hobbies led her to be one of the main producers of creative content for Safe Software. Tiana spends her free time writing fantasy novels, riding her horse, and exploring nature with her rescue pup, Joey.