FME Evangelism Weekly Issue #9
- FME User Conference Follow Up
- The Generic Writer and Published Parameters
- Workspace Runner Transformer Example
- Raster to Vector Centreline Extraction
- Post-CD Fixes
A big thank you to all those users who came to the recent conference and made it such a success. We have a number of downloads available as a follow up:
- You can now download all the presentations from: http://www.safe.com/fmeuc/presentations/index.php
- Much to Tyson’s embarrassment, the FME Idol audition video is now up on YouTube: http://youtube.com/watch?v=EJhK9pWv3ao
- The FME Idol challenges are on fmepedia: http://www.fmepedia.com/index.php/FME_Idol_2008
One of the questions from the User Conference advanced training was “in the Generic writer, how do I restrict output to a specific list of formats?” At the time I wasn’t sure you could do this, but then Dale and Don revealed the secret and I got it in a flash of light: Shared Published Parameters.
The key is to create a new independent published parameter (aka custom parameter or standalone parameter) – of type choice – in which you define your list of required formats. The list should use the short version of their name, which is what the generic writer recognizes.
Then in the generic writer, locate the Output Format parameter, right-click it and choose Unpublish Parameter, then right-click again and choose Set to Published Parameter. Select the new independent parameter you created.
Now when you prompt and run the translation, the list of generic formats to write to will consist only of those you included in your independent parameter.
A demo movie demonstrating this technique can be found on the FMEGuru YouTube channel:
http://www.youtube.com/watch?v=T1bxHFvRfHo (according to YouTube stats it had 4500+ viewings in the first 24 hours!)
What’s going to be really good in FME2009 is that there will (hopefully) be a new parameter type that is both a choice and a lookup table – so instead of providing a list of formats in their short name (KML, IGDS, GEODB) a user can create a list of full names (Google Earth KML, MicroStation Design, Personal GeoDatabase) and a lookup table that maps them to the correct short name form. This makes for a more user-friendly parameter selection dialog, without having to do any additional processing.
- Author batch processing workflows with Workbench
- No need to write batch scripts in an external language
- Use metadata available in Workbench environment to control the script
The method – which a number of users have asked about – involves the use of two new-for-2008 functions: The Path format reader and the WorkspaceRunner transformer.
For batch processing, the Path format reads a list of the datasets to be processed, and the WorkspaceRunner calls the workspace in which they are to be processed.
You can find an example of this technique on fmepedia.com The same technique can be used on an FME Server installation using the ServerJobSubmitter transformer.
4) Raster to Vector Centreline Extraction
Although FME doesn’t have a specific tool for converting raster to vector, there are a number of functions that can be used, as Dmitri demonstrates in this excellent example.
“Although generally I am quite skeptical about this, there are perhaps some areas where we can be quite good with current FME capabilities. A user suggested they could use it for digital maps that never existed on paper – rasters (maybe in PDF) generated by some software. I tried a map from Google Maps for extracting road centerlines and – if cartographic requirements are not very high – these results are quite acceptable.”
The technique relies on pixels of a known colour, which can be a problem with photo images, but not so difficult on a more standard map image. Problems are caused by anti-aliasing and horizontal labels which introduce noise, but the cleanup is generally less onerous than digitizing everything from scratch.
See Dmitri’s example on fmepedia at:
5) Post-CD Fixes
The build number for the CD release of FME is 5197. However, because – inevitably – the 2009 development process will throw up fixes we would like to have been in FME2008, what we hope to do is make available approximately monthly updates to the 2008 release build. I’m not sure what these will be called, but in essence they will be like service packs.
We’ll keep you informed about when these new builds are released, and what issues we are wanting to fix. So far the only problem worthy of note is:
Reading Big-Endian WKB
This problem is a failure in reading Big-Endian WKB data. I understand it shouldn’t be a widespread problem, since any WKB that FME has generated will be Little-Endian. Nevertheless, it seems likely a fix for this will be back-ported to 2008 (probably build 5198).
- The generic writer was getting some output file extensions wrong. This is fixed in build 5191+
- Problems reading Oracle raster pyramids are now fixed in build 5186+
- Not one of our movies, but see how one user gives a lesson on AutoCAD Map 3D Data Connection Using FME: http://www.youtube.com/watch?v=dZ8qrBq-7qc
This week’s Weekly was written to the tune of…
Belgium’s finest scrabble-playing punk musician, Plastic Bertrand and his 1978 hit, Ca Plane Pour Moi.
This one can really implant itself in your head. If it’s all a bit too fast, then here’s the lyrics in both French and English.