Author: Ciara Beddy, IMGS Senior GIS Engineer
Welcome to part one of Time Saving Tips in FME!
Using FME daily means you pick up on tips and tricks to make your daily tasks run quickly, smoothly and generally just make your FME life a bit easier. This blog has been a long time coming, for the last year I have diligently kept note of some of the tools I use in Desktop that save time and because it’s nice to share I am departing these tips to you.
Functions may seem complex as they allow you to delve into the heart of FME’s core and fly solo so to speak. Using them means you are now stepping out on your own and calling functions that are in use in many of the transformers and that seems a bit daunting.
But this really is a smart move on your behalf, by using Feature Functions you can build processing directly into your attribute creation and save yourself the effort of placing multiple transformers. Really you can do A LOT with the text editor in FME, use it to build your queries and send them directly to the engine yourself instead of relying on transformers. When you use FME Functions as part of your attribute manager or attribute creator each resulting value is output as an attribute.
For example, @Area function calculates the area of a polygonal feature eliminating the need for the AreaCalculator. The @Count provides a mechanism for generating unique numbers for features during a translation eliminating the Counter. @Timestamp returns the current time and date, so you guessed it no need for a Timestamper.
Here are some of the common FME Functions I use in my workspaces, why don’t you try them out next time and see how simple it is to develop your own results without the use of multiple transformers.
Also for those experienced FME users out there did you know you can copy and paste a transformer into an open Text Editor and review the content, this allows you to see what really is at work inside the transformers you use.
The ability to save workspaces as templates was added in 2011 though it still isn’t as widely used as I would like! A template is basically a saved workspace, with the inclusion of the data required to run. Using a template means you can bundle everything together and provide to another user….very handy for sharing workspaces with your colleagues.
These templates are given the extension .fmwt, using the template is very simple just open it in Workbench. If data was included in the template file then it will be extracted, stored to a temporary location and the workspace paths updated automatically making it ready to just hit run.
There are many possibilities with templates, they can be great to give out to other FME users as predefined translations. Or when looking for support from the team at IMGS if you provide us with a template you will certainly rise of the top of our to-do list and receive quicker solutions!
While on the subject of templates, if you are reading data from a database and the end user of the template does not have access to this data source then it’s time to introduce a recorder transformer.
The recorder is a nifty little transformer that saves a copy of all the features that enter it and writes into a FME Feature Store file. It’s really simple to use;
- In your workspace identify the data you want to export.
- Add a Recorder transformer
- Connect the Reader feature types you need to export to the Recorder transformer
- Run your workspace and the data is stored to the FFS file at your specified location
Now you can send a copy of your workspace and the FFS file. The end user can then add a Player transformer to your workspace and play back your recording – as if they were reading directly from your database. Everyone wins!
Most people probably know everything they need to know about the data fanout, it has been around a long time. But when it comes to listing features that save you time and effort I have to include the fanout. This is a way you can split your output data into separate layers/files based upon an attribute value.
It’s easy to set, just go to the writer properties right click and pick an attribute value. So your data output will be divided on the fly as it writes to your destination.
For example, I want to create a set of contours from my LIDAR dataset. But I want to have a separate output file for every elevation. If I set the output to fanout by the value of the elevation my results will be quite different.
Instead of one file containing all contours your destination output will now contain multiple files one for each elevation level.
People always say there are no shortcuts in life, well that’s not quite true. Here are some custom keyboard shortcuts which I promise will make your life easier, no risk involved!
|Add New Bookmark||Ctrl+b|
|Zoom to 100%||Ctrl+0|
Another one of my favourites is the quick change from zoom in to select. Try it yourself, Zoom in and right click this will resets the cursor back to the select function. It’s the simple things in life.
Stay tuned for the follow up part two blog of Time Saving Tips in FME which will be published next month.