Example

The attached workspace shows an example use of the RasterTiler transformer.

To tile data for Bing Maps, you should use the WebMapTiler.

NB: This is actually a good illustration of working with raster data in general, and GeoTIFF data in particular, because it uses some useful functions and techniques that have a wider use that the average user might not be aware of.

The RasterTiler

User-added image
Above: RasterTiler Example Workspace.

The workspace reads a CDED format DEM, tiles it and converts to GeoTIFF.


User-added image
Above: This close-up of the RasterTiler highlights there are two rows and columns to be created.


User-added image
Above: The feature counts show how one image has been split into four (a 2x2 grid).

File Naming

By default, the output from this process would be a series of files bearing the same name as the source data.


User-added image
Above: The default output files.

However, the RasterTiler outputs a row and column number which we can combine with the StringConcatenator to produce a new output filename.

User-added image
Above: StringConcatenator settings dialog.


By default, filenames are obtained from the source format attribute fme_basename using a feature type fanout on that attribute. Therefore, a new filename is applied by simply changing the fanout to use the new concatenated name attribute.

User-added image
Above: Updated fanout setting.


When the fanout is applied like this, the output files are named using our newly created attribute.

User-added image
Above: Filenames Created from Concatenated Attribute.

Viewing the Output

The output can then be opened in the FME Viewer to be inspected.

User-added image
Above: When opening multiple GeoTIFF files an option exists to divide the data up by filename.


User-added image
Above: This option produces a single feature type (layer) per filename.


User-added image
Above: The output shows clear evidence of being tiled into four quarters.



NB: The differences in colour range in the above images are caused by the Viewer calculating a scale separately for each raster. This only occurs because these are numeric rasters which need colour interpretation to be viewed: the underlying data is perfectly correct! Colour rasters would not exhibit the same differences because they would not need special interpretation. If you wanted to visualize this data as a continuous surface you could add a RasterInterpretationCoercer to the workspace before the RasterTiler to coerce everything into Grey8 (as opposed to Int8) - however refining the display like this would render the data useless as a DEM!