Archive for June, 2008

FME Evangelism Issue#13

Introduction
Hi folks. This is my first true posting to the FME Evangelist blog. In fact I’m on vacation at the moment, but can set a date for this to be published automatically. Ain’t technology great?!

Anyway, this issue has a nice mix of FME2009 updates, example workspaces, important notices, and an FME Server demo.

Cheers,

Contents
1) FME2009 Beta: Update
2) Logger Transformer: Feature Type in FFS Output
3) PointDisperser Customer Transformer
4) FME and ArcGIS v9.2 SP5
5) FME Server: Data Streaming Example
6) StringAttributeRounder Custom Transformer
7) VirtualEarthTiler: Spherical Mercator Coordinate System
8) Chopper Transformer: Overhaul for FME2009

FME2009 Beta: Update
Issue #12 noted that we were aware of a number of performance issues with the first FME2009 beta. I’m happy to say that all known issues are now reported as resolved and the current build (5557) back to normal.

Logger Transformer: Feature Type in FFS Output
The Logger transformer already had an example of its use on fmepedia, but with a number of updates since then (July 2006) it’s worth re-visiting this unassuming little transformer.

The main change you’ll find since that example was created is that features written to the Logger are now automatically written to a spatial Log file in FFS format. This is a great for visually inspecting features, rather than trying to interpret their representation in a plain text log file.

The other change is something new for FME2009; the ability to specify the feature type to which to write the spatial log features.

Previously the features sent to a Logger would go into a feature type named after the preceding transformer, for example Tester->Failed.

However, in FME2009 you are able to specify the feature type name, and so can be more descriptive – for example “Bad Address Data”, or “Unused Line Features”.

.

Above: The Feature Type to Log setting in the Logger transformer in FME2009

Visit the Logger example on fmepedia to see the updated version of the workspace.

Did You Know?
Did you know that FFS datasets come in both file and folder based flavours?

For me, the Logger transformer is particularly nice to use because multiple Loggers in the same workspace write their data to the same file-based dataset.

Compare this to the FFS format writer, where different feature types write to different FFS files within a folder (folder-based dataset).

There are benefits to both, but my preference is for a tidy, single-file dataset, so I choose the Logger every time to write my FFS files.

Below: The Logger transformer produces a file <workspaceName>_log.ffs…

…and that single FFS file contains two different feature types (Invalid Day and Invalid Month):

PointDisperser Custom Transformer
The PointDisperser custom transformer is a tool to create a form of structure suitable for thematic mapping. Where a number of points all belong to a certain parent location, the transformer can disperse them around the parent in a sort of radial diagram.

With a little more work the points and lines can be easily turned into coloured nodes and sectors.
These features look very effective when overlaid on a map background using some form of mapping or visualization tool.

In line with the concept of “eating one’s own dog food“, at Safe we use this tool for mapping sales figures, where the parent point represents a country or city, and each node represents an FME sale at that location.

No doubt you could envisage similar uses for your organization.

FME and ArcGIS v9.2 SP5
This is an important note for users of the Geodatabase readers and writers who upgrade their ArcGIS v9.2 installation to SP5.

FME 2007 and 2008 – which were both created before the release of SP5 – are both adversely affected by this upgrade. In particular you may receive a specific error message:

“The procedure entry point SgCodeFree could not be located in the dynamic link library sg.dll.”

Of course this will also impact any SpatialDirect and FME Server installations that use these readers and writers.

The quick-fix we have for this problem is to copy a number of files from the ArcGIS installation, and paste them into the FME installation folder, overwriting files of the same name.

The files are:

  • sde.dll
  • pe.dll
  • sg.dll

No problems have been reported using this workaround, but we don’t guarantee it because it’s a newer library than what FME was compiled against.

The long term fix is for us to issue updated versions of both FME2008 and FME2009, which we intend to do in the near future. If you want to be notified when this happens please email support@safe.com and quote PR#15697

NB: Only update the DLL files if you get the above error message. They should not need to be changed for any other reason.

FME Server: Data Streaming Example
Data streaming is a service provided by FME Server that delivers data right into an external application.

This example - which you may have seen as a demonstration before - is a very good illustration of that technique, and one of our favourites here at Safe.

Source data - in this case a live feed of Earthquake data from the USGS (GeoRSS format) - is translated into KML using a workspace that also restructures the data from simple points into extruded columns.

By uploading the workspace to FME Server the output data can be streamed directly into Google Earth – by anyone! The end user does not need FME to be able to visualize this data as all of the processing is done on an FME Server installation.

You can do this too! By simply clicking on this URL (or entering it into a web browser):
http://fmeserver.com:80/fmedatastreaming/translate/Samples/earthquakesextrusion.fmw

…you’ll make a call to an FME Server, which will carry out a translation, convert the data to KML, and stream it straight into Google Earth on your computer.

Above: The output viewed in Google Earth

The source data doesn’t need to be a live feed (as it is in this example). It can be any source data that you have on your system and that FME Server has access to - for example your spatial database (SDE, Oracle, SQL Server, etc). This means any person in your organisation can view your data - in Google Earth - immediately, and without you having to translate it for them.

Also, you can use more than one source dataset, in effect creating a Google Earth mashup with very little effort.

For example, you could merge a set of delivery routes with a live traffic alert feed (http://developer.yahoo.com/traffic/rss/V1/index.html) to show where a delivery schedule could be interrupted by traffic congestion.

StringAttributeRounder Custom Transformer
The AttributeRounder transformer is great for rounding the values of attributes (for example 123.456789 to 123.46) – but not so good when the attribute contains some sort of alphabetic character (for example 123.456789m). But rounding this form of text can be a requirement when the data is annotation read directly from a cartographic input.

The StringAttributeRounder is a custom transformer created in order to allow users to round off numeric attributes that are contained within a longer string.

The user can choose whether the text part of the string is at the start or end of the attribute.

For example:
Start Attribute: m234.5555
Text Part At: Start
Decimal Places: 2
Result Attribute: m234.56

Start Attribute: 234.5555m
Text Part At: End
Decimal Places: 2
Result Attribute: 234.56m

The transformer also handles <space> characters, for example:

Start Attribute: x y234.5555
Text Part At: Start
Decimal Places: 2
Result Attribute: x y234.56

If you want to use the transformer, or are interested to see how it works, then visit the StringAttributeRounder page on fmepedia. It requires FME2008, though there is also a version specifically for FME2007.

Above: In brief, the transformer strips off the text part of the string (from either the start or end), rounds off the remaining number, then glues it all back together with a Concatenator.

There is one specific best practice technique to look out for; the AttributeExpressionRemover transformer is used to clean up any temporary attributes created during the process, so the user is not distracted with extra data on the output.

VirtualEarthTiler: Spherical Mercator Coordinate System
A couple of users have experienced a problem with the VirtualEarthTiler in the last week, so I wanted to try to explain the cause (neither obvious nor simple), how to workaround it in FME2008, and how it has been resolved with FME2009.

The VirtualEarthTiler is used to turn a raster feature into a number of smaller tiles for use in Virtual Earth. It essentially does the same job as the MSR MapCruncher, but without the registration process.

The problem experienced was that the tiles that got written were not square; instead of being 256×256 they would be something like 400×256. To get square tiles required the ‘World File’ option to be turned on, posing the puzzling question “why should a world file make any difference to the size of the actual raster file itself?”

There are in fact two issues causing this to happen:

Issue One
Tiling data for VE (or GE) is more complicated than you’d think. Because source data is in plain LL and Virtual Earth uses a spherical coordinate system the output ends up with a latitude distortion. This distortion exhibits itself as non-square pixels in the raster output.

For example, in a test workspace I sent the VirtualEarthTiler output to a Logger and got this:

Number of Rows : 256
Number of Columns : 256
Cell Spacing : 0.0003433,0.00029677

As you can see, the cell spacing is different making these cells/pixels non-square in shape.

However the PNG format (as with many other raster formats) only has a single “field” in which to record cell spacing; i.e. it is assumed that X spacing is the same as Y. Therefore, because the PNG writer can’t write non-square cells, the data is resampled to make the cells square.

It’s this resampling that causes the overall size of the file to be changed from the expected 256×256.

Issue Two
FME resamples the data to create square cells because, if it did write non-square cells, how would another application know that there is odd spacing?

The answer is the world file.

That’s why writing a world (WLD) file makes a difference to the output.
FME is happy to write non-square cells provided there is a world file, because the world file tells other applications what the cell spacing is.

So, if you do write the world file then the cells will be non-rectangular, but you MUST keep the WLD file with the PNG else any application that reads the PNG will not know what the cell spacing is and so will not show the raster in its correct size and location.

FME2008
So, when you are using FME2008, you MUST have the ‘write world files’ setting turned on in your writer, and you MUST store the world files alongside the tiles for Virtual Earth to interpret the data correctly.

FME2009
Getting to the real point of this topic, FME2009 supports a new coordinate system called the Spherical Mercator, aka Web Mercator, EPSG:3785 or EPSG:900913*

Spherical Mercator is the coordinate system required for correct tiling of data. So convert your source raster to this coordinate system using the Reprojector, pipe it into the VirtualEarthTiler and you will get… tiles with perfectly square cells; without the need for world files either.

Problem solved.

* Get it? No neither did I for the longest time. I must be a n00b.

Chopper Transformer: Overhaul for FME2009
Many people who use the Chopper transformer do so to convert lines into points. However, did you know it can also be used to chop polygons into smaller area features? This might be useful where you have a maximum number of vertices requirement for your destination data.

Simply feed polygon features into the Chopper, and use a chop value of x (4 or greater), and the polygon will be split into a number of smaller area features. Each feature will have a maximum of x vertices.

Above: In this example the Chopper vertices parameter was set to 6, so no output polygon has more than 6 vertices.

This isn’t new functionality in itself, but what is new is that as of build 5556 in FME2009 beta the Chopper transformer has undergone a major improvement in the algorithm used to chop polygons.

The improvement results in:

  • Faster Computation
  • A Reduced number of output features
  • More visually appealing output

For example:

Above: A polygon chopped using FME2008

Above: The same dataset chopped with FME2009

This Edition of the FME Evangelist…
…was written to the tune of “It doesn’t have to be this way” by the Blow Monkeys.

http://www.youtube.com/watch?v=co8P6fN732U

I don’t know how I came across this one, but it brought back some memories. 80’s music videos eh? Nothing like ‘em.

June 25th, 2008

Welcome to The FME Evangelist

Hello FME’ers, and welcome to the FME Evangelist.

This site is the new home of what used to be called the FME Evangelism Weekly. It’s a means for Safe Software to circulate technical bulletins to all our users.

Focus
As the FME Evangelist my focus is on highlighting:

  • Noteworthy uses of the current FME release: Any example of FME use that is particularly worthy of mention, be it an entirely new use, or an existing function that is relatively unknown
  • New technology appearing in beta versions: Any new function that is destined for the next release

…with the occasional diversion onto items such as important technical news, upcoming events, Safe blog postings, etc.

Format
As with the Evangelism Weekly, I’ll be posting these as a compendium of items rather than as individual posts - though I don’t guarantee we’ll meet a weekly schedule!

FME Technical Resources
My first announcement regards FME technical resources in general. You may have noticed that we now have a number of such resources hosted on different web sites and services.

To help users keep track of all these resources, we’ve registered a bunch of domain names to make it easier to quote the resource URLs to someone. These are:

Additionally, we’ve organized them under a parent site called FME User Central:

Bookmark that page and you’ll always have access to the latest FME related information.

We’re trying (as far as is possible) to give each resource a standard look and provide navigation tools to flip from one to another. Also, all of these resources should let you at least look at the content without having to sign up for anything.

FME Evangelism and Your Feedback
Anyway, back to the evangelism…

My role is to evangelize new FME functions to the world on Safe’s behalf. You may have noticed me participating in user group discussions under the name mark2atsafe, or have attended a training course that I’ve taught.

However, I don’t see evangelizing as a one-way process. As much as I’m supposed to preach the good news to you, I feel it’s important that I should also promote user requirements and suggestions to the decision makers at Safe.

So please feel free to contact me to discuss any ideas or suggestions you might have for making FME a better product. It doesn’t matter how small the issue - a minor tweak to a GUI or log message for example - our developers’ favourite fixes are the small ones that have a big impact.

We’ve turned off the commenting on this site, because we don’t want it to turn into a glorified discussion board. You can either post your thoughts to the user group (FMETalk) or directly to me at:

Having taken my life into my hands by giving out my contact information, I’d add the comment that support related issues should really be sent to support@safe.com to be answered. The support team has more resources than I do, so you can expect a quicker and more accurate response by contacting them.

I hope you find this new resource of use, and I look forward to spreading the FME word.

Mark Ireland, The FME Evangelist
Safe Software Inc. Surrey, BC, CANADA
support@safe.com http://www.safe.com
Solutions for Spatial Data Translation, Distribution and Access

June 17th, 2008

FME Evangelism Weekly Issue #12

Introduction

Today’s email is an ad-hoc info session on the FME2009 beta. Expect more follow ups in the near future.

Cheers,

Mark

Contents

1) First FME2009 Beta now Released!
2) New GUI Interface
3) Transformer Changes
4) Performance Issues
5) Cool Format Updates
6) Cool Functionality Updates
7) The Complete What’s Great

1) First FME2009 Beta now Released!

Yes. You heard it here first.
The first FME2009 beta build is going to be released in the next couple of hours, if not already.
Hence the need to brief you all on the changes you will find.

FME Beta 2009 Splash Screen

As usual you can obtain it from our web site downloads page, or directly from our ftp site.

As with any beta version, be aware that it is subject to change and the functionality might not be the final version.

We don’t really recommend using a beta for production work unless there’s a specific bug fix that you need (and since most of those have been ported to an updated 2008 build, there’s even less excuse).

2) New GUI Interface

The biggest thing that you’ll notice about this version of FME is a completely overhauled user interface for settings boxes.

You may have noticed a couple of these sneak into FME2008 (for example the ‘Add Published Parameter’ dialog), but now the entire bunch of settings dialogs have been overhauled to use this design.

The Bufferer transformer is a good example. The new dialog looks like this (below):

Notice that required fields are all highlighted in yellow, to show you where to fill in compulsory values, and that you are also prompted on which type of data to enter (eg “Floating Point Value”, “String or Attribute Name”, etc).

It’s not obvious from a static image, but these dialogs are also capable of being resized, which is something you couldn’t do with the old dialogs - for example (below):

This update applies to both transformer settings and reader/writer settings dialogs too.

From our point of view, the really nice thing about this upgrade is that we now have a whole lot more options for advanced GUI features (for example greying out one setting based on the value of another) which will eventually lead to a more logical interface. Another benefit is that these dialogs are compatible with Linux operating systems, bringing us one step closer to relealizing a full FME version for Linux.

3) Transformer Changes

If you are looking for the LineGeneralizer or AreaGeneralizer transformer, you’ll find that we’ve combined them into a single transformer called the Generalizer.

Likewise, if you are looking for the Rasterizer transformer, be aware that it’s been split up into the ImageRasterizer and NumericRasterizer.

4) Performance Issues

You need to be aware that our in-house test suite has identified a number of performance issues that are still being addressed.

a) Six of our tests required a reduced value for the “Max Features in Memory” setting before they would complete. That’s six tests out of several thousand, but it’s possible that you may need to adjust this setting to get an existing workspace to complete.

b) Performance (speed) suffered when we moved to a new programming environment. We know why and it’s being worked on, but for the time being some translations may run up to 50% slower.

c) We appear to take a performance hit when reading/writing networked datasets (ie files that are not on the local filesystem). Again, we’re looking into the causes and will fix it asap.

5) Cool Format Updates

There have been a number of cool updates to formats that are worth mentioning here in brief:

a) DGN Tag Writing

Here’s something you’ll not have seen before (below). A DGN destination feature type with attributes on it.

Workspaces writing to DGN will now generate an attribute schema, and the attributes will be written to tags.

Left: Tag writing is turned on/off using a setting in the navigation pane. Default is currently on.

b) MapInfo MDB/XLS Support

The MapInfo MITAB reader now supports MapInfo TAB datasets where attributes are stored in either an MDB or XLS spreadsheet.

c) Adobe PDF Updates
PDF output now permits control over background colour, page size and ambient/specular colours.

d) Database SQL Statements
Database formats that permit the concept now support multiple before/after SQL statements. A semicolon is used for the delimiter between statements.

e) BigTIFF Support
The GeoTIFF writer now supports the ability to write BigTIFF datasets.

f) Autocad DWG MPolygon support
The DWG reader now supports MPolygon entities.

6) Cool Functionality Updates

There have also been a number of cool updates to FME functionality that are worth mentioning here in brief:

a) Arc Stroking
The stroking of arcs (well actually any curve) can now be controlled by a new directive FME_STROKE_MAX_DEVIATION which defines the maximum distance between the arc and the stroked chord. This is exposed in the Workbench GUI and in various transformers. It’s key use is to control internal operations - for example when writing to a non arc-supporting format.

b) Raster Clipping
The Raster Clipper now supports non-rectangular clipping. This is way way way cool.

c) Raster Expression Evaluator
This new transformer lets you carry out algebra type functions on raster cells.

Dmitri has a great page full of examples.

7) The Complete What’s Great

Don’t forget that the full list of Great items can be found on fmepedia:

Also check out Dmitri’s fmepedia pages for lots of examples.

http://www.fmepedia.com/index.php/Category:Dmitris_Raster_Studio

http://www.fmepedia.com/index.php/Category:Dmitris_3D_Place

http://www.fmepedia.com/index.php/Category:Web_Services


This has been a general overview of what you can expect to find in the new FME2009 beta.

The evangelism email will look at all of these new functions and formats in closer detail in the near future.

Don’t forget to email us feedback and suggestions for any of this new functionality.

June 2nd, 2008


Feed

Add to Technorati Favorites

The FME Evangelist

Welcome! The FME Evangelist delivers insider news, cutting edge examples and the latest functional developments for Safe Software’s FME application.

Links

Archives

Categories

Tags