RasterTiler Example

From fmepedia


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

To tile data for Virtual Earth you should use the VirtualEarthTiler.


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 and that the average user might not be aware of.


The RasterTiler


Above: RasterTiler Example Workspace.

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



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



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.



Above: The default output files.


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



Above: Concatenator 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.



Above: Updated fanout setting.


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


Above: Filenames Created from Concatenated Attribute.


Viewing the Output

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



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



Above: This option produces a single feature type (layer) per filename.



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!

Attached Files
filesizedate
RasterTilerExample.zip1.3 MB12/18/07
RasterTilerExample1.jpg62.4 kB12/18/07
RasterTilerExample2.jpg17.3 kB12/18/07
RasterTilerExample3.jpg10.7 kB12/18/07
RasterTilerExample4.jpg15.2 kB12/18/07
RasterTilerExample4a.jpg42.0 kB12/18/07
RasterTilerExample4b.jpg39.7 kB12/18/07
RasterTilerExample5.jpg14.1 kB12/18/07
RasterTilerExample6.jpg20.5 kB12/18/07
RasterTilerExample7.jpg8.2 kB12/18/07
RasterTilerExample8.jpg30.8 kB12/18/07
index.php------
User Comments Add a new comment