In this tutorial we will perform a common transformation taking data from multiple sources
and writing it out to Google KML.
Our city parks MapInfo tab file contains the parks in our area of interest.
Our bird nest points MapInfo mif/mid file contains the location of bird nests within the parks.
This is the output we want; the parks should be green with a transparency, the bird nests
should have a yellow icon and display the nest ID attribute.
In the navigator we can see bird nest points uses the nest ID attribute value as the navigation
tree name and bird nest in the city of interoplis park is the navigation tree summary. City
parks uses the name attribute value as the tree name and Park as a navigation tree summary.
For the actual features bird nest points has a table title of bird nests, for city parks
the table title has been set to park names and the city parks attribute name alt has
been renamed alt name.
Let's create the workspace by opening FME workbench. We will select blank workspace
in the getting started window we can then drag and drop our city parks tab file and
our bird nest points mif/mid-file. We will add a KML writer and write out to parksandbirdnestpoints.KML
We will select copy from reader for the feature type definition then select all of the source
feature types.
We will work with the city parks data first. We have to rename the attribute name alt to
alt name; an attribute renamer can do that.
We will also have to edit the output feature type so that it has alt name instead of name
alt; open the destination feature type and edit the attribute name.
Next we want to set some of the KML properties we pointed out earlier in Google Earth using
a KML property setter. Set the navigation tree name attribute to use the name attribute
the navigation tree summary to parks and the table title to park names we will add a KML
Styler and set the city parks to be green with an opacity of 0.7.
Now we can do the same thing for the bird nest points. We will add a KML property setter
and set the navigation tree name to nest ID, the navigation tree summary bird nest in the
city of interoplis park and the table title to bird nests. Finally we will use a KML Styler
to set the icon to C2, with an icon scale of 0.8.
We can now run the translation and inspect the output by opening it in Google Earth